-
Notifications
You must be signed in to change notification settings - Fork 8
canary_hpc plugin #42
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
Open
tjfulle
wants to merge
30
commits into
main
Choose a base branch
from
tjfulle/canary-batch-plugin
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@mdmosby - this is ready to merge but I'd love to hear your thoughts on the description above. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Here's a clearer version of your pull request description while maintaining the same tone:
Overview
This pull request introduces several significant changes to the core functionality of Canary:
canary_hpc
plugin.The second change simplifies the
canary.config.resource_pool
, as it no longer needs to account for resources across multiple compute nodes.Batches
How are batches executed now? Or, how will tests be scheduled?
First, let's review the previous execution flow of
canary run
:canary_discover_generators
.canary_runtests
.To support the third step, this PR introduces a new plugin hook:
This plugin is invoked during the filtering phase to determine if the necessary resources are available for a test case. The default implementation compares the requirements of the test case with the now-simplified resource pool in Canary.
With these updates, implementing a batch runner only requires defining
canary_resource_requirements_satisfiable
andcanary_runtests
. This PR introduces thecanary_hpc
plugin, which accomplishes this by:canary_addoption
to include batching arguments in the command line.canary_addhooks
to add additional plugin hooks.canary_configure
to inspect batch arguments and set up thehpc_connect
backend (if requested).canary_resource_requirements_satisfiable
to check if thehpc_connect
backend can accommodate the test.canary_runtests
to execute tests in batches.canary_runtests_startup
to determine cases to run during the batch callback phase (see below).The
canary_hpc
plugin processes batches similarly to how core Canary previously did. When a batch is processed, it calls back to Canary to execute the batch, meaning that running a batch is treated as a subprocess that executescanary run --bach-id=BATCH_ID
. In this way, batching is managed through a hierarchical invocation of Canary.Since core Canary no longer recognizes batches, it does not know how to handle the
--batch-id
argument. So, at the execution at the second level of hierarchycanary_runtests_startup
handles--batch-id
by reading in the batch's index and passing its cases on tocanary run
.