-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Check route is not ready when underlying revision is not healthy in TestContainerErrorMsg #4682
Conversation
Hi @nak3. 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 Once the patch is verified, the new status will be reflected by the 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. |
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.
@nak3: 0 warnings.
In response to this:
This PR fixes following TODO comment
// TODO(jessiezcc): add the check to validate that Route is not marked as ready once https://github.com/knative/serving/issues/990 is fixed Proposed Changes
This patch changes TestContainerErrorMsg to:
- create new service instead of configuration.
- make sure route state is not ready when revision is not healthy.
/lint
Release Note
NONE
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.
/ok-to-test |
// IsRouteNotReady will check the status conditions of the route and return true if the route is | ||
// not ready. | ||
func IsRouteNotReady(r *v1alpha1.Route) (bool, error) { | ||
return !r.Status.IsReady(), nil |
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 IsRouteReady check has a generation check that we probably want here
r.Generation == r.Status.ObservedGeneration
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.
@dprotaso Thank you!
But it seems that routes.status.ObservedGeneration
is not assigned until the Route becomes ready. So, the test fails due to Generation=1
vs ObservedGeneration=0
mismatch.
For example, when we deployed invalid image below,
cat <<EOF | kubectl apply -f -
apiVersion: serving.knative.dev/v1alpha1
kind: Service
metadata:
name: helloworld-go
spec:
runLatest:
configuration:
revisionTemplate:
spec:
container:
image: image-registry.openshift-image-registry.svc:5000/knative-serving/invalidhelloworld
resources:
limits:
cpu: 100m
memory: 200M
requests:
cpu: 100u
memory: 100M
env:
- name: TARGET
value: "Go Sample v1"
EOF
observedGeneration
is not assigned and does have 0
for observedGeneration
until it becomes Ready.
$ kubectl get rt -o yaml helloworld-go |grep -E "generation|observedGeneration"
generation: 1
// IsRouteNotReady will check the status conditions of the route and return true if the route is | ||
// not ready. | ||
func IsRouteNotReady(r *v1beta1.Route) (bool, error) { | ||
return !r.Status.IsReady(), nil |
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.
Same comment applies re: generation check
/assign @dprotaso |
/test pull-knative-serving-integration-tests Hmm.. log says
And my env always passes the test. |
Yeah looks like it's being addressed on here: #4594 /lgtm |
/hold It looks like test does not pass. I will look into it. |
/hold cancel |
/lgtm |
@nak3 you'll need to rebase |
@dprotaso Thank you! Yes, I rebased now. |
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
/approve
/test pull-knative-serving-integration-tests |
…estContainerErrorMsg This patch changes TestContainerErrorMsg to: - create new service instead of configuration. - make sure route state is not ready when revision is not healthy.
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
/approve
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: dprotaso, markusthoemmes, nak3 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 |
This PR fixes following TODO comment
serving/test/conformance/api/v1alpha1/errorcondition_test.go
Line 114 in aac25fb
Proposed Changes
This patch changes TestContainerErrorMsg to:
/lint
Release Note