Repository navigation
feat(ICP-Rosetta): FI-1447: rosetta system test environment - #1126
Closed
NikolasHaimerl wants to merge 34 commits into
Closed
NikolasHaimerl wants to merge 34 commits into
NikolasHaimerl wants to merge 34 commits into
Conversation
We now also check that we don't have multiple dealings from the same dealer in the payload
Co-authored-by: IDX GitHub Automation <[email protected]>
This PR specifies a decoding quota for the http_request endpoint of NNS canisters. This way, excessively large HTTP requests are rejected early.
#1073) (XC-173): Improve the generated `ic-admin` command introduced in #1007 by using relative paths to reference the files associated with the submission of a proposal (wasm, binary arguments and summary). This is needed because typically the proposal will be submitted from a different machine than where those files were generated.
Co-authored-by: IDX GitHub Automation <[email protected]> Co-authored-by: Rostislav Rumenov <[email protected]>
…1099) In this test we send ingress messages to make sure that we can store and read messages after an upgrade. At the same time we send a workload of ECDSA/Schnorr messages to test the compatibility. Because the Schnorr messages have a size of ~2MB, they sometimes block other ingress messages from being included, meaning they will expire and cause flakiness of the test. As this isn't a performance test, reducing Schnorr messages to have a more reasonable size shouldn't be an issue.
…emove (#1103) change-subnet-membership should be used instead of separate remove-node and add-node commands. The `change-subnet-membership` command provides atomic node and removal, so both operations can be performed in a single proposal. Also, prominently show suggestions to use the DRE tool for submitting this type of proposal, since the DRE tool calculates and optimizes subnet decentralization instead of blindly adding or removing nodes.
The new `CanisterQueues` implementation expects unique `CallbackIds` for all inbound responses (and refuses to decode the proto otherwise). Tweak the `CanisterQueues` fixtures to generate inbound responses and outbound requests (in case they generate reject responses in the test) with unique `CallbackIds`.
Fixes changes introduced in a previous PR adding some FI tests to `schedule-daily.yml`.
… git log for ICP index canister (#1102) Remove the `rs/rosetta-api/icrc1/index-ng` directory from the list of directories from which commits are listed in generating the change log for canister upgrade proposals for the ICP index canister.
…for the summary.md file (#1104) Wrap the `git log --format` parameters in quotes for the `summary.md` file, so that the command can be copy & pasted and run from the summary.
The MR renames the priority function types to a name that better matches the semantics. The MR also clarifies the semantics of the priority/filter function. --------- Co-authored-by: IDX GitHub Automation <[email protected]>
(XC-179): NNS proposal to add ckXAUT, the twin token of [XAUt](https://etherscan.io/token/0x68749665FF8D2d112Fa859AA293F07A622782F38).
This MR adds the following changes: 1. Create a icp rosetta runner crate which starts up rosetta This functionality is needed at various points in the repository, but there was never an explicit crate created for it. We will also need it to consolidate all tests for rosetta that are spread out throughout the repository.
Update ICP ledger UPGRADES.md file with most recent upgrade proposal details
… ckETH minter (#1075) ([XC-176](https://dfinity.atlassian.net/browse/XC-176) and [XC-178](https://dfinity.atlassian.net/browse/XC-178)): NNS proposals to upgrade the ckERC20 ledger suite orchestrator and the ckETH minter to the latest version to fix a security issue in previous versions of `ic-cdk`. [XC-176]: https://dfinity.atlassian.net/browse/XC-176?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ [XC-178]: https://dfinity.atlassian.net/browse/XC-178?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
…one` (#1088) # Why The predecessor of `InstallCode` - the NnsCanisterUpgrade function has `Vec<u8>` as the type of [the arg](https://github.com/dfinity/ic/blob/2a2b74684b55c40d514c2e80165432e906dddbf5/rs/nervous_system/root/src/change_canister.rs#L49). We should keep this consistency. # What * Only hashes the arg if it's not empty, and returns empty string if the arg is empty. It would be more difficult to understand if we return `sha256([])` instead * Disallow `None` when submitting the proposal. Since `ic0.install_code` accepts `vec nat8`, we don't want to allow 2 ways (`Some(vec![])`, or `None`) to represent the same thing. * Send `vec![]` when creating the proposal in ic-admin * A minor change to stop truncating `wasm_module` and `arg` within the governance crate, since the API type conversion already avoid large fields
#977) This PR is the first step towards enabling the `SnsW.get_wasm_metadata` endpoint in production. For that, we need a way to store the metadata in the stable memory, as recomputing it each time is expensive (because canister WASMs stored in SNS-W are often compressed). Unlike the [first attempt](#956), this PR makes it harder to represent disallowed states in the type system, e.g., there cannot metadata that does not belong to any WASM stored in SNS-W. --------- Co-authored-by: IDX GitHub Automation <[email protected]> Co-authored-by: Carly Gundy <[email protected]> Co-authored-by: Mathias Björkqvist <[email protected]> Co-authored-by: tim gretler <[email protected]>
…1101) This PR specifies a decoding quota for the http_request endpoint of SNS and ICRC1 canisters. This way, excessively large HTTP requests are rejected early.
…1046) Various changes that IMHO make NNS canister upgrade and SNS publish proposals easier to generate, submit, and read. - Instead of the title containing two giant opaque IDs, it says something nice, like "Upgrade the Governance Canister to Commit abcd123" - DRY_RUN environment variable. - Instructions for how to verify WASM: - Mention pre-requisites. The instructions should now be complete. - Explain the steps. - When asking whether the proposer is sure they want to submit the proposal, print each ic-admin flag on its own line. (This is like how you wouldn't put many statements in a Rust or C program on the same line. Yes, it would be a more efficient use of screen space, but it is a less efficient use of reader brain cycles, which is a far more precious resource.) - Use colors consistently (and hopefully, intuitively?): - prompts are green - yellow is to specially call out important, but not critical information - blue is for (ASCII art) line across the screen - This might be controversial, but do not mention "uninteresting" information in the proposal description. In particular, it no longer mentions - The WASM hash. This is only useful for verification, and for that purpose, people should not be pulling this value from the description anyway. - Target canister ID. Instead, the description (like the title) only mentions the canister's name. The reasoning here is the same: the ID can be found elsewhere, is only useful for verification, and the description is not a suitable source of such information. - Because these two pieces of information are removed, verifying (at proposal submission time) that they are consistent with other information in the proposal (namely git commit ID, and canister name) is no longer performed. - Previously, if the internal `ic-admin` call failed, the proposal submission script would still finish successfully. Now, our wrapper scripts also fails in that case. - More explicit (and celebratory) feedback to the user at the conclusion. - Link to additional information. - Help strings are not so wide (max 80 char) anymore. - Instead of downloading entire WASM during the proposal text preparation, just make sure it exists (via `curl --head ...`). (Previously, downloading the whole thing was necessary, since we wanted to insert the WASM hash into the proposal text, but as mentioned earlier, we got rid of this.)
… InstallCode proposals (#1093) # Why Currently, the ic-admin prints the entire WASM when submitting the `InstallCode` proposal. We want to only print hashes. # What When printing `InstallCode` proposals, we convert it into the "response" API type which contains only hashes. # Alternative Ideally, we'd like to implement custom `Debug` trait. However, currently it's impossible to do so while the proposal API type is still `prost:message` which already derives `Debug` trait.
This MR runs ingress filter in StateMachine tests to avoid critical errors of the form `execution_environment_unfiltered_ingress`. The [ingress filter](https://github.com/dfinity/ic/blob/2a2b74684b55c40d514c2e80165432e906dddbf5/rs/execution_environment/src/execution_environment.rs#L2307) performs a bunch of checks for every ingress message before this ingress message is accepted for execution. In particular, the checks include: - `canister_status` on the management canister can only be called by controllers (this does not include the canister itself requesting its own status via an _ingress_ message as a canister would request its status via an _inter-canister_ call in production); hence, the controllers of canisters with no controllers can only be retrieved via a `canister_info` call proxied through an intermediate canister; - ingress messages cannot request the `canister_info` and `fetch_canister_logs` endpoint; - ingress messages to empty/stopped canisters are rejected.
# Why The canister management topic split, as well as the new `UpdateCanisterSettings` proposal type is hidden behind the flag `enable_new_canister_management_topics` while they were under development. We want to enable them as the development is complete. # What Flip the `enable_new_canister_management_topics` to true
Removing an unused dependency on governance in NNS root. --------- Co-authored-by: IDX GitHub Automation <[email protected]>
Create a copy of TimeWarp in the api crate, so that we can remove another dependency on the nns governance crate. --------- Co-authored-by: IDX GitHub Automation <[email protected]>
## Problem
It is generally not a very good practice to perform an `.unwrap()` that
might plausibly fail, outside of tests. Instead, it is better to return
an error. Even in the `main` function, you can return a `Result` instead
of using `.unwrap()` or `exit(1)` (and returning an `Err` from the main
function will automatically set a non-zero exit code). Using `exit(1)`
is particularly dangerous as you may forget to call it, or forget to use
`eprintln!` instead of `println!`, in both cases doing something
somewhat unexpected that the compiler will not warn you about.
## Solution
Convert all the sns-cli endpoints to return an `anyhow::Result` instead
of `()`. This enables them to return errors instead of panicking.
## Impoved code
### Example 1
Using anyhow makes some of our code a bit more concise as well. For
example, compare the original:
```rust
let sns_init_payload = args.generate_sns_init_payload().unwrap_or_else(|err| {
eprintln!(
"Error encountered when generating the SnsInitPayload: {}",
err
);
exit(1);
});
```
with:
```rust
let sns_init_payload = args
.generate_sns_init_payload()
.context("Generating the SnsInitPayload")?;
```
Which is not exactly equivalent, but the latter returns a (imho) nicer
error message. For the unfamiliar,
```
use anyhow::{anyhow, context};
fn main() {
return Err(anyhow!("What went wrong.")).context("Error situation");
}
```
outputs:
```
Error: Error situation
Caused by:
What went wrong.
```
Using `.context()` gives us something that's almost like a
human-readable backtrace:
```rust
use anyhow::{anyhow, Context};
fn main() {
return Err(anyhow!("What went wrong."))
.context("I think something is about to go wrong")
.context("Error situation");
}
```
outputs:
```
Error: Error situation
Caused by:
0: I think something is about to go wrong
1: What went wrong.
```
### Example 2
```rust
if let Some(save_to) = &save_to {
if let Err(err) = ensure_file_exists_and_is_writeable(save_to.as_path()) {
eprintln!("{}", err);
std::process::exit(1);
}
}
```
Becomes
```rust
if let Some(save_to) = &save_to {
ensure_file_exists_and_is_writeable(save_to.as_path())?
}
```
## Additional notes
I have not actually removed all the occurrences of `.unwrap()` yet, but
I have updated all the cases where we called `exit(1)`.
…teracting with the NNS and SNSes (#1087) I thought it would make sense to have a crate where we would put various helper functions for interaction with SNSes and the NNS. Right now, the only rust helper functions I'm aware of are in some in `//rs/nervous_system/tools/sync-with-released-nevous-system-wasms` for interacting with SNS-W, so I moved just those for now. There are also some that were developed for use in system tests, but they are not trivial to extract so I haven't yet. [Next PR →](#1091)
Use the start_listerner used by the http handler for opening the xnet server socket
NikolasHaimerl
marked this pull request as draft
August 25, 2024 09:31
AleDema
pushed a commit
to AleDema/ic
that referenced
this pull request
Nov 18, 2026
…#12155) Upgrades `aspect_bazel_lib` from 2.19.3 to [2.22.5](https://github.com/bazel-contrib/bazel-lib/releases/tag/v2.22.5), its latest release. 2.x is the last `aspect_bazel_lib` line: from 3.0 on the module is published as `bazel_lib`, which is already in our graph at 3.2.2 (through `llvm`, `rules_qemu`, `rules_distroless`, `rules_foreign_cc`, `tar.bzl` and `yq.bzl`). The bump comes with a small patch to `aspect_bazel_lib`'s `MODULE.bazel`. Without it, `aspect_bazel_lib`'s own toolchains would take over the toolchain types that it now aliases from `bazel_lib` and `tar.bzl` (since 2.21.1 and 2.22.0). Then hermetic-llvm would assemble its toolchain with `aspect_bazel_lib`'s tools instead of `bazel_lib`'s, and every C/C++/Rust build would break as soon as `bazel_lib` >= 3.8.0 enters the graph (details below). With the patch, the build graph of the release artifacts resolves the same toolchains as on master, and the release artifacts are byte-identical. ## Changes - **`MODULE.bazel`**: version bump, plus a `single_version_override` that applies the patch below and pins 2.22.5. The pin is needed because Bazel applies a patch to a module's `MODULE.bazel` to every version of the module that it visits during resolution, and `rules_oci` 2.0.0 asks for 2.7.2, where the patch doesn't apply. - The pin also holds `aspect_bazel_lib` at 2.22.5 when another module asks for a newer version, and Bazel doesn't warn about that. The comment above the override says so and points to `bazel mod explain aspect_bazel_lib --verbose`, which marks the requests that the pin overrides, e.g. `[email protected] # (was 2.7.2, cause single_version_override)` under `rules_oci` 2.0.0. Nothing asks for more than 2.22.5 today. In our graph, `rules_oci` 2.0.0 asks for 2.7.2 and `jq.bzl` 0.1.0 for 2.8.1. Among the latest releases of our direct dependencies, the highest request is 2.21.1 (`rules_oci` 2.3.5). - BCR's `aspect_bazel_lib/2.22.5` carries only its usual release patches (version stamp, Go dev dependencies). - 2.22.5 adds a dependency on `bazel_lib` 3.0.0 and asks for `tar.bzl` 0.5.1, `bazel_skylib` 1.8.1 and `stardoc` 0.7.1. We already resolve `bazel_lib` 3.2.2, `tar.bzl` 0.10.4, `bazel_skylib` 1.9.0 and `stardoc` 0.7.2, so no other module's resolved version changes. - **`bazel/aspect_bazel_lib_aliased_toolchains.patch`** (new): removes 5 of the 9 `register_toolchains` entries from `aspect_bazel_lib`'s `MODULE.bazel`, those of the five toolchain types that 2.21.1 and 2.22.0 turned into aliases (`copy_directory`, `copy_to_directory`, `coreutils`, `expand_template` and `tar`). jq, yq, zstd and bats are still `aspect_bazel_lib`'s own toolchain types and keep their registrations. The patch applies to the BCR source with no offset or fuzz. ## Why the patch [bazel-contrib/bazel-lib#1153](bazel-contrib/bazel-lib#1153) (2.21.1) turned the `tar` toolchain type into an alias of `tar.bzl`'s. [bazel-contrib/bazel-lib#1216](bazel-contrib/bazel-lib#1216) (2.22.0) turned the `copy_directory`, `copy_to_directory`, `coreutils` and `expand_template` toolchain types into aliases of `bazel_lib`'s, so that rules from both modules create identical actions. But `aspect_bazel_lib` still registers its own toolchains for all five. It is a direct dependency of the root module, while `bazel_lib` and `tar.bzl` are transitive ones, so its registrations come first and win for every rule that requests one of the shared types. With only the version bump, `bazel cquery` shows two switches: - **Release artifacts:** hermetic-llvm assembles its resource directory, crt objects and the libc++/libc++abi/libunwind/glibc search directories with `bazel_lib`'s `copy_file` and `copy_to_directory`. These 22 `CopyFile` and 86 `CopyToDirectory` actions (across configurations) are the only users of these toolchains in the build graph of the release artifacts. They would switch from `bazel_lib` 3.2.2's tools to `aspect_bazel_lib`'s, e.g. from uutils coreutils 0.5.0 to 0.1.0. - **Test and Rosetta images:** the `tar.bzl` and `rules_distroless` targets would switch from `tar.bzl`'s bsdtar (hermeticbuild/bsdtar-prebuilt v3.8.1-3) to `aspect_bazel_lib`'s (aspect-build/bsdtar-prebuilt v3.8.1). These are `//rs/tests:{sh,awk,ca_certificates,dpkg_status,passwd,ubuntu_packages_tar}` and the `passwd` layers in `//rs/rosetta-api/{icp,icrc1}` and `//rs/tests/httpbin-rs`. For `sh`, `awk` and the `passwd` targets, `tar.bzl`'s `tar` writes the `mtree` with `bazel_lib`'s `expand_template`, and those actions would switch to `aspect_bazel_lib`'s `expand_template` binary as well. That alone would be harmless today. But `bazel_lib` 3.8.0 ([bazel-contrib/bazel-lib#1310](bazel-contrib/bazel-lib#1310)) passes `copy_to_directory`'s arguments in a params file, which `aspect_bazel_lib`'s binary doesn't accept. So once any module brings in `bazel_lib` >= 3.8.0, every one of those `CopyToDirectory` actions fails, and with them every C/C++/Rust build. This is [bazel-contrib/bazel-lib#1312](bazel-contrib/bazel-lib#1312). The latest releases of our direct dependencies ask for at most `bazel_lib` 3.2.2, so this would only bite later. Upstream fixed dfinity#1312 on its 2.x branch with [bazel-contrib/bazel-lib#1313](bazel-contrib/bazel-lib#1313), merged on 2026-11-14. No release has it yet: 2.22.5 is still the latest 2.x release. dfinity#1313 removes only the `copy_directory`, `copy_to_directory` and `coreutils` registrations, which covers the switch in the release artifacts but not the one in the images. This patch also removes the `expand_template` and `bsd_tar` registrations. That keeps the image targets above on the toolchains they use on master, and all five aliased types resolve the same way. With the patch, each aliased type resolves to the toolchains of the module that defines it: - The build graph of the release artifacts resolves exactly the toolchains it does on master. - The `tar.bzl` and `rules_distroless` targets above keep `tar.bzl`'s bsdtar and `bazel_lib`'s `expand_template`, as on master. - `rules_oci` 2.0.0's `oci_image` and `oci_load`, and our `expand_template`, ask for `aspect_bazel_lib`'s alias types. So they now get `tar.bzl`'s bsdtar and `bazel_lib`'s coreutils (0.5.0) and `expand_template`. On master they get `aspect_bazel_lib`'s bsdtar 3.7.9 and coreutils 0.0.27. - Both sets of toolchains provide the same fields (`tarinfo.binary`, `coreutils_info.bin`, `expand_template_info.bin`, `copy_to_directory_info.bin`). The `expand_template`, `copy_directory` and `copy_to_directory` Go tools of `aspect_bazel_lib` 2.22.5 and `bazel_lib` 3.2.2 are built from the same `main.go` files. Only their shared helper package differs: `bazel_lib`'s also tries reflink copies on Linux. The outputs are byte-identical (see Verification). ## Upstream changes that touch our setup - Toolchain aliases: `tar` ([dfinity#1153](bazel-contrib/bazel-lib#1153), 2.21.1), and `copy_directory`, `copy_to_directory`, `coreutils` and `expand_template` ([dfinity#1216](bazel-contrib/bazel-lib#1216), 2.22.0). See above. - `aspect_bazel_lib`'s own bsdtar moves from 3.7.9 to 3.8.1 ([dfinity#1126](bazel-contrib/bazel-lib#1126), 2.20.0), and its coreutils from 0.0.27 to 0.1.0 ([dfinity#1136](bazel-contrib/bazel-lib#1136), 2.21.0). With the patch, nothing in our build uses these two any more. - `expand_template` now adds the runfiles of its `data` to its own ([dfinity#1171](bazel-contrib/bazel-lib#1171), 2.21.2). Our two `expand_template` targets, `//rs/rosetta-api/{icp,icrc1}:stamped`, have no `data`. - `copy_directory`, `copy_to_directory`, `copy_file` and `copy_to_bin` now forward to `bazel_lib`'s implementations ([dfinity#1229](bazel-contrib/bazel-lib#1229), [dfinity#1233](bazel-contrib/bazel-lib#1233), 2.22.4 and 2.22.5). We don't use them directly, only through `rules_oci`. - Not relevant for us: jq stays 1.7, and zstd stays 1.5.6 (the same binaries from a new URL). yq moves to 4.45.2, but nothing in our build uses `aspect_bazel_lib`'s yq toolchain. ## Verification All in the dev container: - `bazel mod graph`: compared with master, only `aspect_bazel_lib` changes (2.19.3 → 2.22.5). There are no new warnings; the existing `rules_qemu` `use_repo` warning is unchanged. - **After merging master**: dfinity#12150, dfinity#12152 and dfinity#12154 changed the `bazel_skylib`, `rules_shell` and `buildifier_prebuilt` lines around this PR's `aspect_bazel_lib` bump. The merge keeps master's versions of those three and this PR's `aspect_bazel_lib` 2.22.5 with its comment and override. Against master, `bazel mod graph` still changes only `aspect_bazel_lib`. `bazel mod explain aspect_bazel_lib --verbose` lists only the root module and `rules_oci` 2.0.0 (asking for 2.7.2), so no module asks for a newer version that the pin would override. `bazel build //... --nobuild` analyzes all 3389 targets, and `bazel run //:buildifier` changes nothing. - `bazel build //... --nobuild`: all 3387 targets analyze. - Linter job: `//pre-commit:{shfmt-check,ruff-check,buf-check,DFINITY-capitalization-check,do-not-merge-check,buildifier-check,gazelle-check,buf-breaking-check}` pass. `buildifier-fix`, `shfmt-fix`, `ruff-fix` and `//:gazelle` leave the tree clean. - Toolchain resolution: for the release targets below, `bazel cquery 'deps(...)'` returns the same 110,935 configured targets as on master, with the same toolchain targets. `aspect_bazel_lib` isn't among them. Without the patch, the `coreutils` and `copy_to_directory` toolchains switch to `aspect_bazel_lib`'s, as described above. - **Release artifacts are byte-identical.** I built `//publish/binaries:bundle`, `//publish/canisters:bundle` and the unstamped IC-OS bundles that `ci/container/build-ic.sh --icos` builds (GuestOS prod disk and update, GuestOS recovery update, HostOS prod update, SetupOS prod). All 133 output files have the same SHA-256 as a build of master at c712eb2. No sandboxed action ran: apart from 26 actions that run unsandboxed (`local`), every action was a cache hit. - **The targets that use `aspect_bazel_lib`, or its toolchains through `rules_oci`, produce byte-identical outputs.** I built these 21 targets, which cover every kind of use, with 2.19.3 and with this PR in the same output base. Both builds produce the same 77 files, and the 4 OCI layout directories have the same structure and file modes: - `//rs/tests:{sh,awk}` (`tar`) - `//rs/tests:{ca_certificates,dpkg_status,passwd,ubuntu_packages_tar}` (`rules_distroless`) - the OCI images and `oci_load` tarballs `//rs/tests:{ubuntu_test_runtime_image_src,ubuntu_test_runtime.tar,static-file-server.tar,minica.tar}`, `//rs/tests/httpbin-rs:{httpbin_image_src,httpbin.tar}`, `//rs/rosetta-api/icp:{rosetta_image,rosetta_image.tar}` and `//rs/rosetta-api/icrc1:{ic_icrc_rosetta_image,icrc_rosetta_image.tar}` - `//rs/tests:colocate_uvm_config_image`, which packs the test-runtime image tarball - the Rosetta push scripts `//rs/rosetta-api/icp:push_rosetta_image` and `//rs/rosetta-api/icrc1:push_ic_icrc_rosetta_image` - their `:stamped` tag files, built both unstamped and with `--stamp --embed_label=...` (which `rosetta-release.yml` passes); with stamping, `expand_template` runs its toolchain's binary, now `bazel_lib`'s - I also diffed the `bazel aquery` action keys of everything these targets depend on, master against this PR. 58 of the 8,363 actions change, all of them `rules_oci` actions whose tools are now `bazel_lib`'s and `tar.bzl`'s: the 10 `OCIDescriptor` (`oci_image`) and 6 `OCITarball` (`oci_load`) actions, the 3 `CopyToDirectory` actions that lay out pulled base images, and the template and runfiles actions of their scripts. The images, tarballs and scripts they produce are among the identical files above. - Not built locally: the other `oci_load` tarballs of pulled images and the other UVM config images under `//rs/tests` (e.g. `bitcoind.tar`, `jaeger.tar`, `vector-with-log-fetcher.tar`, `ckbtc_uvm_config_image`). They use the same rules as `static-file-server.tar`, `minica.tar` and `colocate_uvm_config_image`. - Not run locally: the 476 tests that depend on these targets are all system tests under `//rs/tests`. CI runs them, along with the full build and test suite. The second commit changes only comments: the patch header and the `MODULE.bazel` comment above the override. After it, I re-ran: - The new patch applies with `patch -F0` (no offset or fuzz) to the `MODULE.bazel` that the BCR serves for 2.22.5. The result has the same SHA-256 as with the first commit's patch, and so does the `aspect_bazel_lib` `MODULE.bazel` that Bazel fetched. - `bazel mod graph` (depth 1 and full): the same output as before the commit, with no new warnings. `bazel mod explain aspect_bazel_lib --verbose` shows `[email protected] # (was 2.7.2, cause single_version_override)` under `rules_oci` 2.0.0. - I checked the pin's effect on newer requests in a scratch workspace whose root module asks for `aspect_bazel_lib` 2.7.2 and depends on `jq.bzl` 0.1.0, which asks for 2.8.1. With `single_version_override(version = "2.7.2")`, Bazel resolves 2.7.2 without a warning, and `mod explain --verbose` shows `(was 2.8.1, cause single_version_override)`. Without the override, it resolves 2.8.1 and warns that the root module asks for 2.7.2. - `bazel build //... --nobuild`: all 3387 targets analyze. The Linter-job checks pass, and the autofixes plus `//:buildifier` leave the tree clean. - `bazel cquery 'deps(...)'` returns the same 110,935 configured targets for the release targets, and the same 53,045 for the targets that use the module, as before the commit. `bazel aquery`: all 8,363 action keys in the deps of the 21 targets above are unchanged. So I didn't rebuild the release artifacts for this commit. ## Follow-ups - dfinity#12157 (`rules_oci` 2.3.5, which needs `aspect_bazel_lib` >= 2.21.1) is stacked on this PR, so it lands after it. - Once an `aspect_bazel_lib` 2.x release includes bazel-contrib/bazel-lib#1313, this patch no longer applies (its hunk fails against the 2.x branch). Then reduce it to the `expand_template` and `bsd_tar` registrations, as the TODO in the patch says, and keep the version pin. Dropping the patch instead would make the `tar` and `expand_template` types resolve to `aspect_bazel_lib`'s bsdtar and `expand_template`, including for the `tar.bzl` and `rules_distroless` targets above. - Possibly move our three direct uses of `aspect_bazel_lib` (`expand_template` in the two Rosetta packages, `tar` in `//rs/tests`) to `bazel_lib` and `tar.bzl`, its 3.x successors. `rules_oci` 2.x still depends on `aspect_bazel_lib`, though. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 5.5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This MR adds the following changes:
This is part of an effort to consolidate all ICP Rosetta tests that are spread out throughout the repository into the
rs/rosetta-api/testssub-directory and remove any kind of mock integration or system tests from the repo.