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

Wait for the service to be Ready by default #54

Closed
sixolet opened this issue Apr 2, 2019 · 2 comments · Fixed by #156
Closed

Wait for the service to be Ready by default #54

sixolet opened this issue Apr 2, 2019 · 2 comments · Fixed by #156
Milestone

Comments

@sixolet
Copy link
Contributor

sixolet commented Apr 2, 2019

Use --async to not wait.

@sixolet sixolet added this to the v0.2.0 milestone May 28, 2019
@rhuss
Copy link
Contributor

rhuss commented Jun 2, 2019

/assign rhuss

@knative-prow-robot
Copy link
Contributor

@rhuss: GitHub didn't allow me to assign the following users: rhuss.

Note that only knative members and repo collaborators can be assigned and that issues/PRs can only have 10 assignees at the same time.
For more information please see the contributor guide

In response to this:

/assign rhuss

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.

rhuss added a commit to rhuss/knative-client that referenced this issue Jun 2, 2019
* By default wait for a service to be in condition "Ready"
* Use "--async" for returning immediately (which is the current behaviour)
* --wait-timeout to specify how long to wait for Ready condition (in seconds, default: 60s)
* In sync mode, print out the service URL as a last line (so that it can be used together with `tail -1`) to extract the service URL after the service is created.
* Refactored service create code to use smaller methods which are easier to understand

Current tests has been adapted to work with async behaviour but no
new tests has been added for the new sync mode.
This is coming in a second commit (and put into an extra test file).

Fixes knative#54
rhuss added a commit to rhuss/knative-client that referenced this issue Jun 3, 2019
* By default wait for a service to be in condition "Ready"
* Use "--async" for returning immediately (which is the current behaviour)
* --wait-timeout to specify how long to wait for Ready condition (in seconds, default: 60s)
* In sync mode, print out the service URL as a last line (so that it can be used together with `tail -1`) to extract the service URL after the service is created.
* Refactored service create code to use smaller methods which are easier to understand

Current tests has been adapted to work with async behaviour but no
new tests has been added for the new sync mode.
This is coming in a second commit (and put into an extra test file).

Fixes knative#54
rhuss added a commit to rhuss/knative-client that referenced this issue Jun 3, 2019
* By default wait for a service to be in condition "Ready"
* Use "--async" for returning immediately (which is the current behaviour)
* --wait-timeout to specify how long to wait for Ready condition (in seconds, default: 60s)
* In sync mode, print out the service URL as a last line (so that it can be used together with `tail -1`) to extract the service URL after the service is created.
* Refactored service create code to use smaller methods which are easier to understand

Current tests has been adapted to work with async behaviour but no
new tests has been added for the new sync mode.
This is coming in a second commit (and put into an extra test file).

Fixes knative#54
rhuss added a commit to rhuss/knative-client that referenced this issue Jun 6, 2019
* By default wait for a service to be in condition "Ready"
* Use "--async" for returning immediately (which is the current behaviour)
* --wait-timeout to specify how long to wait for Ready condition (in seconds, default: 60s)
* In sync mode, print out the service URL as a last line (so that it can be used together with `tail -1`) to extract the service URL after the service is created.
* Refactored service create code to use smaller methods which are easier to understand

Current tests has been adapted to work with async behaviour but no
new tests has been added for the new sync mode.
This is coming in a second commit (and put into an extra test file).

Fixes knative#54
rhuss added a commit to rhuss/knative-client that referenced this issue Jun 6, 2019
* By default wait for a service to be in condition "Ready"
* Use "--async" for returning immediately (which is the current behaviour)
* --wait-timeout to specify how long to wait for Ready condition (in seconds, default: 60s)
* In sync mode, print out the service URL as a last line (so that it can be used together with `tail -1`) to extract the service URL after the service is created.
* Refactored service create code to use smaller methods which are easier to understand

Current tests has been adapted to work with async behaviour but no
new tests has been added for the new sync mode.
This is coming in a second commit (and put into an extra test file).

Fixes knative#54
rhuss added a commit to rhuss/knative-client that referenced this issue Jun 7, 2019
* By default wait for a service to be in condition "Ready"
* Use "--async" for returning immediately (which is the current behaviour)
* --wait-timeout to specify how long to wait for Ready condition (in seconds, default: 60s)
* In sync mode, print out the service URL as a last line (so that it can be used together with `tail -1`) to extract the service URL after the service is created.
* Refactored service create code to use smaller methods which are easier to understand

Current tests has been adapted to work with async behaviour but no
new tests has been added for the new sync mode.
This is coming in a second commit (and put into an extra test file).

Fixes knative#54
rhuss added a commit to rhuss/knative-client that referenced this issue Jun 9, 2019
* By default wait for a service to be in condition "Ready"
* Use "--async" for returning immediately (which is the current behaviour)
* --wait-timeout to specify how long to wait for Ready condition (in seconds, default: 60s)
* In sync mode, print out the service URL as a last line (so that it can be used together with `tail -1`) to extract the service URL after the service is created.
* Refactored service create code to use smaller methods which are easier to understand

Current tests has been adapted to work with async behaviour but no
new tests has been added for the new sync mode.
This is coming in a second commit (and put into an extra test file).

Fixes knative#54
rhuss added a commit to rhuss/knative-client that referenced this issue Jun 9, 2019
By default, `kn service create` blocks until the service is either
created or an error occured during service creation.

With the option --no-wait the behaviour can be switched to an
async mode so that that kn returns immediately after the service is
created without waiting for a successful Ready status condition.

The timeout for how long to wait can be configured with --wait-timeout
If a timeout occur, that doesn't mean that the service is not created,
but the wait just returns. The default value is 60 seconds.

In wait mode, print out the service URL as a last line (so that it can be used together with `tail -1`) to extract the service URL after the service is created.

Fixes knative#54
rhuss added a commit to rhuss/knative-client that referenced this issue Jun 28, 2019
By default, `kn service create` blocks until the service is either
created or an error occured during service creation.

With the option --no-wait the behaviour can be switched to an
async mode so that that kn returns immediately after the service is
created without waiting for a successful Ready status condition.

The timeout for how long to wait can be configured with --wait-timeout
If a timeout occur, that doesn't mean that the service is not created,
but the wait just returns. The default value is 60 seconds.

In wait mode, print out the service URL as a last line (so that it can be used together with `tail -1`) to extract the service URL after the service is created.

Fixes knative#54
knative-prow-robot pushed a commit that referenced this issue Jun 28, 2019
…#156)

* feat(service create): Added --no-wait and --wait-timeout

By default, `kn service create` blocks until the service is either
created or an error occured during service creation.

With the option --no-wait the behaviour can be switched to an
async mode so that that kn returns immediately after the service is
created without waiting for a successful Ready status condition.

The timeout for how long to wait can be configured with --wait-timeout
If a timeout occur, that doesn't mean that the service is not created,
but the wait just returns. The default value is 60 seconds.

In wait mode, print out the service URL as a last line (so that it can be used together with `tail -1`) to extract the service URL after the service is created.

Fixes #54

* chore(service create): Tolerate if obeservedGeneration has not been set yet during startup

* chore(service create): Refactored based on review comments

* Introduced an --async flag (replacing --wait and --no-wait)
* Added proper retry handling on the list watch
* Updated help message

* chore(service wait): Added a new test for sync behaviour
maximilien pushed a commit to maximilien/client that referenced this issue Jul 1, 2019
…knative#156)

* feat(service create): Added --no-wait and --wait-timeout

By default, `kn service create` blocks until the service is either
created or an error occured during service creation.

With the option --no-wait the behaviour can be switched to an
async mode so that that kn returns immediately after the service is
created without waiting for a successful Ready status condition.

The timeout for how long to wait can be configured with --wait-timeout
If a timeout occur, that doesn't mean that the service is not created,
but the wait just returns. The default value is 60 seconds.

In wait mode, print out the service URL as a last line (so that it can be used together with `tail -1`) to extract the service URL after the service is created.

Fixes knative#54

* chore(service create): Tolerate if obeservedGeneration has not been set yet during startup

* chore(service create): Refactored based on review comments

* Introduced an --async flag (replacing --wait and --no-wait)
* Added proper retry handling on the list watch
* Updated help message

* chore(service wait): Added a new test for sync behaviour
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants