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

Formalise Suite Parameters #2799

Closed
oliver-sanders opened this issue Oct 15, 2018 · 5 comments · Fixed by #3184
Closed

Formalise Suite Parameters #2799

oliver-sanders opened this issue Oct 15, 2018 · 5 comments · Fixed by #3184
Assignees
Milestone

Comments

@oliver-sanders
Copy link
Member

Note: suite parameters refers to a suite's runtime values (e.g. is_held) rather than cylc Parameters (as used in the suite.rc file).

The Issue

At present Cylc handles a subset of a suite's "runtime parameters" which are loaded from the database when a suite is restarted:

  • is_held
  • start_point
  • stop_point
  • initial_point
  • warm_point
  • uuid_str
  • template_vars

The remaining parameters (which I've identified) should also benefit from the same treatment:

  • can_auto_stop
  • final_point
  • pool_hold_point
  • run_mode
  • stop_clock_time
  • stop_mode
  • stop_task
  • reloading (doesn't make sense across restart but is still a suite param)?

As these remaining parameters are not restart safe this is effectively a blocker for a universal implementation of #988.

The issue cannot be circumnavigated using the [current] CLI, e.g. cylc stop SUITE POINT sets the stop_point whereas cylc restart SUITE --until POINT sets the final_point

Proposal

  • Lump together the suite parameters in a single place where they can be easily loaded / dumped.
  • Automatically update the corresponding item in the database when any value changes.
  • Start with default parameters (None for all values) then apply in order:
    1. The suite config.
    2. if is_restart: State from the prior run (First subtracting any item(s) which caused the suite to shutdown e.g. custom stop_point).
    3. CLI options.
    4. User interaction at runtime.

@cylc/core I've made an initial attempt at this:

  • Does this approach seem sensible?
  • Would there be any changes in behaviour caused by the "suite parameter inheritance order" I haven't thought of?
  • Is the parameter list complete?
@oliver-sanders oliver-sanders added this to the next release milestone Oct 15, 2018
@oliver-sanders oliver-sanders self-assigned this Oct 15, 2018
@matthewrmshin
Copy link
Contributor

See also #1032.

@matthewrmshin
Copy link
Contributor

matthewrmshin commented Oct 15, 2018

Sounds sensible - as long as the solution is contained (which I believe would be). Caveats, probably to solve beyond the upcoming release:

  • The restart command line options may also override settings - and may not match previous run/restarts.
  • Restart currently reloads - and disregards/overrides any settings that may be in the previous run/restarts.

@hjoliver
Copy link
Member

Yep, sounds good. Ditto Matt's comments.

@oliver-sanders oliver-sanders modified the milestones: next release, later, soon Oct 19, 2018
@oliver-sanders oliver-sanders mentioned this issue Oct 19, 2018
3 tasks
@oliver-sanders
Copy link
Member Author

On further investigation, this change has the potential to be quite dangerous and needs a lot of time for testing and stabilisation to ensure we don't release anything faulty so bumping this issue back.

The approach I have employed in my attempts so far is:

  • Create a SuiteParameters object belonging to the Scheduler which updates the database whenever any of the parameters change.
  • On TaskPool.STOP_AUTO reset the parameter that caused the suite to enter this state so as to allow the suite to restart.

@oliver-sanders
Copy link
Member Author

Currently there are four main cycle point parameters:

  • initial_cycle
  • start_cycle
  • final_cycle
  • stop_cycle

My interpretation of this is that initial and final relate to the suite configuration whilst start and stop relate to the scheduler instance.

Unfortunately work on #2809 has revealed that the current usage of these parameters is mixed with their purpose becoming blurred.

E.g. when restarting a suite cylc restart converts the final_cycle from the previous run into stop_cycle in the new one.

For consistency between cylc run and cylc restart this discrepancy will have to be addressed.

oliver-sanders added a commit to oliver-sanders/cylc-flow that referenced this issue Nov 8, 2018
oliver-sanders added a commit to oliver-sanders/cylc-flow that referenced this issue Nov 8, 2018
oliver-sanders added a commit to oliver-sanders/cylc-flow that referenced this issue Nov 8, 2018
oliver-sanders added a commit to oliver-sanders/cylc-flow that referenced this issue Nov 8, 2018
oliver-sanders added a commit to oliver-sanders/cylc-flow that referenced this issue Nov 9, 2018
oliver-sanders added a commit to oliver-sanders/cylc-flow that referenced this issue Nov 14, 2018
oliver-sanders added a commit to oliver-sanders/cylc-flow that referenced this issue Nov 21, 2018
oliver-sanders added a commit to oliver-sanders/cylc-flow that referenced this issue Nov 21, 2018
@oliver-sanders oliver-sanders removed their assignment May 2, 2019
@matthewrmshin matthewrmshin modified the milestones: soon, cylc-8.0a1 Jul 5, 2019
@matthewrmshin matthewrmshin self-assigned this Jul 5, 2019
oliver-sanders added a commit to oliver-sanders/cylc-flow that referenced this issue May 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants