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

conf: configuration file changes #3689

Closed
4 of 5 tasks
oliver-sanders opened this issue Jul 15, 2020 · 21 comments · Fixed by #3755, #3786 or #3802
Closed
4 of 5 tasks

conf: configuration file changes #3689

oliver-sanders opened this issue Jul 15, 2020 · 21 comments · Fixed by #3755, #3786 or #3802
Assignees
Milestone

Comments

@oliver-sanders
Copy link
Member

oliver-sanders commented Jul 15, 2020

As documented in the config change proposal document:

  • The .cylc extension and the new configuration file names.
    • With support for the deprecated suite.rc filename with a warning of some kind for the user.
  • The new global config hierarchy.
  • Any changes to CYLC_CONF_PATH required.
  • The new CYLC_SITE_CONF_PATH variable.

Pull requests welcome!

@oliver-sanders oliver-sanders added this to the cylc-8.0.0 milestone Jul 15, 2020
@oliver-sanders oliver-sanders modified the milestones: cylc-8.0.0, cylc-8.0a3 Jul 15, 2020
@oliver-sanders oliver-sanders changed the title configuration file changes conf: configuration file changes Jul 15, 2020
@MetRonnie
Copy link
Member

Are we looking to totally rename suite --> flow?

@oliver-sanders
Copy link
Member Author

oliver-sanders commented Aug 4, 2020

Yep, though I think we may still be a little unsettled on terminology, generally speaking:

  • Suite has been renamed flow (as no one knows what a suite is) but we also call them workflows.
  • Parallel executions of the same workflow under SoD are called flows.

@hjoliver
Copy link
Member

hjoliver commented Aug 4, 2020

To avoid ambiguity, I wonder if we should:

  • refer to a "suite" only as a "workflow"
  • reserve "flow" for "parallel execution of (part of) the same workflow under SoD"

The only spanner-in-the-works here would be that we agreed on flow.cylc as the new config file name, which rolls off the tongue nicely. But we haven't implemented that that change yet, so we could potentially go for complete clarity: workflow.cylc

@TomekTrzeciak
Copy link
Contributor

What's the upshot of renaming suite.rc for Cylc 8, given that the file format will hardly change?

@hjoliver
Copy link
Member

hjoliver commented Aug 5, 2020

There’s not much “upshot” (consequences?) but the reason is (quoting Oliver on our chat platform today):

we have been using the word suite for a while now, however, very few people seem to know what this means and it makes us sound like niche software. So we have come to call suites what they really are, workflows, and Cylc, the thing which runs the workflows, a workflow engine.

@hjoliver
Copy link
Member

hjoliver commented Aug 5, 2020

(We will of course maintain backward compatibility with suite.rc)
(Similarly .rc is a rather archaic file suffix that few use anymore, and not very descriptive in our context)

@oliver-sanders
Copy link
Member Author

Update: We've recently moved to setting the Cylc version to nextversion-dev, when we set up the config hierarchy it would be good if the dev version fits nicely into that schema i.e:

  • 8
    • 8.0
      • a1
      • a2
      • a3
        • dev
    • 8.1
    • 8.2

This way the dev version can be configured separately, but also, it can just pick up the config for the next release which makes life easier.

@TomekTrzeciak
Copy link
Contributor

There’s not much “upshot” (consequences?) but the reason is (quoting Oliver on our chat platform today):

we have been using the word suite for a while now, however, very few people seem to know what this means and it makes us sound like niche software. So we have come to call suites what they really are, workflows, and Cylc, the thing which runs the workflows, a workflow engine.

(We will of course maintain backward compatibility with suite.rc)
(Similarly .rc is a rather archaic file suffix that few use anymore, and not very descriptive in our context)

All good points, but is it worth it without any real "meat" behind this change? I don't think the "suite" nomenclature is going away anytime soon - we have it all over our systems (environment variables, file paths, documentation, ...) and I expect similar for other users.

@MetRonnie
Copy link
Member

MetRonnie commented Aug 5, 2020

What do people think of this way of upgrading existing suite.rc to flow.cylc? #3755 (review)

@oliver-sanders
Copy link
Member Author

oliver-sanders commented Aug 5, 2020

is it worth it

Personally I didn't want to go arbitrary renaming things, however, as Cylc8 has evolved the case has deepened. We are aiming for something of a clean slate with Cylc8 and nomenclature is a large part of that theory. The old suite.rc filename will still be supported so the only real impact on users is the confusion of explaining that the file has been renamed.

There are a few pros to the change albeit small ones:

  • Cylc7 suites will run under Cylc8, however, Cylc8 workflows won't be back-compatible to Cylc7 so changing the filename is kinda helpful there.
  • The .cylc extension enables us to more easily associate files with the Cylc configuration language for text editors, GitHub, etc (the glob suite*.rc only works in a few places).
  • Whilst in some communities the word "suite" will likely live on for some time, when users stop running rose suite-run and start using "Cylc Flow" to run the workflow in their flow.cylc file this will change, slowly. This terminology change may assist the transition from Rose -> Cylc, suites -> workflows.
  • It will be less of a barrier to new adopters, especially in non-meteorological areas who don't realise Cylc's generality or even its existence due to our going against the grain of accepted industry terminology.
  • It's just generally awkward introducing new users to our workflow engine then explaining that they write their workflows in a file called "suite".

environment variables, file paths, documentation

All of these will change at our end with Cylc8 (obviously with back-compat), the word "suite" will be eradicated from the system pre release.

@MetRonnie MetRonnie linked a pull request Aug 7, 2020 that will close this issue
7 tasks
@MetRonnie
Copy link
Member

MetRonnie commented Aug 7, 2020

What about flow-tests.rc? Should it become global-tests.cylc?

Also I've noticed several references to global.rc - what's that?

@hjoliver
Copy link
Member

hjoliver commented Aug 9, 2020

Also I've noticed several references to global.rc - what's that?

The original global config file name (and still on branch 7.8.x). Changing to global.cylc https://cylc.github.io/cylc-admin/proposal-config-changes.html#config-file-naming

@hjoliver
Copy link
Member

hjoliver commented Aug 9, 2020

What about flow-tests.rc? Should it become global-tests.cylc?

Yes 👍

@MetRonnie
Copy link
Member

After the PR's merged, would it make sense to add a GH Actions workflow/step that checks PRs' additions don't include suite.rc etc going forward, in case of old habits dying hard?

@hjoliver
Copy link
Member

After the PR's merged, would it make sense to add a GH Actions workflow/step that checks PRs' additions don't include suite.rc etc going forward, in case of old habits dying hard?

That could potentially be annoying. We might still have to use the word "suite" sometimes, e.g. when talking about backward compatibility and transitioning to Cylc 8 ...

@oliver-sanders
Copy link
Member Author

I think we can manually police this one if worried we can always add our own pre-commit hooks to grep git diff --cached or something like that.

@MetRonnie MetRonnie reopened this Aug 18, 2020
@MetRonnie MetRonnie mentioned this issue Aug 24, 2020
7 tasks
@MetRonnie MetRonnie linked a pull request Aug 24, 2020 that will close this issue
7 tasks
@MetRonnie MetRonnie reopened this Aug 25, 2020
@MetRonnie
Copy link
Member

MetRonnie commented Aug 27, 2020

Re: new global config hierarchy

Both the site and user config may consist of a number of files. For example, for release 8.0.1 the following config files will be read in (if they exist) in order from least specific to most specific:

  • <config-dir>/flow/global.cylc
  • <config-dir>/flow/8/global.cylc
  • <config-dir>/flow/8.0/global.cylc
  • <config-dir>/flow/8.0.1/global.cylc

Does that mean the configs should "cascade" (like in CSS), or is it that the most specific one only should be used?

@oliver-sanders
Copy link
Member Author

the following config files will be read in (if they exist) in order from least specific to most specific:

So for this example all four files would be read.

@MetRonnie
Copy link
Member

What should we do with cylc get-site-config --print-site-dir etc? Should it print <config-dir>/flow/8.0.1/? Or should it print the hierarchy?

@oliver-sanders
Copy link
Member Author

oliver-sanders commented Sep 2, 2020

I think --print-site-dir and --print-user-dir should probably be removed.

The main use of these options is in tests/f/lib/bash/test_header where it is used to source the global-tests.cylc file. I'm not quite sure what the future of the global-tests.cylc is, the work I'm currently doing on the test battery makes it somewhat moot.

For now the simplest way forward would be to remove the concept of a "site" global-tests.cylc file (as it's not currently used) and make it so that the global-tests.cylc file has to be located in the directory with the full version i.e:

# untested
- SITE_TESTS_CONF_FILE="$(cylc get-global --print-site-dir)/global-tests.cylc"         
- USER_TESTS_CONF_FILE="$(cylc get-global --print-user-dir)/global-tests.cylc
+ USER_TESTS_CONF_FILE="$HOME/.cylc/flow/$(cylc version)/global-tests.cylc"

@MetRonnie
Copy link
Member

MetRonnie commented Sep 17, 2020

  • Any changes to CYLC_CONF_PATH required.

@oliver-sanders I take it there aren't any changes needed and this can be ticked off?

@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
None yet
Projects
None yet
4 participants