Skip to content

Commit

Permalink
fix(IDX): don't run system tests with 'local' by default
Browse files Browse the repository at this point in the history
This ensures that -- by default -- system tests are not with run the
`local` strategy. When run `local`ly, system tests don't seem to get
cached across server restarts.

The `select()` which was evaluated as a boolean was truthy meaning the
`local` tag was always added. Instead, the `local` strategy is specified
as a CLI arg in the k8s CI job.
  • Loading branch information
nmattia committed Mar 4, 2025
1 parent f166377 commit 78b8baa
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/system-tests-k8s.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,12 @@ jobs:
env:
CLOUD_CREDENTIALS_CONTENT: ${{ secrets.CLOUD_CREDENTIALS_CONTENT }}
with:
# set "local" tag for k8s system tests due to rootful container image builds
BAZEL_COMMAND: >-
test
--config=ci
--local_test_jobs=${{ env.JOBS }} --test_tag_filters=k8s,-manual,-colocated,-long_test,-system_test_hourly,-system_test_nightly --k8s
--config=k8s
--local_test_jobs=${{ env.JOBS }} --test_tag_filters=k8s,-manual,-colocated,-long_test,-system_test_hourly,-system_test_nightly
BAZEL_TARGETS: ${{ env.TARGETS }}
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}

Expand Down Expand Up @@ -152,10 +154,12 @@ jobs:
env:
CLOUD_CREDENTIALS_CONTENT: ${{ secrets.CLOUD_CREDENTIALS_CONTENT }}
with:
# set "local" tag for k8s system tests due to rootful container image builds
BAZEL_COMMAND: >-
test
--config=ci
--local_test_jobs=${{ env.JOBS }} --test_tag_filters=k8s --k8s --flaky_test_attempts=3
--config=k8s
--local_test_jobs=${{ env.JOBS }} --test_tag_filters=k8s --flaky_test_attempts=3
BAZEL_TARGETS: ${{ env.TARGETS }}
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}

Expand Down
3 changes: 3 additions & 0 deletions bazel/conf/.bazelrc.build
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ common --flag_alias=s3_upload=//ci/src/artifacts:s3_upload
common --flag_alias=k8s=//rs/tests:k8s
common --flag_alias=timeout_value=//bazel:timeout_value


common:k8s --k8s --strategy_regexp='Testing.*'=local

common:stamped --workspace_status_command='$(pwd)/bazel/workspace_status.sh --stamp'
common:release --config=stamped --s3_upload=True

Expand Down
9 changes: 1 addition & 8 deletions rs/tests/system_tests.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -274,12 +274,6 @@ def system_test(
if uses_boundary_guestos:
icos_images["ENV_DEPS__BOUNDARY_GUESTOS_DISK_IMG"] = "//ic-os/boundary-guestos/envs/dev:disk-img.tar.zst"

# set "local" tag for k8s system tests due to rootful container image builds
is_k8s = select({
"//rs/tests:k8s": True,
"//conditions:default": False,
})

run_system_test(
name = name,
src = test_driver_target,
Expand All @@ -288,8 +282,7 @@ def system_test(
env = env,
icos_images = icos_images,
env_inherit = env_inherit,
tags = tags + ["requires-network", "system_test"] + (["local"] if is_k8s else []) +
(["manual"] if "experimental_system_test_colocation" in tags else []),
tags = tags + ["requires-network", "system_test"] + (["manual"] if "experimental_system_test_colocation" in tags else []),
target_compatible_with = ["@platforms//os:linux"],
timeout = test_timeout,
flaky = flaky,
Expand Down

0 comments on commit 78b8baa

Please sign in to comment.