-
Notifications
You must be signed in to change notification settings - Fork 323
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
PR check generator: add excludeOsAndVersionCombination
#2350
Conversation
62fb0a9
to
9ff3492
Compare
Now that CLI v2.17.4+ are available, we can switch this job back to `ubuntu`. As a result, we can also bring back testing on the older CLI versions (which did not work on MacOS). CLI v.2.16.6 has a known failure on Linux so we exclude it from this workflow. This change is orthogonal to the PR check generator change as the check doesn't use the generator.
9ff3492
to
462c756
Compare
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.
Just a small suggestion to reduce the likelihood of an argument ordering mismatch
pr-checks/sync.py
Outdated
matrix = [] | ||
excludedVersionsAndOses = checkSpecification.get('excludeOsAndVersionCombination', []) |
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.
We could rename to excludedOsesAndVersions
for clarity since it's OSes first and versions second
pr-checks/sync.py
Outdated
|
||
for runnerImage in runnerImagesForOs: | ||
# Skip appending this combination to the matrix if it is explicitly excluded. | ||
if is_version_and_os_excluded(version, operatingSystem, excludedVersionsAndOses): |
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.
Similarly here consider using the same order of OS and version as in the YAML.
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.
Good point, I actually misordered it myself when testing initially 😆
pr-checks/sync.py
Outdated
@@ -27,6 +27,12 @@ | |||
"nightly-latest" | |||
] | |||
|
|||
def is_os_and_version_excluded(version, os, exclude_params): |
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.
Final suggestion: match the order of the arguments too, e.g. is_os_and_version_excluded(os, version, exclude_params):
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.
Good call ✨
Updated the branch protection rules accordingly for |
We often need to exclude specific combinations of CLI versions + operating systems. Previously there was no easy way to do this: we would run all CLI versions specified against all operating systems specified. This change adds the
excludeOsAndVersionCombination
parameter to do just that!To test, I re-enabled Swift on Linux for CLI v >= 2.17.4, which remained as a to-do item after we disabled those checks in #2299. Note that
default
,linked
, andnightly-latest
are all now current enough to re-enable those. The new generator script allows us to exclude all older CLI versions on Linux.I'll update the required PR checks once this PR is approved ✅
Merge / deployment checklist