Navigation Menu

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

Move activator count computation into KPA #11375

Merged
merged 3 commits into from May 25, 2021

Conversation

markusthoemmes
Copy link
Contributor

Fixes #11373

Proposed Changes

See the above issue for further infromation. Changes the default to 2 rather than all, which should be correct in most cases anyway as the autoscaler would immediately set it to 2 in most cases anyway.

Release Note

Fixed a bug where traffic would briefly be routed 'wrong', leading to errors due to exceeded queues in deployments with a large activator count and a low service pod count.

/assign @julz @vagababov

@google-cla google-cla bot added the cla: yes Indicates the PR's author has signed the CLA. label May 19, 2021
@knative-prow-robot knative-prow-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. area/API API objects and controllers area/autoscale labels May 19, 2021
@markusthoemmes
Copy link
Contributor Author

/hold

For a bit of discussion I just posted #11373 (comment)

@knative-prow-robot knative-prow-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label May 19, 2021
@codecov
Copy link

codecov bot commented May 19, 2021

Codecov Report

Merging #11375 (2e946a5) into main (1b2b759) will increase coverage by 0.02%.
The diff coverage is 87.50%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main   #11375      +/-   ##
==========================================
+ Coverage   87.68%   87.71%   +0.02%     
==========================================
  Files         191      191              
  Lines        9219     9224       +5     
==========================================
+ Hits         8084     8091       +7     
+ Misses        880      879       -1     
+ Partials      255      254       -1     
Impacted Files Coverage Δ
pkg/autoscaler/scaling/multiscaler.go 89.09% <ø> (+1.48%) ⬆️
pkg/reconciler/autoscaling/kpa/kpa.go 95.04% <85.71%> (+0.30%) ⬆️
pkg/autoscaler/scaling/autoscaler.go 97.77% <100.00%> (-0.11%) ⬇️
pkg/reconciler/domainmapping/reconciler.go 91.54% <0.00%> (-0.99%) ⬇️
pkg/reconciler/configuration/configuration.go 88.28% <0.00%> (+1.56%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1b2b759...2e946a5. Read the comment docs.

@knative-prow-robot knative-prow-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels May 21, 2021
@markusthoemmes markusthoemmes changed the title Use 2 activators by default rather than all Move activator count computation into KPA May 21, 2021
@markusthoemmes markusthoemmes changed the title Move activator count computation into KPA WIP: Move activator count computation into KPA May 21, 2021
@knative-prow-robot knative-prow-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label May 21, 2021
Copy link
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.

/lgtm

@knative-prow-robot knative-prow-robot added the lgtm Indicates that a PR is ready to be merged. label May 24, 2021
@knative-prow-robot knative-prow-robot removed the lgtm Indicates that a PR is ready to be merged. label May 25, 2021
@markusthoemmes markusthoemmes changed the title WIP: Move activator count computation into KPA Move activator count computation into KPA May 25, 2021
@knative-prow-robot knative-prow-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label May 25, 2021
@markusthoemmes
Copy link
Contributor Author

/unhold

@knative-prow-robot knative-prow-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label May 25, 2021
Copy link
Member

@julz julz left a comment

Choose a reason for hiding this comment

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

pretty much looks great to me! I might well be wrong, but if Im reading kpa_test right I think we're missing coverage for the two cases (0, -1) where TargetBurstCapacity isn't a positive number, (if so) worth adding those?

@markusthoemmes
Copy link
Contributor Author

Thanks @julz. Added a targeted unit test just for the computation function to make the cases a bit clearer.

Copy link
Member

@julz julz left a comment

Choose a reason for hiding this comment

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

/lgtm

@knative-prow-robot knative-prow-robot added the lgtm Indicates that a PR is ready to be merged. label May 25, 2021
@knative-prow-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: julz

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-robot knative-prow-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label May 25, 2021
@knative-prow-robot knative-prow-robot merged commit 3afc6e4 into knative:main May 25, 2021
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/autoscale 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.

Traffic is briefly routed suboptimally when new Revision becomes ready
4 participants