Skip to content

Conversation

@Andyz26
Copy link
Collaborator

@Andyz26 Andyz26 commented Dec 1, 2025

Some users would like to have the scaler cooldown period applied when the job starts (especially when they use custom scaler rules to change the scaler config) to avoid a scaling decision made right after new scaler is created.

  • Make default behavior on job auto scaler to apply the cooldown at the beginning of the scaler instance.
  • Make existing tests to override init cooldown setting.

@Andyz26 Andyz26 requested a deployment to Integrate Pull Request December 1, 2025 23:05 — with GitHub Actions Waiting
@github-actions
Copy link

github-actions bot commented Dec 1, 2025

Test Results

661 tests  ±0   650 ✅ ±0   9m 16s ⏱️ +15s
152 suites ±0    11 💤 ±0 
152 files   ±0     0 ❌ ±0 

Results for commit 5723ef9. ± Comparison against base commit 4862c9b.

Comment on lines +546 to +549
boolean applyInitialCooldown = Boolean.parseBoolean(
Optional.ofNullable(MantisProperties.getProperty(SystemParameters.JOB_AUTOSCALE_APPLY_INITIAL_COOLDOWN_PARAM))
.orElse("true"));
this.lastScaledAt = applyInitialCooldown ? System.currentTimeMillis() : 0L;
Copy link
Collaborator

Choose a reason for hiding this comment

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

can you update description to add context of why do we need this cooldown at the init?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

updated desc


boolean applyInitialCooldown = Boolean.parseBoolean(
Optional.ofNullable(MantisProperties.getProperty(SystemParameters.JOB_AUTOSCALE_APPLY_INITIAL_COOLDOWN_PARAM))
.orElse("true"));
Copy link
Collaborator

Choose a reason for hiding this comment

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

Defaulting to true means we change the behavior for existing users, right?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

yeah that's the intention and i don't think it should cause impact on regular jobs.

@Andyz26 Andyz26 merged commit dfb4ed1 into master Dec 2, 2025
4 of 5 checks passed
@Andyz26 Andyz26 deleted the andyz/scalerInitCooldown branch December 2, 2025 22:05
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.

4 participants