-
Notifications
You must be signed in to change notification settings - Fork 130
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: deploy success message also displays the namespace #1090
Conversation
@vyasgun: The label(s) In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Codecov Report
@@ Coverage Diff @@
## main #1090 +/- ##
==========================================
- Coverage 47.22% 45.03% -2.19%
==========================================
Files 59 64 +5
Lines 8028 8456 +428
==========================================
+ Hits 3791 3808 +17
- Misses 3855 4268 +413
+ Partials 382 380 -2
Continue to review full report at Codecov.
|
a5ceac9
to
e3ed504
Compare
980e91d
to
8eed50a
Compare
client.go
Outdated
@@ -705,10 +706,21 @@ func (c *Client) Deploy(ctx context.Context, path string) (err error) { | |||
// Deploy a new or Update the previously-deployed Function | |||
c.progressListener.Increment("Deploying function to the cluster") | |||
result, err := c.deployer.Deploy(ctx, f) | |||
|
|||
var namespace string |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The namespace is already resolved in c.deployer.Deploy()
, might be better to set it in the fn.DeploymentResult
and reuse here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just to clarify, should I add a field for namespace in the DeploymentResult type and populate it when it's resolved in c.deployer.Deploy()
?
Made the above change in the latest commit.
client.go
Outdated
if result.Status == Deployed { | ||
c.progressListener.Increment(fmt.Sprintf("Function deployed at URL: %v", result.URL)) | ||
c.progressListener.Increment(fmt.Sprintf("Function deployed in namespace %q and exposed at URL: %v", namespace, result.URL)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
c.progressListener.Increment(fmt.Sprintf("Function deployed in namespace %q and exposed at URL: %v", namespace, result.URL)) | |
c.progressListener.Increment(fmt.Sprintf("Function deployed in namespace %q and exposed at URL: \n%v", namespace, result.URL)) |
See the comment: #1083 (comment)
client.go
Outdated
} else if result.Status == Updated { | ||
c.progressListener.Increment(fmt.Sprintf("Function updated at URL: %v", result.URL)) | ||
c.progressListener.Increment(fmt.Sprintf("Function updated in namespace %q and exposed at URL: %v", namespace, result.URL)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
c.progressListener.Increment(fmt.Sprintf("Function updated in namespace %q and exposed at URL: %v", namespace, result.URL)) | |
c.progressListener.Increment(fmt.Sprintf("Function updated in namespace %q and exposed at URL: \n%v", namespace, result.URL)) |
See the comment: #1083 (comment)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please update On cluster build related messages as well:
https://github.com/knative-sandbox/kn-plugin-func/blob/81091863e7e02681b5951b211bbba69282d0a430/pipelines/tekton/pipeplines_provider.go#L157-L159
3da3be4
to
38db768
Compare
727579b
to
1eaca79
Compare
b7b8b91
to
f16b3e9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm !
This is nice information to have very readily available on deploy.
/hold for others to take a look
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm thanks for the contribution!
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: lkingland, vyasgun, zroubalik The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
@zroubalik @lkingland Thanks for the reviews. I am stuck on the codecov part. I have added changes to the Deploy function but I can't see a way to use mock clients for writing unit tests. |
@vyasgun I think that's okay, the test that you have added is imho enough for this feature |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/unhold
Changes
Fixes #1083
Release Note