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

Backport of allocrunner: provide factory function so we can build mock ARs into release/1.4.x #17173

Merged

Conversation

hc-github-team-nomad-core
Copy link
Contributor

Backport

This PR is auto-generated from #17161 to be assessed for backporting due to the inclusion of the label backport/1.4.x.

WARNING automatic cherry-pick of commits failed. Commits will require human attention.

The below text is copied from the body of the original PR.


Tools like the nomad-nodesim are unable to implement a minimal implementation of an allocrunner so that we can test the client communication without having to lug around the entire allocrunner/taskrunner code base. The allocrunner was implemented with an interface specifically for this purpose, but there were circular imports that made it challenging to use in practice.

Move the AllocRunner interface into an inner package and provide a factory function type. Provide a minimal test that exercises the new function so that consumers have some idea of what the minimum implementation required is.

@hc-github-team-nomad-core hc-github-team-nomad-core force-pushed the backport/mock-allocrunner/arguably-pretty-werewolf branch 2 times, most recently from ebb5fd4 to d12d0f2 Compare May 12, 2023 17:30
@hashicorp-cla
Copy link

hashicorp-cla commented May 12, 2023

CLA assistant check
All committers have signed the CLA.

Tools like `nomad-nodesim` are unable to implement a minimal implementation of
an allocrunner so that we can test the client communication without having to
lug around the entire allocrunner/taskrunner code base. The allocrunner was
implemented with an interface specifically for this purpose, but there were
circular imports that made it challenging to use in practice.

Move the AllocRunner interface into an inner package and provide a factory
function type. Provide a minimal test that exercises the new function so that
consumers have some idea of what the minimum implementation required is.
@tgross
Copy link
Member

tgross commented May 12, 2023

Had to remove some 1.6.0-specific bits of the AllocRunner interface.

@tgross tgross merged commit 617a0eb into release/1.4.x May 12, 2023
@tgross tgross deleted the backport/mock-allocrunner/arguably-pretty-werewolf branch May 12, 2023 17:56
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.

3 participants