Skip to content
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

Add 'kn service wait' for deployment status check #1800

Merged
merged 2 commits into from
Apr 11, 2023

Conversation

manoelmarques
Copy link
Contributor

@manoelmarques manoelmarques commented Apr 3, 2023

Description

Adds a kn service wait NAME [-n, --namespace string, --wait-timeout int, --wait-window int]

Changes

  • Add 'kn service wait' for deployment status check

Reference

Fixes #732

Release Note

 Add 'kn service wait' for deployment status check

@knative-prow knative-prow bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Apr 3, 2023
@knative-prow
Copy link

knative-prow bot commented Apr 3, 2023

Welcome @manoelmarques! It looks like this is your first PR to knative/client 🎉

@knative-prow knative-prow bot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Apr 3, 2023
@knative-prow
Copy link

knative-prow bot commented Apr 3, 2023

Hi @manoelmarques. Thanks for your PR.

I'm waiting for a knative member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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.

Copy link

@knative-prow knative-prow bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@manoelmarques: 1 warning.

In response to this:

Description

Adds a kn service wait NAME [-n, --namespace string, --wait-timeout int, --wait-window int]

Changes

  • Add 'kn service wait' for deployment status check

Reference

Fixes #732

Release Note


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.

pkg/kn/commands/service/wait.go Show resolved Hide resolved
@knative-prow knative-prow bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Apr 3, 2023
@manoelmarques manoelmarques force-pushed the wait-732 branch 2 times, most recently from 0f36696 to 49d27bb Compare April 5, 2023 19:31
@manoelmarques manoelmarques changed the title [WIP] Add 'kn service wait' for deployment status check Add 'kn service wait' for deployment status check Apr 5, 2023
@knative-prow knative-prow bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Apr 5, 2023
@dsimansk
Copy link
Contributor

dsimansk commented Apr 6, 2023

Thanks for the PR! 👍

/ok-to-test

@knative-prow knative-prow bot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Apr 6, 2023
@dsimansk dsimansk added the kind/feature New feature or request label Apr 6, 2023
@codecov
Copy link

codecov bot commented Apr 6, 2023

Codecov Report

Patch coverage: 74.46% and project coverage change: -0.03 ⚠️

Comparison is base (e522f1f) 79.87% compared to head (33f0637) 79.85%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1800      +/-   ##
==========================================
- Coverage   79.87%   79.85%   -0.03%     
==========================================
  Files         174      175       +1     
  Lines       13593    13633      +40     
==========================================
+ Hits        10858    10886      +28     
- Misses       1992     2000       +8     
- Partials      743      747       +4     
Impacted Files Coverage Δ
pkg/kn/commands/service/wait.go 68.42% <68.42%> (ø)
pkg/kn/commands/service/service.go 78.57% <100.00%> (+0.52%) ⬆️
pkg/kn/commands/wait_flags.go 100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@dsimansk
Copy link
Contributor

dsimansk commented Apr 6, 2023

@manoelmarques can you pls rerung ./hack/build.sh -c. There should be a few .md files regenerated maybe.

Comment on lines 82 to 86
timeoutUsage := "Seconds to wait before giving up on waiting for service to be ready."
command.Flags().IntVar(&waitFlags.TimeoutInSeconds, "wait-timeout", waitTimeoutDefault, timeoutUsage)

windowUsage := "Seconds to wait for service to be ready after a false ready condition is returned"
command.Flags().IntVar(&waitFlags.ErrorWindowInSeconds, "wait-window", 2, windowUsage)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you pls look at extracting those flags in a separate function in wait_flags.go to be usable without --wati? To keep the names and descriptions if any change happens etc.

https://github.com/knative/client/blob/main/pkg/kn/commands/wait_flags.go#L52-L56

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I changed it by reusing the current function in wait_flags.go

@manoelmarques
Copy link
Contributor Author

/retest

Copy link
Contributor

@dsimansk dsimansk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/approve
/lgtm

@knative-prow knative-prow bot added the lgtm Indicates that a PR is ready to be merged. label Apr 11, 2023
@knative-prow
Copy link

knative-prow bot commented Apr 11, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dsimansk, manoelmarques

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@knative-prow knative-prow bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Apr 11, 2023
@knative-prow knative-prow bot merged commit 11bc977 into knative:main Apr 11, 2023
@manoelmarques manoelmarques deleted the wait-732 branch April 11, 2023 16:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. kind/feature New feature or request lgtm Indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add "kn service status wait" for deployment status check
2 participants