-
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
Expand [platforms]
section; Add warning if a platform name regex matches localhost
#4854
Expand [platforms]
section; Add warning if a platform name regex matches localhost
#4854
Conversation
tests/functional/platforms/08-warn-if-regex-matches-localhost.t
Outdated
Show resolved
Hide resolved
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.
Working as expected for me. Checked out and test run. Can't spot any implementation problems.
Approving on proviso that the purge is sorted in the test :) Thanks @wxtim
Make it an exception. |
* Partially addresses cylc#4845 * This is intended to make it easier to configure the localhost platform to match other hosts e.g `[platform][localhost, desktop..., server...]` * Note this **cannot** be done using a regex e.g. `[platform][localhost|desktop...|server...]` because the localhost platform is special (it gets defined by default as [localhost]) so the regex is not matched and consequently gets ignored - cylc#4845
…ins-localhost * expand_platforms_section: glblcfg: split comma separated platform definitions tests/u: parsec/test_util unittest->pytest bump deprecation warnings from Cylc 9 to 8.x (cylc#4853) Update tests/functional/execution-time-limit/04-polling-intervals.t Stop a few deprecation warnings in Cylc7 back compat mode Add tests Add polling interval test and change log entry. Set excecution polling delays correctly
@oliver-sanders Do you want me to count having reviewed your parts of the code as review 1 and you as having reviewed mine as review 1 so we only want 1 further reviewer, or should I/we tag Ronnie? @datamel This is not the PR you approved any more. |
Sounds good. |
Shellcheck is complaining about syntax in a comment (false positive). Oh wait, it's not a false positive because it's in double quotes. If you change the quotes used by |
tests/functional/platforms/08-warn-if-regex-matches-localhost.t
Outdated
Show resolved
Hide resolved
tests/functional/platforms/08-warn-if-regex-matches-localhost.t
Outdated
Show resolved
Hide resolved
Ooh good catch by shellcheck - SC1011: This apostrophe terminated the single quoted string! |
convert warning to outright error ensure that failure occurs wherever in hte platforms list the inappropriate regex is. Update tests/functional/platforms/08-warn-if-regex-matches-localhost.t Co-authored-by: Oliver Sanders <[email protected]> removed two tests which will fail (correctly) after changes
b13a574
to
242101f
Compare
…tim/cylc into warn.global-config-contains-localhost * 'warn.global-config-contains-localhost' of github.com:wxtim/cylc: changelog Remove setting of execution timeout based on execution time limit jinja2: improve error context information Update cylc/flow/workflow_files.py contact: process check should handle dirty JSON
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.
I've checked this out and read the code. Tests pass locally for me. No problems found from me. Thanks @wxtim
[platforms]
section; Add warning if a platform name regex matches localhost
These changes close #4845
[post-hoc edit to ticket for the benefit of users clicking on changelog]
Summary
Expand Platform definitions:
Allow platform definitions to use comma separated lists and be expanded as task definitions are. E.g
is now equivelant to
Fail if "localhost" matches a platform definition Regex.
Because "localhost" platform is a default item it is always the last platform to be checked. If any platform definition is a regex which matches "localhost" then that definition will be used instead. To prevent this, bad such platform definitions.
Example
In the following example
localhost|foo|bar...
would have always been selected before this change, but will now be rejected.Requirements check-list
CONTRIBUTING.md
and added my name as a Code Contributor.setup.cfg
andconda-environment.yml
.