Skip to content

PR check generator: add excludeOsAndVersionCombination #2350

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

Merged
merged 4 commits into from
Jun 24, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Rename for clarity per PR review
  • Loading branch information
angelapwen committed Jun 24, 2024
commit 7c35b4f6b532751db53ff3fab0e00b16f7fa0179
6 changes: 3 additions & 3 deletions pr-checks/sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"nightly-latest"
]

def is_version_and_os_excluded(version, os, exclude_params):
def is_os_and_version_excluded(version, os, exclude_params):
Copy link
Contributor

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):

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good call ✨

for exclude_param in exclude_params:
if exclude_param[0] == os and exclude_param[1] == version:
return True
Expand Down Expand Up @@ -63,7 +63,7 @@ def writeHeader(checkStream):
with open(file, 'r') as checkStream:
checkSpecification = yaml.load(checkStream)
matrix = []
excludedVersionsAndOses = checkSpecification.get('excludeOsAndVersionCombination', [])
excludedOsesAndVersions = checkSpecification.get('excludeOsAndVersionCombination', [])
for version in checkSpecification.get('versions', defaultTestVersions):
runnerImages = ["ubuntu-latest", "macos-latest", "windows-latest"]
operatingSystems = checkSpecification.get('operatingSystems', ["ubuntu", "macos", "windows"])
Expand All @@ -73,7 +73,7 @@ def writeHeader(checkStream):

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):
if is_os_and_version_excluded(version, operatingSystem, excludedOsesAndVersions):
continue

# Prior to CLI v2.15.1, ARM runners were not supported by the build tracer.
Expand Down
Loading
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy