Skip to content

Commit

Permalink
response to review - move the message to cylc flow
Browse files Browse the repository at this point in the history
  • Loading branch information
wxtim committed May 15, 2023
1 parent 6b9e33b commit b7952e4
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
9 changes: 7 additions & 2 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,21 @@ creating a new release entry be sure to copy & paste the span tag with the
updated. Only the first match gets replaced, so it's fine to leave the old
ones in. -->
-------------------------------------------------------------------------------
## __cylc-uiserver-1.2.2 (<span actions:bind='release-date'>Released 2023-04-28</span>)__
## __cylc-uiserver-1.2.3 (<span actions:bind='release-date'>Upcoming</span>)__

[Updated cylc-ui to 1.6.0](https://github.com/cylc/cylc-ui/blob/master/CHANGES.md)
<!-- [Updated cylc-ui to x.y.z](https://github.com/cylc/cylc-ui/blob/master/CHANGES.md) -->

### Enhancements

[#455](https://github.com/cylc/cylc-uiserver/pull/455)- Added a specific
warning for cases where workflow needs upgrade, and an upgrade toggle in
cylc play dialog.

## __cylc-uiserver-1.2.2 (<span actions:bind='release-date'>Released 2023-04-28</span>)__

[Updated cylc-ui to 1.6.0](https://github.com/cylc/cylc-ui/blob/master/CHANGES.md)

### Enhancements

[#434](https://github.com/cylc/cylc-uiserver/pull/434)- Added the server side
code for the analysis view in the UI.
Expand Down
19 changes: 7 additions & 12 deletions cylc/uiserver/resolvers.py
Original file line number Diff line number Diff line change
Expand Up @@ -316,20 +316,15 @@ async def play(cls, workflows, args, workflows_mgr, log):

if ret:
# command failed
out, err = proc.communicate()
if 'previously run with' in out:
# Can't upgrade:
msg = out + '\nEdit the play command to use "upgrade".'
else:
msg = (
f'Could not start {tokens["workflow"]}'
f' - {cmd_repr}'
)

_, err = proc.communicate()
msg = err.strip() or (
f'Could not start {tokens["workflow"]}'
f' - {cmd_repr}'
)
raise Exception(
msg
# suppress traceback unless in debug mode
+ (f' - {err}' if DEBUG else '')
# include possible traceback in debug mode
+ (f' - {err}' if DEBUG and not out.strip() else '')
)

except Exception as exc:
Expand Down

0 comments on commit b7952e4

Please sign in to comment.