-
Notifications
You must be signed in to change notification settings - Fork 93
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
suite-state command forward compat. #5238
Conversation
Not sure if we really need this one (it'd be nice to avoid yet another final Cylc 7 release). #5237 is the critical one, for Cylc 8 research users triggering tasks off of Cylc 7 operational suites that haven't been migrated yet. |
For operations, this is important for migration, otherwise we'll be forced to upgrade downstream first.. Which we could do I suppose... |
Can you give this a quick review and test @dwsutherland ? (Since we need it soon!) |
(New tests are not needed at this point, for Cylc 7 IMO) |
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.
Missing the xtrigger part here?
fmt = checker.get_remote_point_format() |
f41e349
to
5a3e665
Compare
Good spot @MetRonnie, thanks. Turns out I hadn't quite finished this off - another change was need to handle the change in task_outputs table format. (Well, 11 months is a long time...) |
Testing: Run with Cylc 8: [scheduler]
cycle point format = %Y
[scheduling]
initial cycle point = 2010
final cycle point = 2012
[[graph]]
P1Y = "foo"
[runtime]
[[foo]]
script = "cylc message x"
[[[outputs]]]
x = x Now with Cylc 7, both of these work: cylc-7 $ cylc suite-state c8/runN --task=foo --point=2011 --message=x
polling for 'output: x': satisfied
cylc-7 $ cylc suite-state c8/runN --task=foo --point=2011 --status=succeeded
polling for 'succeeded': satisfied And to test xtriggers polling the above Cylc 8 workflow: # suite.rc
[cylc]
cycle point format = %Y
[scheduling]
initial cycle point = 2010
final cycle point = 2012
[[xtriggers]]
x1 = suite_state(suite=c8/runN, task=foo, point=%(point)s, message=x)
x2 = suite_state(suite=c8/runN, task=foo, point=%(point)s, status=succeeded)
[[dependencies]]
[[[P1Y]]]
graph = """
@x1=> foo
@x2 => foo
"""
[runtime]
[[foo]] |
Should be good to go now. |
5a3e665
to
f953790
Compare
lib/cylc/dbstatecheck.py
Outdated
# This works for Cylc 7 and Cylc 8 outputs table format: | ||
return any( | ||
message == value | ||
for outputs_str, in res | ||
for value in json.loads(outputs_str) | ||
) |
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.
Are you saying removing the .values()
makes it work for Cylc 8 DBs? Surely that breaks Cylc 7?
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.
Or was that just a mistake?
# This works for Cylc 7 and Cylc 8 outputs table format: | |
return any( | |
message == value | |
for outputs_str, in res | |
for value in json.loads(outputs_str) | |
) | |
# This works for Cylc 7 and Cylc 8 outputs table format: | |
return any( | |
message == value | |
for outputs_str, in res | |
for value in json.loads(outputs_str).values() | |
) |
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.
Damn it. I owe you a chocolate fish 🐟
It wasn't a mistake - I took it from master, and I tested it.
However, I tested it with our classic shortcut x = x
outputs - i.e. with message and label the same 🤦
So this is a bug on master too. Patch coming...
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.
So this is a bug on master too.
You mean, only a bug on master/8.x? (Though nearly introduced to Cylc 7 in this PR)
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.
[sutherlanddw@w-ec-admin01 ~]$ cylc --version
7.9.2
[sutherlanddw@w-ec-admin01 ~]$ cylc suite-state download/run1 --run-dir=/home/sutherlanddw/cylc-run --status=succeeded --task=ext_check_globalfields_ukmet --point=20231031T00
no such table: suite_params
[sutherlanddw@w-ec-admin01 ~]$ cylc --version
7.8.11-30-gf9537
[sutherlanddw@w-ec-admin01 ~]$ cylc suite-state download/run1 --run-dir=/home/sutherlanddw/cylc-run --status=succeeded --task=ext_check_globalfields_ukmet --point=20231031T00
polling for 'succeeded': satisfied
f953790
to
86b340b
Compare
cd8120f
to
ba9a858
Compare
@MetRonnie - now it's done!! |
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.
Tested
Address #5236
Sibling of #5237
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?.?.x
branch.