-
Notifications
You must be signed in to change notification settings - Fork 93
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
Flow-specific hold/release #5698
Draft
hjoliver
wants to merge
18
commits into
cylc:master
Choose a base branch
from
hjoliver:flow-hold
base: master
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.
Draft
Changes from 1 commit
Commits
Show all changes
18 commits
Select commit
Hold shift click to select a range
e8d957c
Task pool flow hold.
hjoliver 58dc6c5
Future flow hold.
hjoliver 95fa798
Flow-specific hold release.
hjoliver 1e7d548
Centralise task hold/release code.
hjoliver b5f83a4
Style fixes.
hjoliver 584bea8
Fix integration tests.
hjoliver 77acf44
fix hold on kill
hjoliver ad81aa3
Fix func tests.
hjoliver 2b570d5
Fix more func tests.
hjoliver ff07668
Update change log.
hjoliver d3c776c
Fix hold on kill.
hjoliver b2e7440
hold mgr: clear not needed.
hjoliver 151537e
Validate CLI --flow opt.
hjoliver f554c96
Update flow hold integration tests.
hjoliver 6597431
fix release from hold.
hjoliver e1fb7fe
Update flow release integration tests.
hjoliver 9e93454
hold_point with flow num
hjoliver e912f63
Fix recent.
hjoliver File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Validate CLI --flow opt.
- Loading branch information
commit 151537e397478d63dba2463f8553c78e4f678a61
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,6 20,7 @@ | |
import datetime | ||
|
||
from cylc.flow import LOG | ||
from cylc.flow.exceptions import InputError | ||
from cylc.flow.workflow_db_mgr import WorkflowDatabaseManager | ||
|
||
|
||
|
@@ -30,6 31,15 @@ | |
FLOW_NONE = "none" | ||
|
||
|
||
def validate_flow_opt(val): | ||
"""Validate command line --flow opions.""" | ||
if val is not None: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. How will the parser allow this value to be |
||
try: | ||
int(val) | ||
except ValueError: | ||
raise InputError(f"--flow={val}: value must be integer.") | ||
|
||
|
||
class FlowMgr: | ||
"""Logic to manage flow counter and flow metadata.""" | ||
|
||
|
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doesn't this semi duplicate the logic in cylc trigger? Surely all use-cases of
--flow
should behave roughly the same, and probably be centralized inoption_parser.py
. Centralizing them here is reasonable too, but on balance this is more about options than flows?You might want to give it a kwarg where you pass it a list of acceptable strings?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note, there are some differences, e.g.
cylc trigger --flow=new
makes sense, butcylc hold --flow=new
doesn't.