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

Ensure that warnings triggered by is_validate are triggered by VIP & VR #53

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion cylc/flow/scripts/validate_install_play.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ def get_option_parser() -> COP:
# no sense in a VIP context.
if option.kwargs.get('dest') != 'against_source':
parser.add_option(*option.args, **option.kwargs)

parser.set_defaults(is_validate=True)
return parser


Expand All @@ -103,6 +103,9 @@ def main(parser: COP, options: 'Values', workflow_id: Optional[str] = None):
log_subcommand('validate', source)
asyncio.run(cylc_validate(parser, options, str(source)))

# Unset is validate after validation.
delattr(options, 'is_validate')

log_subcommand('install', source)
_, workflow_id = asyncio.run(cylc_install(options, workflow_id))

Expand Down
4 changes: 4 additions & 0 deletions cylc/flow/scripts/validate_reinstall.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ def get_option_parser() -> COP:
)
for option in VR_OPTIONS:
parser.add_option(*option.args, **option.kwargs)
parser.set_defaults(is_validate=True)
return parser


Expand Down Expand Up @@ -169,6 +170,9 @@ async def vr_cli(parser: COP, options: 'Values', workflow_id: str):
log_subcommand('validate --against-source', workflow_id)
await cylc_validate(parser, options, workflow_id)

# Unset is validate after validation.
delattr(options, 'is_validate')

log_subcommand('reinstall', workflow_id)
reinstall_ok = await cylc_reinstall(
options, workflow_id,
Expand Down
Loading