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

job_hooks: add implicit constraint when using Consul for services. #12602

Merged
merged 3 commits into from
Apr 20, 2022

Conversation

jrasell
Copy link
Member

@jrasell jrasell commented Apr 19, 2022

This change adds an implicit constraint to task groups which utilise Consul for service registration. This matches the behaviour when using the Nomad provider. The change also refactors the mutator function so we only loop through the task groups once, no matter how many constraint mutators we have.

The first commit adds tests to cover the mutator functionality; this can be used to ensure the functionality of the refactor has not regressed.

Other tests needed slight changes, to accommodate this new feature.

closes #11471

@jrasell jrasell self-assigned this Apr 19, 2022
Copy link
Member

@shoenig shoenig left a comment

Choose a reason for hiding this comment

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

This is excellent @jrasell, the refactoring is much easier to follow!

@jrasell jrasell merged commit 8eb569f into main Apr 20, 2022
@jrasell jrasell deleted the f-gh-11471 branch April 20, 2022 12:09
@github-actions
Copy link

I'm going to lock this pull request because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active contributions.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 16, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add automatic Consul constraint for Nomad jobs that depend on Consul
2 participants