GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Fix #16260: Allow unreachable revisions with initialScale > 1 to scale to 0 by aviralgarg05 · Pull Request #16327 · knative/serving

Conversation

@aviralgarg05

@aviralgarg05 aviralgarg05 commented Jan 7, 2026 •
edited by dprotaso
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Revisions with initialScale > 1 that are no longer referenced by any Route (routingState = 'reserve', mapped to Reachability = Unreachable) were previously unable to scale down to 0, causing resource waste when old revisions were replaced by new ones.

This change modifies the initialScale logic in scaler.go to ignore the initialScale constraint when a revision's Reachability is Unreachable. This allows revisions in reserve state to scale down to 0 immediately, freeing up resources promptly when they are no longer needed.

The fix adds a check for pa.Spec.Reachability != ReachabilityUnreachable before applying the initialScale constraint, ensuring that:

  • Revisions with routingState = 'reserve' can scale down to 0 immediately
  • The initialScale logic only applies to revisions that are still referenced by Routes (routingState = 'active')
  • Resources are freed promptly when old revisions are replaced

A new test case has been added to verify the behavior: revisions with initialScale > 1 and Reachability = Unreachable can now scale to 0.

Fixes #16260

Proposed Changes

Release Note

Allow unreachable revisions with initialScale > 1 to scale to 0

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@aviralgarg05
Fix knative#16260: Allow unreachable revisions with initialScale > 1 …
acd430d
…to scale to 0

Revisions with initialScale > 1 that are no longer referenced by any
Route (routingState = 'reserve', mapped to Reachability = Unreachable)
were previously unable to scale down to 0, causing resource waste when
old revisions were replaced by new ones.

This change modifies the initialScale logic in scaler.go to ignore the
initialScale constraint when a revision's Reachability is Unreachable.
This allows revisions in reserve state to scale down to 0 immediately,
freeing up resources promptly when they are no longer needed.

The fix adds a check for pa.Spec.Reachability != ReachabilityUnreachable
before applying the initialScale constraint, ensuring that:
- Revisions with routingState = 'reserve' can scale down to 0 immediately
- The initialScale logic only applies to revisions that are still
  referenced by Routes (routingState = 'active')
- Resources are freed promptly when old revisions are replaced

A new test case has been added to verify the behavior: revisions with
initialScale > 1 and Reachability = Unreachable can now scale to 0.

Fixes knative#16260
@knative-prow
knative-prow Bot requested review from dsimansk and skonto January 7, 2026 13:55
@knative-prow

knative-prow Bot commented Jan 7, 2026

Copy link
Copy Markdown

Welcome @aviralgarg05! It looks like this is your first PR to knative/serving 🎉

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@knative-prow

knative-prow Bot commented Jan 7, 2026

Copy link
Copy Markdown

Hi @aviralgarg05. Thanks for your PR.

I'm waiting for a github.com member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@knative-prow knative-prow Bot added needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Jan 7, 2026
@dprotaso

dprotaso commented Jan 18, 2026

Copy link
Copy Markdown
Member

/ok-to-test

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@knative-prow knative-prow Bot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Jan 18, 2026
@codecov

codecov Bot commented Jan 18, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 80.14%. Comparing base (09e59ec) to head (acd430d).
⚠️ Report is 27 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #16327      +/-   ##
==========================================
+ Coverage   80.11%   80.14%   +0.03%     
==========================================
  Files         215      216       +1     
  Lines       13391    13422      +31     
==========================================
+ Hits        10728    10757      +29     
+ Misses       2304     2298       -6     
- Partials      359      367       +8     

☔ 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.
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@dprotaso

dprotaso commented Jan 21, 2026

Copy link
Copy Markdown
Member

/lgtm
/approve

thanks for the change!

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@knative-prow knative-prow Bot assigned dprotaso Jan 21, 2026
@knative-prow knative-prow Bot added the lgtm Indicates that a PR is ready to be merged. label Jan 21, 2026
@knative-prow

knative-prow Bot commented Jan 21, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: aviralgarg05, dprotaso

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:
  • OWNERS [dprotaso]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@knative-prow knative-prow Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 21, 2026
@knative-prow
knative-prow Bot merged commit bc80471 into knative:main Jan 21, 2026
85 checks passed

Uh oh!

There was an error while loading. Please reload this page.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@dsimansk dsimansk Awaiting requested review from dsimansk
@skonto skonto Awaiting requested review from skonto

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@dprotaso dprotaso

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. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Revisions with initialScale > 1 that are no longer referenced by any Route cannot scale down to 0

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@aviralgarg05 @dprotaso
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.