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

Fix arm runner filter #67197

Merged
merged 2 commits into from
Jan 24, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 1 addition & 1 deletion .github/workflows/test-action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,7 @@ jobs:
include-hidden-files: true

test-linux-arm64:
name: ${{ matrix.display_name }} ${{ matrix.tests-chunk }} ${{ matrix.transport }}${{ matrix.fips && '(fips)' || '' }}${{ matrix.test-group && ' ' || '' }}${{ matrix.test-group && matrix.test-group || '' }}
name: ${{ matrix.display_name }} arm64 ${{ matrix.tests-chunk }} ${{ matrix.transport }}${{ matrix.fips && '(fips)' || '' }}${{ matrix.test-group && ' ' || '' }}${{ matrix.test-group && matrix.test-group || '' }}
runs-on: ${{ matrix.arch == 'x86_64' && 'ubuntu-22.04' || inputs.linux_arm_runner }}
if: ${{ toJSON(fromJSON(inputs.matrix)['linux']) != '[]' }}
# Full test runs. Each chunk should never take more than 2 hours.
Expand Down
26 changes: 17 additions & 9 deletions tools/ci.py
Original file line number Diff line number Diff line change
Expand Up @@ -1472,18 +1472,15 @@ def upload_coverage(ctx: Context, reports_path: pathlib.Path, commit_sha: str =
ctx.exit(0)


def _os_test_filter(osdef, transport, chunk):
def _os_test_filter(osdef, transport, chunk, arm_runner):
"""
Filter out some test runs based on os, tranport and chunk to be run.
"""
if transport == "tcp" and chunk in ("unit", "functional"):
return False
if "macos" in osdef.slug and chunk == "scenarios":
return False
if osdef.arch == "arm64" and os.environ.get("LINUX_ARM_RUNNER", "0") not in (
"0",
"",
):
if not arm_runner:
return False
if transport == "tcp" and osdef.slug not in (
"rockylinux-9",
Expand Down Expand Up @@ -1737,7 +1734,9 @@ def workflow_config(
**_.as_dict(),
)
for _ in TEST_SALT_LISTING[platform]
if _os_test_filter(_, transport, chunk)
if _os_test_filter(
_, transport, chunk, config["linux_arm_runner"]
)
]
else:
for arch in ["x86_64", "arm64"]:
Expand All @@ -1754,7 +1753,12 @@ def workflow_config(
**_.as_dict(),
)
for _ in TEST_SALT_LISTING[platform]
if _os_test_filter(_, transport, chunk)
if _os_test_filter(
_,
transport,
chunk,
config["linux_arm_runner"],
)
and _.arch == arch
]
else:
Expand All @@ -1767,7 +1771,9 @@ def workflow_config(
**_.as_dict(),
)
for _ in TEST_SALT_LISTING[platform]
if _os_test_filter(_, transport, chunk)
if _os_test_filter(
_, transport, chunk, config["linux_arm_runner"]
)
]
else:
for arch in ["x86_64", "arm64"]:
Expand All @@ -1779,7 +1785,9 @@ def workflow_config(
**_.as_dict(),
)
for _ in TEST_SALT_LISTING[platform]
if _os_test_filter(_, transport, chunk)
if _os_test_filter(
_, transport, chunk, config["linux_arm_runner"]
)
and _.arch == arch
]

Expand Down
Loading