Skip to content

Conversation

@kemaldev
Copy link
Contributor

At least partly related to #885.

For specific information about the issues this PR fixes read: #885 (comment)

I am not very happy about having to filter on the activity description since this may be bound to change on AWS side whenever they want. However, we don't have any activityType field we can use and the only way we can differentiate activities is on the description right now. I might've also missed some descriptions that I haven't seen with my curent ASG-setup and from my searches I haven't found a list of possible combinations in the AWS docs.

Therefore I've only targeted the activity descriptions I've seen from my side that are related to launching/terminating instances in/from warm-pools. This way we only ignore warm-pool events, preventing other unknown activities from being affected by these changes. If the description would change for some reason the worst thing that can happen is that we wait for these activities again, so I suppose this could be acceptable.

In some cases some people would want to wait for these warm-pool events as well perhaps, so maybe it should be a configurable option?

@kemaldev kemaldev requested review from a team as code owners August 21, 2025 10:28
@hashicorp-cla-app
Copy link

hashicorp-cla-app bot commented Aug 21, 2025

CLA assistant check
All committers have signed the CLA.

@kemaldev kemaldev closed this Aug 21, 2025
@kemaldev kemaldev reopened this Nov 3, 2025
@tgross tgross moved this from Needs Triage to In Progress in Nomad - Community Issues Triage Dec 4, 2025
@tgross tgross requested a review from jrasell December 4, 2025 19:30
Copy link
Member

@jrasell jrasell left a comment

Choose a reason for hiding this comment

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

Hi @kemaldev and thanks for raising this PR.

I just wanted to check my logic around warm pools as I don't have practical experience using them. From the descriptions you have given and the documentation on AWS that I have written, it seems that when the ASG has an associated warm pool, the describe scaling activities for the ASG will include both ASG and warm pool events? If so, this looks like a great fix to avoid having warm pool events block scaling of your ASG and makes total sense.

Overall the approach makes sense and while the string matching is unfortunate, it doesn't look like there is a better approach currently. Do you mind adding a changelog entry too? It would also be nice to have a small test to cover the warmPoolActivity function if possible, so any changes to functionality don't break this check.

I do wonder in what situations an operator would want to block ASG scaling due to warm pool events. I think it's therefore OK to ignore by default, and we can add a config parameter in the future if there is need.

@jrasell jrasell self-assigned this Dec 5, 2025
@kemaldev
Copy link
Contributor Author

kemaldev commented Dec 5, 2025

Hi @jrasell

Yes, you got it right. The scaling activities will include both ASG and warm pool events.

I'll add a changelog entry and a test as soon as I get the time.

@kemaldev kemaldev force-pushed the fix/aws-target-asg-events branch from 2d05788 to cede98a Compare December 5, 2025 18:58
@kemaldev
Copy link
Contributor Author

kemaldev commented Dec 5, 2025

@jrasell I've added some unit tests and a changelog entry now, let me know if you think something is missing.

Copy link
Member

@jrasell jrasell left a comment

Choose a reason for hiding this comment

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

LGTM, thanks @kemaldev!

@jrasell jrasell merged commit cf5cb8e into hashicorp:main Dec 8, 2025
19 checks passed
@github-project-automation github-project-automation bot moved this from In Progress to Done in Nomad - Community Issues Triage Dec 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

2 participants