Skip to content

Commit

Permalink
Ensure that warnings triggered by is_validate are triggered by VIP & VR
Browse files Browse the repository at this point in the history
  • Loading branch information
wxtim committed Jun 12, 2024
1 parent fa22199 commit b8ae3b5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
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

0 comments on commit b8ae3b5

Please sign in to comment.