-
Notifications
You must be signed in to change notification settings - Fork 94
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
play: check Cylc version on restart #5074
Conversation
0b91126
to
d956e0b
Compare
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.
Prompt format should be of the form:
Question blah? [a](b/c)_
# or
Question blah [a](b/c)?_
(ends with a blank space; options in parentheses; no colon ?:
)
9646b3d
to
2a3160c
Compare
(I failed to |
Looks like the prompt is messing with some functional tests:
(I guess we have faked DBs with specific Cylc versions recorded) |
Makes sense, in which case we need to have a CLI override to handle this.
Thoughts? |
What's the reasoning behind |
Upgrading is safe (so we prompt), downgrading is dangerous (so we error without prompting). Implementing the two via the same option conflates the two and makes situations where |
f52e7b1
to
a88390a
Compare
Makes sense. In that case, I guess we do need |
Alternatively we could make |
Added
|
7d853f8
to
1f07a83
Compare
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.
- Checked out and tried.
- Read code.
I've made a couple of suggestions about variable naming - I'm particularly unhappy about this
and that
which I find very unhelpful.
assert prompt('whatever', ['x'], default='x') == 'x' | ||
|
||
# test a prompt with an input pre-process method thinggy | ||
stdinput('YES') |
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.
You missed "What is the airspeed velocity of an unladen sparrow?"
1f07a83
to
2fc8c54
Compare
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.
You have answered all my earlier review comments.
* Closes cylc#4039 * When restarting a workflow, check the version it previously ran under against the current version in order to determine if the change is sensible. * Restart normally if the restart would: * Not change the version. * Increase the maintenance number. * Prompt (override with --yes) for confirmation if the restart would: * Reduce the maintenance number. * Increase the minor number. * Exit with nasty error (override with --force or --yes --yes?) if the restart would: * Decrease the minor number. * Change the major number. * This also moves the pre-existing workflow DB check from post-detatch to pre-detach.
2fc8c54
to
6022702
Compare
Done. Also filled in some coverage holes. |
69bd1da
to
51510e6
Compare
* Add upgrade/downgrade options for non-interactive purposes
51510e6
to
f7f6144
Compare
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.
👍
against the current version in order to determine if the change is
sensible.
the restart would:
to pre-detach.
Check List
CONTRIBUTING.md
and added my name as a Code Contributor.setup.cfg
andconda-environment.yml
.CHANGES.md
entry included if this is a change that can affect users