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

Enhance logic to map ScramArch to OS #11088

Merged
merged 2 commits into from
Apr 12, 2022
Merged

Conversation

amaltaro
Copy link
Contributor

Fixes #11081

Status

ready

Description

The previous logic was checking whether the first part of the ScramArch was in the ScramArch defined in the logic, which of course can fail if we test a substring like "el8" in "el888_amd64_gcc630". Of course, it's very likely to become a problem, but I think it's worth changing it.

This PR changes it and now we check for equality.

Is it backward compatible (if not, which system it affects?)

YES

Related PRs

Meant to fix a typo in this PR: #11083, but now it became a minor refactoring.

External dependencies / deployment changes

None

@amaltaro
Copy link
Contributor Author

FYI @mapellidario Dario, if I am not wrong, you were working with this code (or the one in Scram.py).

@amaltaro amaltaro requested a review from vkuznet April 12, 2022 12:45

Returns:
string to be matched for OS requirements for job
:param scramArch: string of list of scramArches defined for a given job

Choose a reason for hiding this comment

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

may be it should be "string or list of ...." :-)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks! Typo fixed.

@cmsdmwmbot
Copy link

Jenkins results:

  • Python3 Unit tests: succeeded
    • 7 tests added
    • 2 changes in unstable tests
  • Python3 Pylint check: failed
    • 5 warnings and errors that must be fixed
    • 7 comments to review
  • Pylint py3k check: succeeded
  • Pycodestyle check: succeeded

Details at https://cmssdt.cern.ch/dmwm-jenkins/view/All/job/DMWM-WMCore-PR-test/13008/artifact/artifacts/PullRequestReport.html

@smuzaffar
Copy link

looks good

@cmsdmwmbot
Copy link

Jenkins results:

  • Python3 Unit tests: succeeded
    • 7 tests added
    • 1 changes in unstable tests
  • Python3 Pylint check: failed
    • 5 warnings and errors that must be fixed
    • 7 comments to review
  • Pylint py3k check: succeeded
  • Pycodestyle check: succeeded

Details at https://cmssdt.cern.ch/dmwm-jenkins/view/All/job/DMWM-WMCore-PR-test/13009/artifact/artifacts/PullRequestReport.html

@amaltaro
Copy link
Contributor Author

Thanks for your review, Shahzad.

@amaltaro amaltaro merged commit 73fa2c9 into dmwm:master Apr 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cleanup jobs requesting an empty OS at the job classad
3 participants