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

Intel host select.get platform group #3868

Closed
wants to merge 2 commits into from

Conversation

wxtim
Copy link
Member

@wxtim wxtim commented Oct 14, 2020

These changes are a pre-requisite to addressing #3827
To carry out intelligent host selection the code needs to have access not to platforms but to platform groups.

To this end this PR

  • Replaces platforms.get_platform with platforms.get_platform_group and platforms.get_platform_from_name to get_platforms_from_name, so that code calling it has information about the whole group of platforms. If regex only matches a single platform rather than a platform group then a dummy platform group dictionary containing that single platform is returned. Question: Should this have selection method set to "first" to save time?
  • Adds function platforms.get_localhost_platform - in many places in the code get_platform() is called. This function replaces that one, and makes it easier to differentiate cases where we just want info about the localhost platform with cases where something more complex is happening.
  • Adds a function platforms.get_host_from_platform_group. As with platforms.get_host_from_platform this is a placeholder for more sophisticated logic. At the moment it simply picks a random platform from the platform_group and calls get_host_from_platform.

get_platform -> get_platform_group
platform_from_name -> platforms_from_name
@wxtim wxtim requested review from oliver-sanders and datamel and removed request for oliver-sanders October 14, 2020 09:26
@wxtim wxtim self-assigned this Oct 14, 2020
@wxtim wxtim added this to the cylc-8.0b0 milestone Oct 14, 2020
@wxtim wxtim linked an issue Oct 14, 2020 that may be closed by this pull request
@wxtim wxtim added could be better Not exactly a bug, but not ideal. platforms-follow-up labels Oct 14, 2020
 - get_platform => get_platform_group in codebase
 - get_host_from_platform_group added to ease use.
 - some platforms got from platform group by hardcoded random.choice
@wxtim wxtim force-pushed the intel-host-select.get_platform_group branch from 2e3d0e1 to fa8d7a5 Compare October 14, 2020 09:31
@wxtim
Copy link
Member Author

wxtim commented Oct 15, 2020

Closed in favour of cracking on with IHS having reached this milestone point.

@wxtim wxtim closed this Oct 15, 2020
@oliver-sanders oliver-sanders removed this from the cylc-8.0b0 milestone Nov 10, 2020
@wxtim wxtim deleted the intel-host-select.get_platform_group branch March 22, 2022 17:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
could be better Not exactly a bug, but not ideal.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

platforms: platform and host selection methods and intelligent fallback
2 participants