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

job platforms: Forward lookup #3459

Merged
merged 7 commits into from
Dec 13, 2019
Merged

job platforms: Forward lookup #3459

merged 7 commits into from
Dec 13, 2019

Conversation

datamel
Copy link
Contributor

@datamel datamel commented Dec 5, 2019

Added forward lookup method

  • checks if specified platform (will come from suite.rc file) is a valid platfrom (listed in global.rc file).
  • checks in reverse order to ensure user platform selection overrides global setting.
  • If no platform is selected by user, defaults to 'localhost'.
  • If platform not found in list, returns a Platform error.

Tests added to ensure working as required.
These changes relate to Platform support #3453

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).
  • Appropriate tests are included (unit and/or functional).
  • No change log entry required (invisible to users).
  • No documentation update required as yet.

cylc/flow/platform_lookup.py Outdated Show resolved Hide resolved
@wxtim wxtim requested a review from hjoliver December 6, 2019 09:15
@oliver-sanders oliver-sanders changed the title Forward lookup job platforms: Forward lookup Dec 9, 2019
@oliver-sanders oliver-sanders added this to the cylc-8.0.0 milestone Dec 9, 2019
Copy link
Member

@oliver-sanders oliver-sanders left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

cylc/flow/platform_lookup.py Outdated Show resolved Hide resolved
cylc/flow/tests/test_platform_lookup.py Outdated Show resolved Hide resolved
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.

Looks good, but:

  • one item name change suggested
  • one question: sorry if I missed this in the proposal, but have we lost the ability to specify a job host in the suite config file if it has not already been defined in the global config file?

cylc/flow/platform_lookup.py Outdated Show resolved Hide resolved
@wxtim
Copy link
Member

wxtim commented Dec 11, 2019

one question: sorry if I missed this in the proposal, but have we lost the ability to specify a job host in the suite config file if it has not already been defined in the global config file?

Yes. But because the platform can be a regex (and therefore allow the creation of a lot of similar platforms) it will seem to the user like they can just add hosts, as long as the host fit the patterns. Additionally, any user who is really desperate can define their own platforms in their user config.

- changed slicing reverse to reversed
- changed task_platform to job_platform
- removed development comment
@hjoliver
Copy link
Member

Codacy Here is an overview of what got changed by this pull request:

Complexity increasing per file
==============================
- cylc/flow/platform_lookup.py  4
         

See the complete overview on Codacy

@wxtim wxtim requested review from wxtim and removed request for wxtim and dpmatthews December 12, 2019 14:03
@hjoliver hjoliver merged commit 686f643 into cylc:master Dec 13, 2019
@hjoliver hjoliver modified the milestones: cylc-8.0.0, cylc-8.0a2 Jan 22, 2020
@datamel datamel deleted the forward-lookup branch September 20, 2022 09:58
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 this pull request may close these issues.

4 participants