Skip to content

Update reconciler to update observed generation when ready status is False#4594

Merged
knative-prow-robot merged 2 commits intoknative:masterfrom
taragu:fix-service-routesready-unknown
Jul 23, 2019
Merged

Update reconciler to update observed generation when ready status is False#4594
knative-prow-robot merged 2 commits intoknative:masterfrom
taragu:fix-service-routesready-unknown

Conversation

@taragu
Copy link
Copy Markdown
Contributor

@taragu taragu commented Jul 2, 2019

Fixes #4561

Proposed Changes

  • Update reconciler to update observed generation when ready status is False

Release Note

NONE

/cc @dgerd
/cc @mattmoor
/cc @vagababov
/cc @markusthoemmes

@googlebot googlebot added the cla: yes Indicates the PR's author has signed the CLA. label Jul 2, 2019
@knative-prow-robot knative-prow-robot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Jul 2, 2019
Copy link
Copy Markdown
Contributor

@knative-prow-robot knative-prow-robot left a comment

Choose a reason for hiding this comment

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

@taragu: 0 warnings.

Details

In response to this:

Fixes #4561

Proposed Changes

  • Update reconciler to update observed generation when ready status is False

Release Note

NONE

/cc @dgerd
/cc @mattmoor
/cc @vagababov
/cc @markusthoemmes

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.

@knative-prow-robot knative-prow-robot added area/API API objects and controllers needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Jul 2, 2019
@knative-prow-robot
Copy link
Copy Markdown
Contributor

Hi @taragu. 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.

Details

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.

@vagababov
Copy link
Copy Markdown
Contributor

I'd expect some unit tests to change as well...

/ok-to-test

@knative-prow-robot knative-prow-robot 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 Jul 2, 2019
Comment thread pkg/reconciler/service/service.go Outdated
service.Status.MarkConfigurationNotReconciled()
} else {
}
if config.Generation == config.Status.ObservedGeneration || (rc != nil && rc.Status == corev1.ConditionFalse) {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I suspect the bug here is that Configuration / Route aren't updating the ObservedGeneration for which they are failing.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

+1

This condition will be more clear if we instead make sure that we bump "ObservedGeneration" in the Route and Configuration reconcilers when "Ready" is updated to "False".

Copy link
Copy Markdown
Contributor

@yu2003w yu2003w Jul 3, 2019

Choose a reason for hiding this comment

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

+1
For this case, "ObservedGeneration" in the configuration reconciler is already updated.
https://github.com/knative/serving/blob/master/pkg/reconciler/configuration/configuration.go#L167
In router reconciler, "ObeservedGeneration" will not be updated until route is successfully synced.
https://github.com/knative/serving/blob/master/pkg/reconciler/route/route.go#L242
Implementation in Route and Configuration reconcilers is a little different.

@taragu taragu force-pushed the fix-service-routesready-unknown branch from 5cf40fc to af65283 Compare July 4, 2019 16:30
@knative-prow-robot knative-prow-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. area/test-and-release It flags unit/e2e/conformance/perf test issues for product features and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Jul 4, 2019
Comment thread pkg/reconciler/service/service.go Outdated
rc := route.Status.GetCondition(apis.ConditionReady)
if rc != nil && rc.Status == corev1.ConditionFalse {
logger.Infof("Updating ObservedGeneration")
existing.Status.ObservedGeneration++
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
existing.Status.ObservedGeneration++
existing.Status.ObservedGeneration = existing.Generation

We might miss spec updates and catch up to multiple changes.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I don't think the change you have here is right. I think this should be taken care of by line 188

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@mattmoor I think line 188 is updating the ObservedGeneration for service.Status, versus here we are updating the ObservedGeneration for route.Status

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Oh, I misread.

Status fields for resources should only be modified by the reconciler for that resource. So this is likely the change we want, but we want it in the Route reconciler, not the Service reconciler.

Comment thread pkg/reconciler/service/service.go Outdated

rc := route.Status.GetCondition(apis.ConditionReady)
if rc != nil && rc.Status == corev1.ConditionFalse {
logger.Infof("Updating ObservedGeneration")
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I'd remove this, it's going to be super noisy and doesn't include any state.

Comment thread pkg/reconciler/service/service.go Outdated
rc := route.Status.GetCondition(apis.ConditionReady)
if rc != nil && rc.Status == corev1.ConditionFalse {
logger.Infof("Updating ObservedGeneration")
existing.Status.ObservedGeneration++
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I don't think the change you have here is right. I think this should be taken care of by line 188

@taragu taragu force-pushed the fix-service-routesready-unknown branch from af65283 to 23e58a8 Compare July 5, 2019 15:24
}

// MarkRouteReadyFalse marks the service `RouteReady` condition to the `False` state.
func (ss *ServiceStatus) MarkRouteReadyFalse(reason, messageFormat string) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think a better name would be MarkRouteFailed.

Comment thread pkg/testing/v1alpha1/route.go Outdated
}
}

// WithRouteObservedGeneration sets the .Status.ObservedGeneration of the Route.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
// WithRouteObservedGeneration sets the .Status.ObservedGeneration of the Route.
// WithRouteObservedGeneration propagates `.Metadata.Generation` to `.Status.ObservedGeneration`.

@taragu taragu force-pushed the fix-service-routesready-unknown branch from 23e58a8 to 6c9b19e Compare July 5, 2019 19:37
@knative-metrics-robot
Copy link
Copy Markdown

The following is the coverage report on pkg/.
Say /test pull-knative-serving-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/apis/serving/v1alpha1/service_lifecycle.go 89.3% 86.2% -3.1
pkg/reconciler/service/service.go 88.4% 88.6% 0.2

Comment thread pkg/reconciler/service/service.go Outdated

rc := route.Status.GetCondition(apis.ConditionReady)
if rc != nil && rc.Status == corev1.ConditionFalse {
existing.Status.ObservedGeneration = existing.Generation
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Changes to anything in Route's Status should only occur in pkg/reconciler/route/route.go

@taragu taragu force-pushed the fix-service-routesready-unknown branch 2 times, most recently from d628ef6 to 3257723 Compare July 16, 2019 17:54
@taragu
Copy link
Copy Markdown
Contributor Author

taragu commented Jul 16, 2019

/test pull-knative-serving-build-tests

Comment thread pkg/reconciler/route/route.go Outdated
// assumptions about defaulting.
r.SetDefaults(v1beta1.WithUpgradeViaDefaulting(ctx))
r.Status.InitializeConditions()
r.Status.ObservedGeneration = r.Generation
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Okay so I spent some more time looking at this. As not all returned errors from this method result in Conditions being updated to "False" which was my original assumption. We likely have some other bugs to fix in this reconciler because of this, but to prevent scope creep we should move it back to where you originally had it.

So this should be on:

  1. Line 229 after configureTraffic fails (where you originally had it)
  2. Line 287 after we reconcile successfully

Sorry for the back and forth here.

Comment thread test/v1alpha1/service.go Outdated
}

t.Logf("Creating a new Service %s.", names.Service)
svc, err := CreateLatestService(t, clients, *names, fopt...)
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

You should just use this directly in your test. I don't think the rest of this function is really necessary to accomplish what you want.

Comment thread test/v1beta1/route.go Outdated
// track how long it took for name to get into the state checked by inState.
func WaitForRouteState(client *test.ServingBetaClients, name string, inState func(r *v1beta1.Route) (bool, error), desc string) error {
// ignoreNotFound indicates that we will keep polling even if the route is not found.
func WaitForRouteState(client *test.ServingBetaClients, name string, inState func(r *v1beta1.Route) (bool, error), desc string, ignoreNotFound bool) error {
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This just doesn't make sense to me. If we have already waited for the Service to be Ready=False there is no way that the Route doesn't exist yet unless something else is going wrong.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@dgerd I tried removing this change after I updated the test to use an invalid RevisionName in TrafficTarget instead of an invalid image name, and I hit the error routes.serving.knative.dev "route-not-ready-oddmxzeh" not found again https://prow.knative.dev/view/gcs/knative-prow/pr-logs/pull/knative_serving/4594/pull-knative-serving-integration-tests/1151260492208017413

@taragu taragu force-pushed the fix-service-routesready-unknown branch 3 times, most recently from 1674f30 to 8a1b852 Compare July 17, 2019 13:28
@taragu
Copy link
Copy Markdown
Contributor Author

taragu commented Jul 17, 2019

Looks like the test failures aren't related to changes in this PR. @dgerd I'm not able to workaround the route not found error unless error from lastState, err = client.Routes.Get(name, metav1.GetOptions{}) is ignored.

Another test TestContainerErrorMsg has the same problem too, but with Configuration configurations.serving.knative.dev "container-error-msg-zfspfsip" not found https://prow.knative.dev/view/gcs/knative-prow/pr-logs/pull/knative_serving/4594/pull-knative-serving-integration-tests/1151485219816083456

}

t.Logf("Waiting for Service %q to transition to Ready == false.", names.Service)
if err := v1a1test.WaitForServiceState(clients.ServingAlphaClient, names.Service, v1a1test.IsServiceNotReady, "ServiceIsNotReady"); err != nil {
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I think this line is the problem.

v1a1test.IsServiceNotReady is not checking for Service's Ready Condition to move from Unknown -> False, but is just checking that the Service is not happy. This is going to return immediately every time and not wait.

Since this check is not waiting for the Service reconciler to run it is very likely that the Route has yet to be created which is going to cause the next wait to fail. This is why adding in the 'ignoreNotFound' is working for you.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Now this waits for [observed]generation to match and Ready to be false, which I believe is the desired end-state.

Comment thread test/e2e/route_service_test.go Outdated
},
})

t.Log("Creating a new Service with RouteReady == Unknown and route Ready == False")
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

When the Service is created all conditions are set to "Unknown" this is the default state. At no point in this test will RoutesReady be Unknown and Ready be False. The transition will go:

  1. Service.Ready = Unknown, Service.RoutesReady = Unknown
  2. Route gets Created
  3. Route.Ready = False as Revision is missing
  4. Service.RoutesReady = False as Route.Ready = False.
  5. At the same time as 4 Service.Ready = False as one of it's sub-conditions (RoutesReady) is False

Comment thread test/e2e/route_service_test.go Outdated

names := test.ResourceNames{
Service: test.ObjectNameForTest(t),
Image: "helloworld",
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Use test constants. Also we are looking to remove helloworld. See #4690

Suggested change
Image: "helloworld",
Image: test.PizzaPlanet1,

Comment thread test/v1alpha1/route.go Outdated
// track how long it took for name to get into the state checked by inState.
func WaitForRouteState(client *test.ServingAlphaClients, name string, inState func(r *v1alpha1.Route) (bool, error), desc string) error {
// ignoreNotFound indicates that we will keep polling even if the route is not found.
func WaitForRouteState(client *test.ServingAlphaClients, name string, inState func(r *v1alpha1.Route) (bool, error), desc string, ignoreNotFound bool) error {
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Lets avoid updating this signature. See comment above for what I think is going on here.

@taragu taragu force-pushed the fix-service-routesready-unknown branch 3 times, most recently from 390dac6 to b77ad3c Compare July 18, 2019 16:14
Comment thread test/e2e/pod_schedule_error_test.go Outdated
// there's no ready Revision, therefore we could receive either err message from Configuration or
// from Route. The error propagated from Route is not as informative to users comparing to the
// error propagated from Configuration, so we would like to improve the error coming from Route.
cond := r.Status.GetCondition(v1alpha1.ConfigurationConditionReady)
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This condition is looking at "ConfigurationsReady" which should never receive Ready information from the Route. It should only contain the propagated up information from the Configuration

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@dgerd Thank you so much for helping me figure this out. The test was actually check for the wrong condition. It was checking ConfigurationConditionReady (which is apis.ConditionReady) here when trying to check the Service's Configuration status. It should be ServiceConditionConfigurationsReady.

@taragu taragu force-pushed the fix-service-routesready-unknown branch from b77ad3c to 3ae54d9 Compare July 18, 2019 18:21
Copy link
Copy Markdown

@dgerd dgerd left a comment

Choose a reason for hiding this comment

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

I think we are getting close. A lot of minor suggestions on the tests. Please make the changes in your own branch rather than taking the Github suggestion directly. It will make merging and fixing references easier.

Comment thread test/e2e/route_service_test.go Outdated
},
})

t.Log("Creating a new Service with RouteReady == Unknown and route Ready == False")
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Suggested change
t.Log("Creating a new Service with RouteReady == Unknown and route Ready == False")
t.Log("Creating a new Service with an invalid traffic target.")

Comment thread test/e2e/route_service_test.go Outdated
t.Fatalf("Failed to create initial Service %q: %#v", names.Service, err)
}

t.Logf("Waiting for Service %q to transition to Ready == false.", names.Service)
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Suggested change
t.Logf("Waiting for Service %q to transition to Ready == false.", names.Service)
t.Logf("Waiting for Service %q to transition to Ready == False.", names.Service)

Comment thread test/e2e/route_service_test.go Outdated

t.Logf("Waiting for Service %q to transition to Ready == false.", names.Service)
if err := v1a1test.WaitForServiceState(clients.ServingAlphaClient, names.Service, v1a1test.IsServiceNotReady, "ServiceIsNotReady"); err != nil {
t.Fatalf("Failed waiting for Service %q to transition to Ready false: %#v", names.Service, err)
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Suggested change
t.Fatalf("Failed waiting for Service %q to transition to Ready false: %#v", names.Service, err)
t.Fatalf("Failed waiting for Service %q to transition to Ready == False: %#v", names.Service, err)

Comment thread test/e2e/route_service_test.go Outdated
t.Fatalf("Failed waiting for Service %q to transition to Ready false: %#v", names.Service, err)
}

t.Logf("Waiting for Route %q to transition to Ready == false.", serviceresourcenames.Route(svc))
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Nit: You don't need the wait here or below as you are not waiting for this change to happen, but validating that when Service is reporting False that your sub-conditions are also false. I am fine keeping it as is because I understand the helpers are nice here, but we should update the text on the log.

Suggested change
t.Logf("Waiting for Route %q to transition to Ready == false.", serviceresourcenames.Route(svc))
t.Logf("Validating Route %q has reconciled to Ready == False.", serviceresourcenames.Route(svc))

Comment thread test/e2e/route_service_test.go Outdated
}

// Wait for RouteReady to become false
t.Log("Wait for the service RouteReady to be false")
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Suggested change
t.Log("Wait for the service RouteReady to be false")
t.Log("Validating Service %q has reconciled to RoutesReady == False.", names.Service)

Comment thread test/e2e/route_service_test.go Outdated
t.Logf("Waiting for Route %q to transition to Ready == false.", serviceresourcenames.Route(svc))
// Check Route is not ready
if err = v1a1test.WaitForRouteState(clients.ServingAlphaClient, serviceresourcenames.Route(svc), v1a1test.IsRouteNotReady, "RouteIsNotReady"); err != nil {
t.Fatalf("The Route %s was marked as Ready to serve traffic but it should not be: %#v", names.Route, err)
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

nit: pick either %q or %s and use consistently. Also use serviceresourcenames.Route(svc) as it is what is actually being used in the Wait function.

Suggested change
t.Fatalf("The Route %s was marked as Ready to serve traffic but it should not be: %#v", names.Route, err)
t.Fatalf("The Route %q was marked as Ready to serve traffic but it should not be: %#v", serviceresourcenames.Route(svc), err)

Comment thread test/e2e/route_service_test.go Outdated
// Wait for RouteReady to become false
t.Log("Wait for the service RouteReady to be false")
if err = v1a1test.WaitForServiceState(clients.ServingAlphaClient, names.Service, v1a1test.IsServiceNotRouteReady, "ServiceRouteReadyFalse"); err != nil {
t.Fatalf("Service RouteReady is not set to false")
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Add service name and error. Use consistent styling.

Suggested change
t.Fatalf("Service RouteReady is not set to false")
t.Fatalf("Service %q was not marked RouteReady == False: %#v, names.Service, err)

Comment thread test/v1alpha1/service.go Outdated

// IsServiceNotReady will check the status conditions of the service and return true if the service is
// not ready.
// IsServiceNotReady will check the status conditions of the service and return false if the service is
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Don't take take the suggestion straight from github as the line bleeds over, but use consistent style with below.

Suggested change
// IsServiceNotReady will check the status conditions of the service and return false if the service is
// IsServiceNotReady checks the Ready status condition of the service and returns true only if Ready is set to False.

Comment thread test/v1alpha1/service.go Outdated
return result != nil && result.Status == corev1.ConditionFalse, nil
}

// IsServiceNotRouteReady checks the RouteReady status of the service and return false if the service's
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Suggested change
// IsServiceNotRouteReady checks the RouteReady status of the service and return false if the service's
// IsServiceNotRouteReady checks the RouteReady status of the service and returns true only if RoutesReady is set to False.

Comment thread test/v1alpha1/service.go Outdated

// IsServiceNotRouteReady checks the RouteReady status of the service and return false if the service's
// RouteReady is true.
func IsServiceNotRouteReady(s *v1alpha1.Service) (bool, error) {
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

nit: The condition is actually "RoutesReady" it makes more sense grammatically if the "not' is moved.

Suggested change
func IsServiceNotRouteReady(s *v1alpha1.Service) (bool, error) {
func IsServiceRoutesNotReady(s *v1alpha1.Service) (bool, error) {

Comment thread test/v1alpha1/service.go Outdated
func IsServiceNotReady(s *v1alpha1.Service) (bool, error) {
return s.Generation == s.Status.ObservedGeneration && !s.Status.IsReady(), nil
result := s.Status.GetCondition(v1alpha1.ServiceConditionReady)
return result != nil && result.Status == corev1.ConditionFalse, nil
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Can we keep the observed generation check?

Comment thread test/v1alpha1/service.go Outdated
// IsServiceRoutesNotReady checks the RoutesReady status of the service and returns true only if RoutesReady is set to False.
func IsServiceRoutesNotReady(s *v1alpha1.Service) (bool, error) {
result := s.Status.GetCondition(v1alpha1.ServiceConditionRoutesReady)
return result != nil && result.Status == corev1.ConditionFalse, nil
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Add an observed generation check?

@taragu taragu force-pushed the fix-service-routesready-unknown branch from b0e84ec to 304a583 Compare July 19, 2019 00:48
Copy link
Copy Markdown
Member

@mattmoor mattmoor left a comment

Choose a reason for hiding this comment

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

thanks for your patience with this @taragu, I know it's been a bit of a minefield, but I appreciate you sticking with it.

}

t.Logf("Waiting for Service %q to transition to Ready == false.", names.Service)
if err := v1a1test.WaitForServiceState(clients.ServingAlphaClient, names.Service, v1a1test.IsServiceNotReady, "ServiceIsNotReady"); err != nil {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Now this waits for [observed]generation to match and Ready to be false, which I believe is the desired end-state.

Comment thread test/e2e/route_service_test.go Outdated

t.Logf("Validating Route %q has reconciled to Ready == False.", serviceresourcenames.Route(svc))
// Check Route is not ready
if err = v1a1test.WaitForRouteState(clients.ServingAlphaClient, serviceresourcenames.Route(svc), v1a1test.IsRouteNotReady, "RouteIsNotReady"); err != nil {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

At this point we should be able to replace WaitFor here with Check since the Service has already observed the bad state, so we should get that same bad state.

Comment thread test/e2e/route_service_test.go Outdated

// Wait for RoutesReady to become False
t.Logf("Validating Service %q has reconciled to RoutesReady == False.", names.Service)
if err = v1a1test.WaitForServiceState(clients.ServingAlphaClient, names.Service, v1a1test.IsServiceRoutesNotReady, "ServiceRouteReadyFalse"); err != nil {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Same, use Check instead of WaitFor.

@taragu taragu force-pushed the fix-service-routesready-unknown branch from 304a583 to a22ba07 Compare July 19, 2019 02:31
@taragu
Copy link
Copy Markdown
Contributor Author

taragu commented Jul 19, 2019

@dgerd @mattmoor thank you so much for your review comments! I've updated the PR to address them. Please take a look

@taragu taragu force-pushed the fix-service-routesready-unknown branch from a22ba07 to 979204d Compare July 19, 2019 13:05
@dgerd
Copy link
Copy Markdown

dgerd commented Jul 23, 2019

/lgtm
/approve

@knative-prow-robot knative-prow-robot added the lgtm Indicates that a PR is ready to be merged. label Jul 23, 2019
@knative-prow-robot
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dgerd, taragu

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details 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-robot knative-prow-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 23, 2019
@knative-prow-robot knative-prow-robot merged commit 42ea050 into knative:master Jul 23, 2019
@taragu taragu deleted the fix-service-routesready-unknown branch November 12, 2019 16:03
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. area/API API objects and controllers area/networking area/test-and-release It flags unit/e2e/conformance/perf test issues for product features cla: yes Indicates the PR's author has signed the CLA. 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.

Service's RoutesReady is 'Unknown' when Route's Ready is 'False'

8 participants