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

Fix LatestReadyRevision semantics - it only advances forward #13239

Merged
merged 4 commits into from
Sep 14, 2022

Conversation

dprotaso
Copy link
Member

@dprotaso dprotaso commented Aug 23, 2022

Fixes #12538 #12078

Proposed Changes

  • Configuration traffic targets now check Revision readiness
  • ConfigurationStatus.LatesReadyRevision will only advance forward
  • This excludes the case where users bring BYO Revision name

From commit message

The search for latest ready revision (LLR) looked at each revision's
configurationGeneration label to search for a new candidate.

Only Revisions with a configurationGeneration in a certain range were
considered. Prior this inclusive range was [LLR.generation, config.generation].

The lower bound was incorrect and it should actually be LLR.configGeneration.
Otherwise LLR generation is fairly low the the set of revisions to consider
would be quite large for really old Configurations.

Release Note

Fix LatestReadyRevision semantics so it only advances forward. When a Revision fails the Configuration & Route will no longer fall back to older revision. The exception is when you rollback to a Revision that is explicitly named.

The search for latest ready revision (LLR) looked at each revision's
configurationGeneration label to search for a new candidate.

Only Revisions with a configurationGeneration in a certain range were
considered. Prior this inclusive range was [LLR.generation, config.generation].

The lower bound was incorrect and it should actually be LLR.configGeneration.
Otherwise LLR generation is fairly low the the set of revision to consider
would be quite large for really old Configurations.
@knative-prow knative-prow bot added area/API API objects and controllers area/networking approved Indicates a PR has been approved by an approver from all required OWNERS files. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Aug 23, 2022
@codecov
Copy link

codecov bot commented Aug 23, 2022

Codecov Report

Base: 86.56% // Head: 86.48% // Decreases project coverage by -0.08% ⚠️

Coverage data is based on head (272e51e) compared to base (2a72beb).
Patch coverage: 84.84% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #13239      +/-   ##
==========================================
- Coverage   86.56%   86.48%   -0.09%     
==========================================
  Files         196      196              
  Lines       14505    14544      +39     
==========================================
+ Hits        12556    12578      +22     
- Misses       1650     1666      +16     
- Partials      299      300       +1     
Impacted Files Coverage Δ
pkg/reconciler/configuration/configuration.go 82.93% <83.33%> (-0.74%) ⬇️
pkg/reconciler/route/traffic/traffic.go 92.55% <100.00%> (+0.08%) ⬆️
pkg/queue/sharedmain/main.go 0.61% <0.00%> (-0.01%) ⬇️
cmd/activator/main.go 0.00% <0.00%> (ø)
pkg/apis/config/defaults.go 85.24% <0.00%> (+0.76%) ⬆️
pkg/http/handler/timeout.go 84.76% <0.00%> (+1.32%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@dprotaso
Copy link
Member Author

Looks like BYO revision name has a broken edge case

@dprotaso
Copy link
Member Author

/hold for after 1.7

@knative-prow knative-prow bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Aug 23, 2022
This is required to support git revert in combination with a Knative
Service that has latestRevision: true in their Route traffic block
@knative-prow knative-prow bot added the area/test-and-release It flags unit/e2e/conformance/perf test issues for product features label Sep 12, 2022
@knative-prow
Copy link

knative-prow bot commented Sep 12, 2022

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dprotaso

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@knative-prow knative-prow bot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Sep 12, 2022
Prior the conditional was not correct and the generation was not part of
the selector. Also made sure the unit test failed prior to applying the
fix.
@dprotaso
Copy link
Member Author

/assign @psschwei @nader-ziada

@dprotaso
Copy link
Member Author

/hold cancel

@knative-prow knative-prow bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Sep 14, 2022
@nader-ziada
Copy link
Member

/lgtm

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 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.

When using a preemptible node pool, preemption events cause rollback to previous revision
3 participants