Skip to content

Commit ca44ead

Browse files
committed
Merge remote-tracking branch 'origin/master' into frankdavid/recovery-admin
# Conflicts: # rs/nns/governance/conversions/src/lib.rs
2 parents 651ff6e + 74793a4 commit ca44ead

File tree

170 files changed

+3938
-2150
lines changed

Some content is hidden

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

170 files changed

+3938
-2150
lines changed

.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:2e372158cdc56750ab57d4c770655c636fa5a9f80038a6b48768424b24430730",
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/netrc/action.yaml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ runs:
1414
echo "machine api.github.com login x-access-token password ${{ github.token }}" >> ~/.netrc
1515
echo "Current GitHub API rate limits:"
1616
17-
# Show how close we are to the limits
18-
curl -s --netrc https://api.github.com/rate_limit | \
19-
jq -r '.resources.core | "Rate limit remaining: \(.remaining)/\(.limit) (resets at \(.reset | strftime("%Y-%m-%d %H:%M:%S %Z")))"'
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: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
runs-on:
2323
labels: dind-large
2424
container:
25-
image: ghcr.io/dfinity/ic-build@sha256:2e372158cdc56750ab57d4c770655c636fa5a9f80038a6b48768424b24430730
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"

.github/workflows/ci-main.yml

Lines changed: 2 additions & 1 deletion
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:2e372158cdc56750ab57d4c770655c636fa5a9f80038a6b48768424b24430730
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
@@ -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: 1 addition & 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:2e372158cdc56750ab57d4c770655c636fa5a9f80038a6b48768424b24430730
40+
image: ghcr.io/dfinity/ic-build@sha256:18d23aef1f5e9e7e1eef94c32563f8ed15531ae79065bb00bb5206a643fc49fe
4141
options: >-
4242
-e NODE_NAME --mount type=tmpfs,target="/tmp/containers"
4343
steps:

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
runs-on:
2929
labels: dind-large
3030
container:
31-
image: ghcr.io/dfinity/ic-build@sha256:2e372158cdc56750ab57d4c770655c636fa5a9f80038a6b48768424b24430730
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"

.github/workflows/container-autobuild.yml

Lines changed: 26 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,8 @@ jobs:
6565
- image: ic-dev
6666
target: dev
6767
outputs:
68-
imageid: ${{ steps.set-imageid.outputs.imageid }} # both images share the same imageid
68+
ic-build-imageid: ${{ steps.set-output-imageid.outputs.ic-build-imageid }}
69+
ic-dev-imageid: ${{ steps.set-output-imageid.outputs.ic-dev-imageid }}
6970
steps:
7071
- name: Checkout
7172
uses: actions/checkout@v4
@@ -92,10 +93,17 @@ jobs:
9293
target: ${{ matrix.target }}
9394
build-args: |
9495
CI_USER=1001
95-
- name: Set imageid output
96-
id: set-imageid
97-
if: matrix.image == 'ic-build'
98-
run: echo "imageid=${{ steps.build.outputs.imageid }}" >> $GITHUB_OUTPUT
96+
- name: Set output imageid
97+
id: set-output-imageid
98+
run: |
99+
if [ "${{ matrix.image }}" == "ic-build" ]; then
100+
echo "ic-build-imageid=${{ steps.build.outputs.imageid }}" >> $GITHUB_OUTPUT
101+
elif [ "${{ matrix.image }}" == "ic-dev" ]; then
102+
echo "ic-dev-imageid=${{ steps.build.outputs.imageid }}" >> $GITHUB_OUTPUT
103+
else
104+
echo "Unknown image: ${{ matrix.image }}"
105+
exit 1
106+
fi
99107
100108
update-image-references:
101109
name: Update Image References in Repo
@@ -122,21 +130,26 @@ jobs:
122130
# Update container image references
123131
set -xeuo pipefail
124132
125-
IMG_NAME=${{ github.repository_owner }}/ic-build
126-
IMG_NAME_FULL="ghcr.io/${IMG_NAME}@${{ needs.ic-build-image.outputs.imageid }}"
133+
134+
IMAGE_PREFIX="ghcr.io/dfinity/"
135+
IMG_NAME_IC_BUILD="${IMAGE_PREFIX}ic-build@${{ needs.ic-build-image.outputs.ic-build-imageid }}"
136+
IMG_NAME_IC_DEV="${IMAGE_PREFIX}ic-dev@${{ needs.ic-build-image.outputs.ic-dev-imageid }}"
127137
128138
echo '${{ needs.build-image-prep.outputs.image_tag }}' > ci/container/TAG
129139
pushd .devcontainer
130-
sed -i -E "s|(ghcr.io/)?$IMG_NAME(:\|@)[^\"]{5,}|$IMG_NAME_FULL|g" -- *
140+
sed -i -E "s|${IMAGE_PREFIX}ic-dev(:\|@)[^\"]{5,}|$IMG_NAME_IC_DEV|g" -- *
131141
popd
132142
pushd .github
133-
sed -i -E "s|(ghcr.io/)?$IMG_NAME(:\|@)[^\"]{5,}|$IMG_NAME_FULL|g" -- workflow*/*
143+
sed -i -E "s|${IMAGE_PREFIX}ic-build(:\|@)[^\"]{5,}|$IMG_NAME_IC_BUILD|g" -- workflow*/*
134144
popd
135145
136146
git config --global user.name "IDX GitHub Automation"
137147
git config --global user.email "<>"
138148
git add .
139-
git commit -m 'Updating container image to ${{ needs.ic-build-image.outputs.imageid }}' -m 'Image tag: ${{ needs.build-image-prep.outputs.image_tag }}'
149+
git commit \
150+
-m 'Updating container images to tag: ${{ needs.build-image-prep.outputs.image_tag }}' \
151+
-m 'ic-build: ${{ needs.ic-build-image.outputs.ic-build-imageid }}' \
152+
-m 'ic-dev: ${{ needs.ic-build-image.outputs.ic-dev-imageid }}'
140153
git push
141154
142155
- name: Add PR Comment
@@ -145,8 +158,9 @@ jobs:
145158
with:
146159
script: |
147160
let message = 'Run URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}\n\n'
148-
message += 'New container image: `${{ needs.ic-build-image.outputs.imageid }}`\n'
149-
message += 'New container tag: `${{ needs.build-image-prep.outputs.image_tag }}`'
161+
message += 'New container images with tag: `${{ needs.build-image-prep.outputs.image_tag }}`\n'
162+
message += 'ic-build: `${{ needs.ic-build-image.outputs.ic-build-imageid }}`\n'
163+
message += 'ic-dev: `${{ needs.ic-build-image.outputs.ic-dev-imageid }}`\n'
150164
151165
// Find existing comment from this workflow
152166
const comments = await github.rest.issues.listComments({

.github/workflows/container-scan-nightly.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
runs-on:
1313
labels: dind-large
1414
container:
15-
image: ghcr.io/dfinity/ic-build@sha256:2e372158cdc56750ab57d4c770655c636fa5a9f80038a6b48768424b24430730
15+
image: ghcr.io/dfinity/ic-build@sha256:18d23aef1f5e9e7e1eef94c32563f8ed15531ae79065bb00bb5206a643fc49fe
1616
options: >-
1717
-e NODE_NAME --privileged --cgroupns host --mount type=tmpfs,target="/tmp/containers"
1818
timeout-minutes: 60

0 commit comments

Comments
 (0)