Skip to content

Conversation

@nader-ziada
Copy link
Member

Fixes #16036

Proposed Changes

  • setting the annotation before creating the PA eliminating the race condition

…e condition

setting the annotation before creating the PA eliminating the race condition
@knative-prow knative-prow bot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Oct 10, 2025
@codecov
Copy link

codecov bot commented Oct 10, 2025

Codecov Report

❌ Patch coverage is 72.72727% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 80.08%. Comparing base (7bcc27e) to head (b8dc14e).
⚠️ Report is 10 commits behind head on main.

Files with missing lines Patch % Lines
pkg/reconciler/revision/cruds.go 72.72% 2 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #16141      +/-   ##
==========================================
- Coverage   80.08%   80.08%   -0.01%     
==========================================
  Files         214      214              
  Lines       16932    16943      +11     
==========================================
+ Hits        13560    13568       +8     
- Misses       3014     3016       +2     
- Partials      358      359       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@dprotaso
Copy link
Member

Ah this makes more sense - without the annotation (from default) the PA wouldn't be reconciled.

/lgtm
/approve

@knative-prow knative-prow bot added the lgtm Indicates that a PR is ready to be merged. label Oct 14, 2025
@knative-prow
Copy link

knative-prow bot commented Oct 14, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dprotaso, nader-ziada

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 the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Oct 14, 2025
@dprotaso
Copy link
Member

dprotaso commented Oct 14, 2025

/hold for a quick change

@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 Oct 14, 2025
if pa.Annotations == nil {
pa.Annotations = make(map[string]string)
}
if _, ok := pa.Annotations["autoscaling.knative.dev/class"]; !ok && cfg.Autoscaler.PodAutoscalerClass != "" {
Copy link
Member

Choose a reason for hiding this comment

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

I'm assuming we have a constant somewhere for autoscaling.knative.dev/class

Copy link
Member Author

Choose a reason for hiding this comment

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

good catch, sorry I missed that originally, updated.

@knative-prow knative-prow bot removed the lgtm Indicates that a PR is ready to be merged. label Oct 14, 2025
@dprotaso
Copy link
Member

/hold cancel
/lgtm

@knative-prow knative-prow bot added lgtm Indicates that a PR is ready to be merged. and removed do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. labels Oct 14, 2025
@knative-prow knative-prow bot merged commit 93ea130 into knative:main Oct 14, 2025
90 checks passed
nader-ziada added a commit to nader-ziada/serving that referenced this pull request Oct 15, 2025
…ative#16141)

* Fix: PodAutoscaler not reconciled due to missing class annotation race condition

setting the annotation before creating the PA eliminating the race condition

* use constant for autoscaling.knative.dev/class
openshift-merge-bot bot pushed a commit to openshift-knative/serving that referenced this pull request Oct 15, 2025
…ative#16141) (#1609)

* Fix: PodAutoscaler not reconciled due to missing class annotation race condition

setting the annotation before creating the PA eliminating the race condition

* use constant for autoscaling.knative.dev/class
@nader-ziada
Copy link
Member Author

/cherry-pick release-1.19
/cherry-pick release-1.18

@knative-prow-robot
Copy link
Contributor

@nader-ziada: new pull request created: #16190

In response to this:

/cherry-pick release-1.19
/cherry-pick release-1.18

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-sigs/prow repository.

@knative-prow-robot
Copy link
Contributor

@nader-ziada: new pull request created: #16191

In response to this:

/cherry-pick release-1.19
/cherry-pick release-1.18

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-sigs/prow repository.

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. lgtm Indicates that a PR is ready to be merged. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Potential race condition in PodAutoscaler creation

3 participants