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

test(NNS): run upgrade_canisters_with_golden_nns_state daily #190

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
16800ca
chore(NNS): run upgrade_canisters_with_golden_nns_state daily
basvandijk Jun 6, 2024
8d5dfd7
temporary commit to test if the job runs successfully
basvandijk Jun 6, 2024
79a2988
bazel run //:buildifier
basvandijk Jun 6, 2024
3725ffc
Set NNS_CANISTER_UPGRADE_SEQUENCE
basvandijk Jun 6, 2024
5a0f748
inherit SSH_AUTH_SOCK
basvandijk Jun 6, 2024
df99c0f
fix
basvandijk Jun 6, 2024
71266ff
Add the SSH private key to the ssh-agent
basvandijk Jun 7, 2024
907d612
some more SSH related fixes
basvandijk Jun 7, 2024
5b34005
experiment to see if removing ~/.ssh fixes authentication
basvandijk Jun 10, 2024
cd154df
inspect env vars
basvandijk Jun 10, 2024
429f004
chore(IDX): relabel CI jobs (#204)
marko-k0 Jun 10, 2024
7e3c721
debug with ssh-add -L
basvandijk Jun 10, 2024
d738ac4
uncomment
basvandijk Jun 10, 2024
1fe0468
Merge remote-tracking branch 'github/mirroring' into basvandijk/daily…
basvandijk Jun 10, 2024
1dc2e4c
comment
basvandijk Jun 10, 2024
c42d26b
debug
basvandijk Jun 11, 2024
2710ceb
uncomment
basvandijk Jun 11, 2024
dd98fbc
Merge remote-tracking branch 'github/mirroring' into basvandijk/daily…
basvandijk Jun 11, 2024
2b0e6b3
comment
basvandijk Jun 11, 2024
784753c
check
basvandijk Jun 11, 2024
8207c76
fix
basvandijk Jun 11, 2024
b585979
Merge remote-tracking branch 'github/mirroring' into basvandijk/daily…
basvandijk Jun 11, 2024
6133608
--spawn_strategy=local
basvandijk Jun 11, 2024
f73692b
uncomment
basvandijk Jun 19, 2024
bd66c77
Merge remote-tracking branch 'github/mirroring' into basvandijk/daily…
basvandijk Jun 19, 2024
4540e4a
Use no-sandbox
basvandijk Jun 19, 2024
8f0978c
cleanup
basvandijk Jun 19, 2024
61cec95
Use dind-large runner
basvandijk Jun 19, 2024
0782a00
fix clippy
basvandijk Jun 19, 2024
4e08bef
bazel run //:buildifier
basvandijk Jun 19, 2024
58da0b1
fix
basvandijk Jun 19, 2024
e6aaaf1
improvements
basvandijk Jun 19, 2024
89af997
add before-script
basvandijk Jun 19, 2024
8395b06
set DOCKER_HUB_* env vars
basvandijk Jun 19, 2024
aa04e88
set BUILDEVENT_* env vars
basvandijk Jun 19, 2024
3db8d09
ready
basvandijk Jun 19, 2024
1e9fe6d
Merge branch 'mirroring' into basvandijk/daily-upgrade_canisters_with…
marko-k0 Jun 19, 2024
d66ca2a
Reduce timeout-minutes: 180 -> 20
basvandijk Jun 19, 2024
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 .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ build --build_tag_filters="-system_test,-upload,-fuzz_test"
test --test_tag_filters="-system_test,-post_master,-fuzz_test"
test:alltests --test_tag_filters=""
test:paritytests --test_tag_filters="-system_test"
test:ci --test_tag_filters="-post_master,-system_test_hourly,-system_test_nightly,-system_test_nightly_nns,-system_test_staging,-system_test_hotfix,-fuzz_test"
test:ci --test_tag_filters="-post_master,-system_test_hourly,-system_test_nightly,-system_test_nightly_nns,-system_test_staging,-system_test_hotfix,-fuzz_test,-nns_tests_nightly"

test --test_output=errors
test --test_env=RUST_BACKTRACE=full
Expand Down
12 changes: 12 additions & 0 deletions .github/actions/bazel-test-all/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ inputs:
default: "false"
HONEYCOMB_API_TOKEN:
required: false
SSH_PRIVATE_KEY:
required: false

runs:
using: "composite"
Expand All @@ -39,6 +41,15 @@ runs:
sudo chown -RL 1001:1001 /cache
fi

if [ -n "$SSH_PRIVATE_KEY" ]; then
# The following adds the SSH private key to the ssh-agent such that CI can SSH into the backup pod.
test -z "${SSH_AUTH_SOCK:-}" && { eval "$(ssh-agent -s)"; ssh-add - <<< "${SSH_PRIVATE_KEY}"; }
rm -rf ~/.ssh
mkdir -p ~/.ssh
chmod 0700 ~/.ssh
echo -e "Host *\nUser github-runner\n" > ~/.ssh/config
fi

${GITHUB_WORKSPACE}/gitlab-ci/src/bazel-ci/main.sh
BAZEL_EXIT_CODE="$?"

Expand All @@ -55,3 +66,4 @@ runs:
BAZEL_STARTUP_ARGS: ${{ inputs.BAZEL_STARTUP_ARGS }}
RUN_ON_DIFF_ONLY: ${{ inputs.RUN_ON_DIFF_ONLY }}
HONEYCOMB_API_TOKEN: ${{ inputs.HONEYCOMB_API_TOKEN }}
SSH_PRIVATE_KEY: ${{ inputs.SSH_PRIVATE_KEY }}
30 changes: 30 additions & 0 deletions .github/workflows/schedule-daily.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ env:
CI_PROJECT_DIR: ${{ github.workspace }}
CI_MERGE_REQUEST_TARGET_BRANCH_NAME: ${{ github.event.pull_request.base.ref }}
ROOT_PIPELINE_ID: ${{ github.run_id }}
DOCKER_HUB_USER: ${{ secrets.DOCKER_HUB_USER }}
DOCKER_HUB_PASSWORD_RO: ${{ secrets.DOCKER_HUB_PASSWORD_RO }}
BUILDEVENT_APIKEY: ${{ secrets.HONEYCOMB_API_TOKEN }}
BUILDEVENT_DATASET: "github-ci-dfinity"

jobs:
# TODO: there was some issue with this job so commented out for now:
Expand Down Expand Up @@ -100,3 +104,29 @@ jobs:
BAZEL_CI_CONFIG: "--config=ci --repository_cache=/cache/bazel"
ZH2_DLL01_CSV_SECRETS: "${{ secrets.ZH2_DLL01_CSV_SECRETS }}"
ZH2_FILE_SHARE_KEY: "${{ secrets.ZH2_FILE_SHARE_KEY }}"

nns-tests-nightly:
name: NNS Tests Nightly
runs-on:
group: dind-large
container:
image: ghcr.io/dfinity/ic-build@sha256:5bd0f059ad6e21966e9c644516b6ecd52d5ed44f1b18a76b91b59740a9d639a2
timeout-minutes: 20
if: ${{ vars.RUN_CI == 'true' }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Before script
id: before-script
shell: bash
run: ./gitlab-ci/src/ci-scripts/before-script.sh
- name: Run NNS Tests Nightly
id: bazel-test-all
uses: ./.github/actions/bazel-test-all/
with:
BAZEL_COMMAND: "test"
BAZEL_TARGETS: "//rs/nns/..."
BAZEL_CI_CONFIG: "--config=ci --repository_cache=/cache/bazel"
BAZEL_EXTRA_ARGS: "--keep_going --verbose_failures --test_tag_filters=nns_tests_nightly --test_env=SSH_AUTH_SOCK --test_env=NNS_CANISTER_UPGRADE_SEQUENCE=all"
HONEYCOMB_API_TOKEN: ${{ secrets.HONEYCOMB_API_TOKEN }}
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
3 changes: 2 additions & 1 deletion rs/nns/integration_tests/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,8 @@ rust_ic_test(
env = DEV_ENV,
proc_macro_deps = MACRO_DEPENDENCIES + MACRO_DEV_DEPENDENCIES,
tags = [
"manual", # CI should not be downloading nns_state.tar.zst.
"nns_tests_nightly", # Run this test in the nns-tests-nightly GitHub Action job.
basvandijk marked this conversation as resolved.
Show resolved Hide resolved
"no-sandbox", # such that the test can access the file $SSH_AUTH_SOCK.
"requires-network", # Because mainnet state is downloaded (and used).
],
deps = DEPENDENCIES + DEV_DEPENDENCIES,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ use ic_nns_test_utils::{
},
};
use ic_nns_test_utils_golden_nns_state::new_state_machine_with_golden_nns_state_or_panic;
use std::str::FromStr;
basvandijk marked this conversation as resolved.
Show resolved Hide resolved
use std::{
env,
fmt::{Debug, Formatter},
Expand Down
Loading