-
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
Fix global config default-to-localhost. #3508
Conversation
Global config, set all list items:
On 7.8.x:
On this branch:
TODO - batch system settings are still not defaulting to localhost. Reason: |
e958cfd
to
28c3408
Compare
Ready to go for 7.8.5 (Note this is a real bug, reported by a user at another site). @kinow - can you review at this end - I based my unit test on your cylc-7 suite config unit tests. |
NOTE: this bit is still broken (from description above):
It's probably not hard to fix, but I need to move on to other things and users are unlikely to hit it (would anyone really set batch system settings for multiple hosts under localhost?). So I'll flag it as a new low-priority issue. |
I won't replicate this to 7.9.x - we can do the 7.9.0 release by copying 7.8.x at the last minute and applying the Jinja2 fix as discussed in our recent meeting. |
@wxtim - this is irrelevant for cylc 8, right? |
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.
Code looks good to me, and thanks for the extra comment with the example configuration and what works and what doesn't. Easier to review.
Copied your example to my ~/.cylc/global.rc
, then with 7.8.4
kinow@ranma:/opt/cylc$ ./usr/bin/cylc version
7.8.4-49-gcab35
kinow@ranma:/opt/cylc$ ./usr/bin/cylc get-global -i '[hosts][foo]' | egrep '(delay|variable|interval)s'
copyable environment variables =
task event handler retry delays =
retrieve job logs retry delays =
submission polling intervals =
execution polling intervals =
And with this branch:
kinow@ranma:/opt/cylc$ ./usr/bin/cylc version
7.8.4-51-g28c34
kinow@ranma:/opt/cylc$ git status
On branch pr-3508
nothing to commit, working tree clean
kinow@ranma:/opt/cylc$ ./usr/bin/cylc get-global -i '[hosts][foo]' | egrep '(delay|variable|interval)s'
copyable environment variables = FOO, BAR
task event handler retry delays = PT1M39S, PT1H
retrieve job logs retry delays = PT10S, PT30S, PT1M, PT3M
submission polling intervals = PT10S, PT30S
execution polling intervals = PT10S, PT30S
With Cylc 8 I get the same as Cylc 7.8.x but looks like it's not important right now (from reading @hjoliver 's comment).
@hjoliver I think the unit test will need some more work
(which works locally for me 👀 ) |
Yeah, what I meant there was the defaulting to localhost is going to go away with the upcoming "Platforms" changes. |
Damn it, passes locally:
|
Ditto for me, just synced repo and imported in PyCharm, it runs fine. |
@hjoliver did a few hacks on a branch, and pushed to my fork. Running locally, the very first key that I get is self.assertTrue(host_item == coercer(items[key], []),
"host_item=%s, key=%s" % (host_item, key)) and prints > "host_item=%s, key=%s" % (host_item, key))
E AssertionError: host_item=[], key=task event handler retry delays Locally, my Not sure if you are able to guess anything from this @hjoliver ? I'm still not sure why Travis is unhappy :/ |
Tested on |
Yeah, weird, I don't get it 😬 |
The unit test now passes on Travis 😌 |
Travis passed 🎉 |
YES! |
These changes close #3507
In global config host settings, default-to-localhost was broken for list-valued items. In the spec, these need to default to
None
(It was empty list looks like "item-set-to-nothing" rather than "item-not-set").Apparently broken in 7.8.0 ?
Requirements check-list
CONTRIBUTING.md
and added my name as a Code Contributor.Once finished, this needs to go to 7.9.x as well. But not to master as the platforms changes will render this irrelevant there? - ping @wxtim