Skip to content

Fix minscale on deploy#7214

Merged
knative-prow-robot merged 4 commits intoknative:masterfrom
tanzeeb:fix-minscale-on-deploy
Mar 13, 2020
Merged

Fix minscale on deploy#7214
knative-prow-robot merged 4 commits intoknative:masterfrom
tanzeeb:fix-minscale-on-deploy

Conversation

@tanzeeb
Copy link
Copy Markdown
Contributor

@tanzeeb tanzeeb commented Mar 11, 2020

Fixes #6935

Same root cause as #6733, but for brand new routes which do not have a status.traffic yet.

Proposed Changes

  • Add route labels to all revisions and configurations listen in both the .spec.traffic and .status.traffic of a Route.

Release Note

Fixes bug with new minScale revisions, where containers are created, then destroyed, then created again.

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

Same root cause as #6733, but for brand new routes which do not have a status.traffic yet.

Proposed Changes

  • Add route labels to all revisions and configurations listen in both the .spec.traffic and .status.traffic of a Route.

Release Note

Fixes bug with new minScale revisions, where containers are created, then destroyed, then created again.

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.

@tanzeeb
Copy link
Copy Markdown
Contributor Author

tanzeeb commented Mar 11, 2020

/assign @mattmoor @vagababov
/cc @duglin

@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 11, 2020
Copy link
Copy Markdown
Contributor

@markusthoemmes markusthoemmes left a comment

Choose a reason for hiding this comment

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

Looks good on the surface but I'm by no means an expert in the layering of these controllers. Others will be better suited.

This looks like it was a pain to dig down into though, so thanks for doing that @tanzeeb

Comment thread pkg/reconciler/labeler/labels.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.

Looks good to me.
But yea, I'll let Matt approve :)

Comment thread pkg/reconciler/labeler/labels.go Outdated
@duglin
Copy link
Copy Markdown

duglin commented Mar 12, 2020

FYI - just tested it and it did fix my issue ! :-)

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 13, 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 approved Indicates a PR has been approved by an approver from all required OWNERS files. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels Mar 13, 2020
@tanzeeb tanzeeb force-pushed the fix-minscale-on-deploy branch from 6187886 to df128b4 Compare March 13, 2020 13:25
@knative-prow-robot knative-prow-robot removed lgtm Indicates that a PR is ready to be merged. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels Mar 13, 2020
@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.2% 89.7% 0.6

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.

/lgtn

@mattmoor
Copy link
Copy Markdown
Member

ugh
/lgtm

need ☕️

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

The following jobs failed:

Test name Triggers Retries
pull-knative-serving-integration-tests pull-knative-serving-integration-tests
pull-knative-serving-integration-tests
2/3

Automatically retrying due to test flakiness...
/test pull-knative-serving-integration-tests

@knative-prow-robot knative-prow-robot merged commit 3c69fef into knative:master Mar 13, 2020
@markusthoemmes
Copy link
Copy Markdown
Contributor

@mattmoor Shall we backport this into 0.13?

markusthoemmes pushed a commit to markusthoemmes/knative-serving that referenced this pull request Mar 16, 2020
* Test minscale stability when configuration is created

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

* Inline condition

* Inline owner reference check
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.

minScale causes pods to be killed during deploy

9 participants