Skip to content

Conversation

jorgemarey
Copy link
Contributor

Autoscaler tries to scale even when dry-run is configured. This happens when the current count is out of the range of the configured min/max. Currently the dry-run check is performed after this checks are executed.

return w.scaleTarget(logger, target, eval.Policy, action, currentStatus)

This PR moves the dry-run check to inside the scaleTarget method so every scaling action goes through the check.

Copy link
Contributor

@lgfa29 lgfa29 left a comment

Choose a reason for hiding this comment

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

Thanks @jorgemarey!

I have a vague memory of maybe doing this on purpose to always enforce the min/max values, but thinking about it again it doesn't make sense to bypass the dry-run mode.

@lgfa29 lgfa29 merged commit 147c6be into hashicorp:main Feb 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants