Skip to content

Add route label to LatestCreatedRevision#7110

Merged
knative-prow-robot merged 8 commits intoknative:masterfrom
tanzeeb:fix-minscale-flappyness
Mar 9, 2020
Merged

Add route label to LatestCreatedRevision#7110
knative-prow-robot merged 8 commits intoknative:masterfrom
tanzeeb:fix-minscale-flappyness

Conversation

@tanzeeb
Copy link
Copy Markdown
Contributor

@tanzeeb tanzeeb commented Mar 2, 2020

Fixes #6733

Proposed Changes

  • Add additional scenarios to the MinScale e2e tests to check minScale during the update of a configuration.
  • Add a route label to the LatestCreatedRevision. This ensures continuity of a reachable revision when a configuration is updated.

Release Note

The `LatestCreatedRevision` of a Configuration will now have a route label. Fixes issue where a Revision's pods are temporarily scaled below `minScale` after the Revision becomes ready.

@googlebot googlebot added the cla: yes Indicates the PR's author has signed the CLA. label Mar 2, 2020
@knative-prow-robot knative-prow-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Mar 2, 2020
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.

@tanzeeb: 0 warnings.

Details

In response to this:

Fixes #6733

Proposed Changes

  • Add additional scenarios to the MinScale e2e tests to check minScale during the update of a configuration.
  • Add a route label to the LatestCreatedRevision. This ensures continuity of a reachable revision when a configuration is updated.

Release Note

The `LatestCreatedRevision` of a Configuration will now have a route label. Fixes issue where a Revision's pods are temporarily scaled below `minScale` after the Revision becomes ready.

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 area/test-and-release It flags unit/e2e/conformance/perf test issues for product features labels Mar 2, 2020
@tanzeeb
Copy link
Copy Markdown
Contributor Author

tanzeeb commented Mar 2, 2020

/assign @vagababov

cc @duglin @patrickshan

Copy link
Copy Markdown
Contributor

@vagababov vagababov left a comment

Choose a reason for hiding this comment

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

Comment thread pkg/reconciler/labeler/controller.go Outdated
Comment thread pkg/reconciler/labeler/labels.go Outdated
Comment thread test/e2e/minscale_readiness_test.go Outdated
Comment thread test/e2e/minscale_readiness_test.go Outdated
Comment thread test/e2e/minscale_readiness_test.go Outdated
Comment thread test/e2e/minscale_readiness_test.go Outdated
Copy link
Copy Markdown
Contributor

@vagababov vagababov left a comment

Choose a reason for hiding this comment

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

Overall makes sense to me.
I don't know labeler very much, so I'll leave Matt to approve
/assign @mattmoor
/lgtm

@knative-prow-robot knative-prow-robot added the lgtm Indicates that a PR is ready to be merged. label Mar 4, 2020
Comment thread pkg/reconciler/labeler/labels.go Outdated
Comment thread pkg/reconciler/labeler/controller.go Outdated
@tanzeeb tanzeeb force-pushed the fix-minscale-flappyness branch from 24ef148 to 35aa45e Compare March 5, 2020 22:34
@knative-prow-robot knative-prow-robot removed the lgtm Indicates that a PR is ready to be merged. label Mar 5, 2020
@knative-test-reporter-robot
Copy link
Copy Markdown

The following jobs failed:

Test name Triggers Retries
pull-knative-serving-autotls-tests 0/3

Failed non-flaky tests preventing automatic retry of pull-knative-serving-autotls-tests:

_go_tests.DataRaceAnalysis
test/e2e/autotls.Failure

Comment thread pkg/reconciler/labeler/controller.go
Comment thread pkg/reconciler/labeler/labels.go Outdated
Comment thread pkg/reconciler/labeler/labeler_test.go
Comment thread pkg/reconciler/labeler/labels.go Outdated
@tanzeeb
Copy link
Copy Markdown
Contributor Author

tanzeeb commented Mar 7, 2020

/assign @mattmoor

Comment thread pkg/reconciler/labeler/labels.go Outdated
// If we are tracking the latest revision, we need to label the latest created revision
// as well so that there is a smooth transition when the new revision becomes ready.
if tt.LatestRevision != nil && *tt.LatestRevision {
revisions.Insert(config.Status.LatestCreatedRevisionName)
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.

@vagababov @markusthoemmes it is tempting to also label the LCR with the LRR in this case so that the KPA gets a hint about how big to make the LCR before it is receiving traffic 🤔

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.

(not for this PR)

Comment thread pkg/reconciler/labeler/labels.go Outdated
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, this looks about right. Couple nits, but otherwise 👍

@knative-metrics-robot
Copy link
Copy Markdown

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

File Old Coverage New Coverage Delta
pkg/reconciler/labeler/labels.go 89.9% 89.2% -0.7

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.

/lgtm
/approve

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

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: mattmoor, tanzeeb

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 Mar 9, 2020
@knative-prow-robot knative-prow-robot merged commit b260b2b into knative:master Mar 9, 2020
markusthoemmes pushed a commit to markusthoemmes/knative-serving that referenced this pull request Mar 16, 2020
* Test minScale during update to configuration

* Add route label to LatestCreatedRevision

* Use impl.Enqueue instead of tracker.OnChanged in labeler reconciler

* Update minscale readiness e2e test

* faster polling (250 ms)
* more descriptive error for ensureDesiredScale
* inlined latestCreatedRevisionName check

* Enqueue route instead of config in labeler reconciler

* Only label configurations of RunLatest traffic targets

* Label configuration if it or it's revision is in a route

* Only pull config for runLatest in labeler
knative-prow-robot pushed a commit that referenced this pull request Mar 17, 2020
* Add route label to `LatestCreatedRevision` (#7110)

* Test minScale during update to configuration

* Add route label to LatestCreatedRevision

* Use impl.Enqueue instead of tracker.OnChanged in labeler reconciler

* Update minscale readiness e2e test

* faster polling (250 ms)
* more descriptive error for ensureDesiredScale
* inlined latestCreatedRevisionName check

* Enqueue route instead of config in labeler reconciler

* Only label configurations of RunLatest traffic targets

* Label configuration if it or it's revision is in a route

* Only pull config for runLatest in labeler

* Some cleanups in the e2e test (#7193)

* Some cleanups in the e2e test

* Some cleanups in the e2e test

* fix nit

* Simplify minscale test. (#7235)

The only error returned from the function is when we fail to actually verify the scale.
So return boolean instead.

* Fix minscale on deploy (#7214)

* Test minscale stability when configuration is created

* Check both .spec.traffic and .status.traffic for resources to label

* Inline condition

* Inline owner reference check

Co-authored-by: Tanzeeb Khalili <tkhalili@pivotal.io>
Co-authored-by: Victor Agababov <vagababov@gmail.com>
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/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. 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.

Autoscaler with minScale specified momentarily scaled below minScale

7 participants