Skip to content
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

Merged
merged 2 commits into from
Jul 22, 2020
Merged

Fix global UTC mode bug #3632

merged 2 commits into from
Jul 22, 2020

Conversation

MetRonnie
Copy link
Member

@MetRonnie MetRonnie commented May 29, 2020

  • Cycle points now obey value specified in global config
  • Suite cfgspec default False no longer overrides value specified in global config file

These changes close #3631

Requirements check-list

  • I have read CONTRIBUTING.md and added my name as a Code Contributor.
  • Contains logically grouped changes (else tidy your branch by rebase).
  • Does not contain off-topic changes (use other PRs for other changes).
  • Does not need tests.
  • Appropriate change log entry included.
  • No documentation update required.

@MetRonnie MetRonnie added bug Something is wrong :( small labels May 29, 2020
@MetRonnie MetRonnie added this to the cylc-8.0a2 milestone May 29, 2020
@MetRonnie MetRonnie self-assigned this May 29, 2020
Comment on lines -317 to -322
# 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'])
Copy link
Member Author

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?

Copy link
Member

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?

Copy link
Member Author

@MetRonnie MetRonnie Jun 1, 2020

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

Copy link
Member

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.

Copy link
Member

@oliver-sanders oliver-sanders Jun 2, 2020

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.

Copy link
Member

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!)

@oliver-sanders oliver-sanders modified the milestones: cylc-8.0a2, cylc-8.0a3 Jul 3, 2020
@MetRonnie MetRonnie changed the title Fix global UTC mode bug #3631 Fix global UTC mode bug Jul 6, 2020
- Cycle points now obey value specified in global config
- Default `False` no longer overrides value specified in global config
Copy link
Member

@hjoliver hjoliver left a 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.

@hjoliver hjoliver merged commit 9440375 into cylc:master Jul 22, 2020
@MetRonnie MetRonnie deleted the fix-utc-mode branch July 27, 2020 09:38
@MetRonnie
Copy link
Member Author

The tests that really should have been included with this are in #3614

@MetRonnie MetRonnie mentioned this pull request Aug 25, 2020
7 tasks
@hjoliver hjoliver modified the milestones: cylc-8.0a3, cylc-8.0b0 Feb 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something is wrong :( small
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Global config UTC mode doesn't affect cycle point dumping
3 participants