Skip to content

Conversation

@mikkeloscar
Copy link
Contributor

This fixes a bug where the logic for adjusting scheduled scaling when the change is less than 10% didn't deal with fractions (mili values) correctly.

Example:

Scaling Schedule had the target value of: 7875
HPA had the current number of replicas: 637
target on the HPA: 11720m == 11.72

With this the expected number of replicas would be: ceil(7875/11.72) = 672, a change of 0.0548 which is within the default 0.1 toleration, such that the adjuster should kick in.

However, due to the bug, the target value 11.72 was rounded off to 11 in the calculation such that the expected number of replicas was ceil(7875/11) = 716 which is a change of 0.1239, above the default 0.1 toleration, so the adjuster assumed the HPA would scale.

The fix is to correctly convert the target to a float not loosing the decimals.

@mikkeloscar mikkeloscar added the bugfix Bug fixes and patches, e.g. fixing of a production issue that is affecting the customer experience. label Nov 26, 2025
@zalando-robot
Copy link

Deployment Checklist

This change falls under the deployment policy.

💁 Since Nov 10th, we are in the RED deployment zone. This means all changes released to production must adhere to the following requirements:

  • Detailed release notes are provided in this PR’s description.
  • Thorough load-testing has been performed, and is documented in the description/comment.
  • You can enable/disable the change via feature toggles, and have confirmed these toggles work as expected.
  • Technical review: A Principal Engineer, Engineering Manager or Head of Engineering have green-lit your changes, and the reviewer is named in the description/comments.
  • Application Owner (Director+) approval is given about the PR, and the approver is named in the description/comments.

👉 Regardless of which boxes you click in this comment, merge/deployment will not be blocked.
Adherence to the deployment policy, which includes mandatory production approval, is required for ALL applications running in the production environment, regardless of their Cyber-Week relevance.

@mikkeloscar
Copy link
Contributor Author

👍

1 similar comment
@tcondeixa
Copy link

👍

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

Labels

bugfix Bug fixes and patches, e.g. fixing of a production issue that is affecting the customer experience.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants