Skip to content

Commit

Permalink
Merge pull request #6024 from cylc/8.2.x-sync
Browse files Browse the repository at this point in the history
🤖 Merge 8.2.x-sync into master
  • Loading branch information
wxtim authored Mar 18, 2024
2 parents a9becc2 + 2678b53 commit 43a03f6
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 4 deletions.
1 change: 1 addition & 0 deletions changes.d/6011.fix.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fixed a `cylc vip` bug causing remote re-invocation to fail if using `--workflow-name` option.
4 changes: 2 additions & 2 deletions cylc/flow/option_parsers.py
Original file line number Diff line number Diff line change
Expand Up @@ -790,9 +790,9 @@ def cleanup_sysargv(
new_args[1] = script_name

# replace source path with workflow ID.
if str(source) in sys.argv:
if str(source) in new_args:
new_args.remove(str(source))
if workflow_id not in sys.argv:
if workflow_id not in new_args:
new_args.append(workflow_id)

sys.argv = new_args
Expand Down
16 changes: 16 additions & 0 deletions tests/unit/test_option_parsers.py
Original file line number Diff line number Diff line change
Expand Up @@ -383,6 +383,22 @@ def test_combine_options(inputs, expect):
'play --foo something myworkflow'.split(),
id='no path given'
),
param(
'vip -n myworkflow --no-run-name'.split(),
{
'script_name': 'play',
'workflow_id': 'myworkflow',
'compound_script_opts': [
OptionSettings(['--workflow-name', '-n']),
OptionSettings(['--no-run-name']),
],
'script_opts': [
OptionSettings(['--not-used']),
]
},
'play myworkflow'.split(),
id='workflow-id-added'
),
]
)
def test_cleanup_sysargv(monkeypatch, argv_before, kwargs, expect):
Expand Down
2 changes: 0 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ ignore=
; suggests using f"{!r}" instead of manual quotes (flake8-bugbear)
; Doesn't work at 3.7
B028
; Broken in two cases https://github.com/PyCQA/flake8-bugbear/issues/451
B038

exclude=
build,
Expand Down

0 comments on commit 43a03f6

Please sign in to comment.