Skip to content

Commit b334061

Browse files
Merge branch 'master' into pmarco/fix-golden-state-test-split-time-advancement
2 parents 11586b2 + 31ca9d3 commit b334061

File tree

223 files changed

+4845
-2542
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

223 files changed

+4845
-2542
lines changed

.bazelversion

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
8.5.1
1+
8.6.0

.claude/CLAUDE.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,13 @@ After changing Rust code (`*.rs`) follow these steps in order:
88

99
1. **Format** by running the following from the root of the repository:
1010
```
11+
cd "$(git rev-parse --show-toplevel)"
1112
rustfmt <MODIFIED_RUST_FILES>
1213
```
1314
where `<MODIFIED_RUST_FILES>` is a space separated list of paths of all modified Rust files relative to the root of the repository.
1415
2. **Lint** by running the following from the root of the repository:
1516
```
17+
cd "$(git rev-parse --show-toplevel)"
1618
cargo clippy --all-features <CRATES> -- \
1719
-D warnings \
1820
-D clippy::all \
@@ -30,6 +32,7 @@ After changing Rust code (`*.rs`) follow these steps in order:
3032
Fix any linting errors.
3133
3. **Build** the directly affected bazel targets by running the following from the root of the repository:
3234
```
35+
cd "$(git rev-parse --show-toplevel)"
3336
TARGETS="$(bazel query 'kind(rule, rdeps(//..., set(<MODIFIED_FILES>), 1))' --keep_going 2>/dev/null)"
3437
if [ -n "$TARGETS" ]; then
3538
bazel build $TARGETS
@@ -40,6 +43,7 @@ After changing Rust code (`*.rs`) follow these steps in order:
4043
Fix all build errors.
4144
4. **Test** the directly affected bazel tests by running the following from the root of the repository:
4245
```
46+
cd "$(git rev-parse --show-toplevel)"
4347
TESTS="$(bazel query 'kind(".*_test|test_suite", kind(rule, rdeps(//..., set(<MODIFIED_FILES>), 2)))' --keep_going 2>/dev/null)"
4448
if [ -n "$TESTS" ]; then
4549
bazel test --test_output=errors $TESTS

.devcontainer/devcontainer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"image": "ghcr.io/dfinity/ic-build@sha256:15e6eca52d696697a681916c92ab3623ebff1fcff70156220b0270c2985a6b2b",
2+
"image": "ghcr.io/dfinity/ic-dev@sha256:fe06783d9cf8e9fc901a5996d9fc8b726f15769f2fd6bd86969d1fbbf77ae025",
33
"remoteUser": "ubuntu",
44
"privileged": true,
55
"runArgs": [

.github/CODEOWNERS

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,9 @@ go.sum @dfinity/idx
137137
/rs/interfaces/ @dfinity/ic-interface-owners
138138
/rs/interfaces/adapter_client/ @dfinity/consensus
139139
/rs/interfaces/certified_stream_store/ @dfinity/team-dsm
140-
/rs/interfaces/mocks/src/payload_builder @dfinity/consensus
140+
/rs/interfaces/mocks/src/consensus_pool.rs @dfinity/consensus
141+
/rs/interfaces/mocks/src/crypto.rs @dfinity/consensus
142+
/rs/interfaces/mocks/src/payload_builder.rs @dfinity/consensus
141143
/rs/interfaces/registry/ @dfinity/governance-team
142144
/rs/interfaces/src/canister_http.rs @dfinity/consensus
143145
/rs/interfaces/src/consensus.rs @dfinity/consensus

.github/actions/bazel/action.yaml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -65,14 +65,6 @@ runs:
6565
run: |
6666
set -euo pipefail
6767
68-
# Set up .netrc so that bazel can authenticate with GitHub to have higher rate limits for fetching dependencies.
69-
touch ~/.netrc
70-
chmod 600 ~/.netrc
71-
echo "machine github.com login x-access-token password ${{ github.token }}" > ~/.netrc
72-
echo "machine api.github.com login x-access-token password ${{ github.token }}" >> ~/.netrc
73-
echo "Current GitHub API rate limits:"
74-
curl -s --netrc https://api.github.com/rate_limit | jq '.resources.core'
75-
7668
# Here we overwrite the PATH with our custom bazel wrapper to ensure
7769
# the specified commands are run with the CI-specific options included
7870
# in the wrapper.

.github/actions/netrc/action.yaml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: 'GitHub Authentication with netrc'
2+
description: Set up authentication in netrc using github token. Picked up by tools like Bazel.
3+
4+
runs:
5+
using: "composite"
6+
steps:
7+
# write netrc to $HOME
8+
- shell: bash
9+
run: |
10+
# Set up .netrc so that tools can authenticate with GitHub to have higher rate limits for fetching dependencies.
11+
touch ~/.netrc
12+
chmod 600 ~/.netrc
13+
echo "machine github.com login x-access-token password ${{ github.token }}" > ~/.netrc
14+
echo "machine api.github.com login x-access-token password ${{ github.token }}" >> ~/.netrc
15+
echo "Current GitHub API rate limits:"
16+
17+
# Show how close we are to the limits (ignore errors from curl or invalid JSON)
18+
curl -sf --netrc https://api.github.com/rate_limit 2>/dev/null | \
19+
jq -r '.resources.core | "Rate limit remaining: \(.remaining)/\(.limit) (resets at \(.reset | strftime("%Y-%m-%d %H:%M:%S %Z")))"' 2>/dev/null \
20+
|| echo "Could not retrieve rate limit information"

.github/workflows/api-bn-recovery-test.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,15 @@ jobs:
2222
runs-on:
2323
labels: dind-large
2424
container:
25-
image: ghcr.io/dfinity/ic-build@sha256:2caf6df6009b29ede72a520b60f3db064324e22192be532349caa82a987f8c50
25+
image: ghcr.io/dfinity/ic-build@sha256:18d23aef1f5e9e7e1eef94c32563f8ed15531ae79065bb00bb5206a643fc49fe
2626
options: >-
2727
-e NODE_NAME --privileged --cgroupns host
2828
--mount type=tmpfs,target="/home/buildifier/.local/share/containers"
2929
timeout-minutes: 15
3030
steps:
3131
- name: Checkout
3232
uses: actions/checkout@v4
33+
- uses: ./.github/actions/netrc
3334

3435
- name: Install dfx
3536
run: |

.github/workflows/ci-main.yml

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
runs-on: &dind-large-setup
2727
labels: dind-large
2828
container: &container-setup
29-
image: ghcr.io/dfinity/ic-build@sha256:15e6eca52d696697a681916c92ab3623ebff1fcff70156220b0270c2985a6b2b
29+
image: ghcr.io/dfinity/ic-build@sha256:18d23aef1f5e9e7e1eef94c32563f8ed15531ae79065bb00bb5206a643fc49fe
3030
options: >-
3131
-e NODE_NAME --privileged --cgroupns host --mount type=tmpfs,target="/tmp/containers"
3232
timeout-minutes: 90
@@ -37,6 +37,7 @@ jobs:
3737
with:
3838
fetch-depth: ${{ github.event_name == 'pull_request' && 256 || 0 }}
3939
ref: ${{ inputs.commit-sha }}
40+
- uses: ./.github/actions/netrc
4041
- name: Run Libfuzzer targets
4142
uses: ./.github/actions/bazel
4243
with:
@@ -159,6 +160,7 @@ jobs:
159160
timeout-minutes: 150
160161
steps:
161162
- *checkout
163+
- uses: ./.github/actions/netrc
162164
- name: "Node Name"
163165
run: |
164166
echo "::notice::Node Name: ${NODE_NAME}"
@@ -281,6 +283,7 @@ jobs:
281283
with:
282284
fetch-depth: 1 # on macOS we don't need any git history
283285
ref: ${{ inputs.commit-sha }}
286+
- uses: ./.github/actions/netrc
284287
# The amd64-darwin runners are pretty slow so we don't always run the tests -- we do however
285288
# wanna make sure bazel evaluates successfully.
286289
- name: Evaluate workspace
@@ -353,19 +356,9 @@ jobs:
353356
nsc bazel cache setup --bazelrc=/tmp/bazel-cache.bazelrc
354357
cat /tmp/bazel-cache.bazelrc
355358
- uses: actions/checkout@v4
359+
- uses: ./.github/actions/netrc
356360
- name: Build and Test
357361
run: |
358-
# Set up .netrc so that bazel can authenticate with GitHub to have higher rate limits for fetching dependencies.
359-
touch ~/.netrc
360-
chmod 600 ~/.netrc
361-
echo "machine github.com login x-access-token password ${{ github.token }}" > ~/.netrc
362-
echo "machine api.github.com login x-access-token password ${{ github.token }}" >> ~/.netrc
363-
echo "Current GitHub API rate limits:"
364-
365-
# Show how close we are to the limits
366-
curl -s --netrc https://api.github.com/rate_limit | \
367-
jq -r '.resources.core | "Rate limit remaining: \(.remaining)/\(.limit) (resets at \(.reset | strftime("%Y-%m-%d %H:%M:%S %Z")))"'
368-
369362
mkdir -p /tmp/zig-cache
370363
371364
bazel \
@@ -504,6 +497,7 @@ jobs:
504497
if: ${{ github.event_name != 'merge_group' }}
505498
steps:
506499
- *checkout
500+
- uses: ./.github/actions/netrc
507501
- name: "Node Name"
508502
run: |
509503
echo "::notice::Node Name: ${NODE_NAME}"
@@ -637,6 +631,7 @@ jobs:
637631
timeout-minutes: 90
638632
steps:
639633
- *checkout
634+
- uses: ./.github/actions/netrc
640635
- name: Run Bazel Build All No Cache
641636
uses: ./.github/actions/bazel
642637
with:
@@ -688,13 +683,18 @@ jobs:
688683
689684
check-pull-request-bazel-targets:
690685
name: Check PULL_REQUEST_BAZEL_TARGETS
691-
runs-on: ubuntu-latest
686+
runs-on:
687+
labels: dind-small
688+
container: *container-setup
692689
timeout-minutes: 30
693690
steps:
694691
- name: Checkout
695692
uses: actions/checkout@v4
693+
- uses: ./.github/actions/netrc
696694
- name: Check PULL_REQUEST_BAZEL_TARGETS
697-
run: ./ci/scripts/targets.py check
695+
uses: ./.github/actions/bazel
696+
with:
697+
run: ./ci/scripts/targets.py check
698698

699699
# only run on pull-request event - they are also triggered from schedule-daily.yml
700700
pocket-ic-tests-windows:
@@ -724,6 +724,7 @@ jobs:
724724
filters: |
725725
container-run:
726726
- '.github/workflows/ci-pr-only.yml'
727+
- '.github/workflows/container-autobuild.yml'
727728
- 'ci/container/**'
728729
- name: Test Container Run
729730
if: |

.github/workflows/ci-pr-only.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
runs-on: &dind-small-setup
3838
labels: dind-small
3939
container: &container-setup
40-
image: ghcr.io/dfinity/ic-build@sha256:15e6eca52d696697a681916c92ab3623ebff1fcff70156220b0270c2985a6b2b
40+
image: ghcr.io/dfinity/ic-build@sha256:18d23aef1f5e9e7e1eef94c32563f8ed15531ae79065bb00bb5206a643fc49fe
4141
options: >-
4242
-e NODE_NAME --mount type=tmpfs,target="/tmp/containers"
4343
steps:
@@ -47,6 +47,7 @@ jobs:
4747
# Ensures we fetch the merge-base, which we compare against
4848
fetch-depth: 0
4949
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || inputs.commit-sha }}
50+
- uses: ./.github/actions/netrc
5051
- name: Run candid compatibility checks
5152
uses: ./.github/actions/bazel
5253
with:
@@ -77,6 +78,7 @@ jobs:
7778
with:
7879
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.ref || inputs.commit-sha }}
7980
token: ${{ steps.app-token.outputs.token }}
81+
- uses: ./.github/actions/netrc
8082
- name: Run Linter
8183
id: linter
8284
uses: ./.github/actions/bazel

.github/workflows/container-api-bn-recovery.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,15 @@ jobs:
2828
runs-on:
2929
labels: dind-large
3030
container:
31-
image: ghcr.io/dfinity/ic-build@sha256:2caf6df6009b29ede72a520b60f3db064324e22192be532349caa82a987f8c50
31+
image: ghcr.io/dfinity/ic-build@sha256:18d23aef1f5e9e7e1eef94c32563f8ed15531ae79065bb00bb5206a643fc49fe
3232
options: >-
3333
-e NODE_NAME --privileged --cgroupns host
3434
--mount type=tmpfs,target="/home/buildifier/.local/share/containers"
3535
timeout-minutes: 60
3636
steps:
3737
- name: Checkout
3838
uses: actions/checkout@v4
39+
- uses: ./.github/actions/netrc
3940

4041
- name: Build binaries with Bazel
4142
uses: ./.github/actions/bazel

0 commit comments

Comments
 (0)