-
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
Fix global UTC mode bug #3632
Fix global UTC mode bug #3632
Conversation
# Running in UTC time? (else just use the system clock) | ||
if self.cfg['cylc']['UTC mode'] is None: | ||
set_utc_mode(glbl_cfg().get(['cylc', 'UTC mode'])) | ||
else: | ||
set_utc_mode(self.cfg['cylc']['UTC mode']) |
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.
Actually, it seems to me that instead of manually getting the global config defaults with glbl_cfg().get()
, this ought to be taken care of in self.pcfg.get(sparse=False)
, i.e. when expanding the config dict, which currently only takes the suite config defaults?
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.
Is the default not coming through as expected?
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.
Yes, with this bug fix the default is coming through. I just meant that when loading the dense/sparse=False
config (expanded with the suite defaults), it might be better if it also loaded the global defaults as well. I had a look at it but it doesn't look straightforward
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.
Yeah, parsec is a bit of a here be dragons, venture if ye dare.
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.
The suite / global distinction is a necessary one though, in the Cylc9 timeframe we might be able to do something nicer but ATM I think it's the way it needs to be.
E.G. we want to be able to reload the global configuration whilst the suite is running but not the suite configuration.
It would be very nice if we had one, simple object which handled the suite/global abstraction for us, has a memory efficient tiered structure, which linked into the SPEC and behaves like a nice simple dictionary.
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.
Yeah, parsec is a bit of a here be dragons, venture if ye dare.
Argh, my fault! (but, back in the day, it was twice as fast as its predecessor!)
- Cycle points now obey value specified in global config - Default `False` no longer overrides value specified in global config
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 as working, LGTM.
The tests that really should have been included with this are in #3614 |
False
no longer overrides value specified in global config fileThese changes close #3631
Requirements check-list
CONTRIBUTING.md
and added my name as a Code Contributor.