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

Cylc VR: Validate should not change options #6316

Open
wants to merge 2 commits into
base: 8.3.x
Choose a base branch
from

Conversation

wxtim
Copy link
Member

@wxtim wxtim commented Aug 22, 2024

Closes #6262

Validate may alter the content of options objects passed to it: In this case by replacing icp = now with icp = <actual time> which is an invalid restart option.

Fix

Pass validate a copy of the options object to prevent changes made to the options by validate affecting subsequent steps.

Whilst in principle we probably shouldn't let the options object be mutated by the cylc validate this shouldn't affect us anywhere except in cylc vr.

Check List

  • Check whether this is a problem in cylc vip.
  • 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).
  • Applied any dependency changes to both setup.cfg (and conda-environment.yml if present).
  • Tests are included (or explain why tests are not needed).
  • Changelog entry included if this is a change that can affect users
  • Cylc-Doc pull request opened if required at cylc/cylc-doc/pull/XXXX.
  • If this is a bug fix, PR should be raised against the relevant ?.?.x branch.

@wxtim wxtim changed the title Cylc VR: Pass validate a copy of the options object to Cylc VR: Validate should not change options Aug 22, 2024
@wxtim wxtim self-assigned this Aug 22, 2024
@wxtim wxtim force-pushed the fix.6262 branch 2 times, most recently from d97e9f5 to febc787 Compare August 22, 2024 09:55
@wxtim wxtim marked this pull request as draft August 22, 2024 13:31
@wxtim wxtim force-pushed the fix.6262 branch 2 times, most recently from 0b927a6 to 1fcacc5 Compare August 22, 2024 15:19
@wxtim wxtim changed the base branch from master to 8.3.x August 22, 2024 15:20
@wxtim wxtim closed this Aug 22, 2024
@wxtim wxtim reopened this Aug 22, 2024
@wxtim wxtim marked this pull request as ready for review August 22, 2024 15:28
@oliver-sanders oliver-sanders requested review from MetRonnie and removed request for oliver-sanders August 22, 2024 16:11
cylc/flow/config.py Outdated Show resolved Hide resolved
cylc/flow/config.py Outdated Show resolved Hide resolved
@oliver-sanders oliver-sanders added this to the 8.3.4 milestone Aug 27, 2024
@oliver-sanders
Copy link
Member

Partially closes #6262 (we should check for other places where the options object might be changed unwisely.)

Please remove the "partially" or create a follow-on issue to cover this.

changes.d/6316.fix.md Show resolved Hide resolved
tests/unit/test_config.py Outdated Show resolved Hide resolved
@MetRonnie
Copy link
Member

MetRonnie commented Aug 29, 2024

MacOS failures caused by different functional tests being introduced into the chunk due to the added functional test. Addressed by wxtim#63

@oliver-sanders oliver-sanders modified the milestones: 8.3.4, 8.3.5 Sep 11, 2024
prevent changes made to the options by validate affecting
subsequent steps.

Response to review
- Variable name suggestions.
- Test speedup.
@MetRonnie
Copy link
Member

MacOS failures caused by different functional tests being introduced into the chunk due to the added functional test. Addressed by wxtim#63

Still awaiting

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

cylc vr bug with initial cycle point = now
3 participants