Skip to content

Conversation

@nader-ziada
Copy link
Member

add initialize conditions to MakePA to avoid potential race conditions
between revision and autoscaler

Fixes #16036

Proposed Changes

  • Add initializeConditions in MakePA to avoid any potential race conditions

@knative-prow knative-prow bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Aug 21, 2025
@knative-prow knative-prow bot requested review from dprotaso, gauron99 and skonto August 21, 2025 15:47
@codecov
Copy link

codecov bot commented Aug 21, 2025

Codecov Report

❌ Patch coverage is 0% with 18 lines in your changes missing coverage. Please review.
✅ Project coverage is 80.06%. Comparing base (961ce6a) to head (efd0538).
⚠️ Report is 13 commits behind head on main.

Files with missing lines Patch % Lines
pkg/reconciler/testing/v1/factory.go 0.00% 18 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #16037      +/-   ##
==========================================
- Coverage   80.20%   80.06%   -0.14%     
==========================================
  Files         214      214              
  Lines       16892    16910      +18     
==========================================
- Hits        13548    13539       -9     
- Misses       2983     3011      +28     
+ Partials      361      360       -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.

@knative-prow knative-prow bot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Aug 21, 2025
@nader-ziada
Copy link
Member Author

/test istio-latest-no-mesh

@knative-prow knative-prow bot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Aug 28, 2025
@dprotaso
Copy link
Member

@nader-ziada PTAL - I pushed a change where I was able to move the kubebuilder tag deeper into the status.

@nader-ziada
Copy link
Member Author

@nader-ziada PTAL - I pushed a change where I was able to move the kubebuilder tag deeper into the status.

looks good, i kind of tried something similar to that, but got issues when deploying knative on the cluster, if this works, its cleaner

@dprotaso
Copy link
Member

I think we want this change - though I'm wondering if we should just default only Ready=Unknown and not the subconditions.

I had a follow up question here: #16036 (comment)

@nader-ziada
Copy link
Member Author

/test istio-latest-no-mesh

@nader-ziada
Copy link
Member Author

I think we want this change - though I'm wondering if we should just default only Ready=Unknown and not the subconditions.

I had a follow up question here: #16036 (comment)

replied on issue, according to my understanding here: https://github.com/knative/serving/blob/main/pkg/reconciler/revision/reconcile_resources.go#L195

@nader-ziada
Copy link
Member Author

/retest

@nader-ziada
Copy link
Member Author

@dprotaso


I think this is still needed because in some failure cases, the pa is nil

@nader-ziada
Copy link
Member Author

/retest

@dprotaso
Copy link
Member

dprotaso commented Sep 3, 2025

I think we should following Gateway API and on CREATE default the reason and message to

reason:"Pending"
message:"Waiting for controller"

'Deploying' makes it seem like we've taken action on it when we have not. The above makes it clear that it still needs to be reconciled.

manager := condSet.Manage(&pa.Status)

// Set each condition to Unknown with "Deploying" reason to match kubebuilder defaults
manager.MarkUnknown(autoscalingv1alpha1.PodAutoscalerConditionActive, "Deploying", "")
Copy link
Member

Choose a reason for hiding this comment

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

Can we update this to?

I'm surprised we didn't need to change this

Copy link
Member Author

Choose a reason for hiding this comment

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

i'll fix that, will probably need tests fixing as well

Copy link
Member Author

Choose a reason for hiding this comment

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

done. PTAL

@dprotaso
Copy link
Member

dprotaso commented Sep 8, 2025

/lgtm
/approve

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

knative-prow bot commented Sep 8, 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

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

dprotaso commented Sep 8, 2025

/retest

@knative-prow knative-prow bot merged commit 12777f6 into knative:main Sep 8, 2025
69 checks passed
dprotaso added a commit to dprotaso/serving that referenced this pull request Sep 9, 2025
knative-prow bot pushed a commit that referenced this pull request Sep 9, 2025
@nader-ziada
Copy link
Member Author

follow up here: #16078

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/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Potential race condition in PodAutoscaler creation

2 participants