23 separate rustc for build stage#28
Conversation
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Introduces a separate Rust base image digest for building stellar-cli images, allowing the CLI build stage to be pinned independently from the contract/tooling Rust pin.
Changes:
- Add
cli_rust_versiontobuilds.json/schema and propagate it through the resolved build matrix. - Pass
CLI_RUST_IMAGE_DIGESTthrough the workflow + build script into Docker build args. - Switch the Dockerfile builder stage to use
CLI_RUST_IMAGE_DIGEST.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/unit/test_resolve_matrix.py | Updates expected matrix row keys to include cli_rust_image_digest. |
| scripts/resolve_matrix.py | Computes and emits cli_rust_image_digest per matrix row with fallback behavior. |
| scripts/build_image.py | Derives CLI build Rust digest and forwards it as a Docker build-arg + logs it. |
| builds.schema.json | Adds cli_rust_version property to the schema. |
| builds.json | Adds cli_rust_version pins to CLI version entries. |
| Dockerfile | Swaps builder stage base image digest from RUST_IMAGE_DIGEST to CLI_RUST_IMAGE_DIGEST. |
| .github/workflows/publish.yml | Passes CLI_RUST_IMAGE_DIGEST from the matrix into the build environment. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| cli_rust_pin = entry.get("cli_rust_version") | ||
| cli_rust_image_digest = builds.digest_of(cli_rust_pin) if cli_rust_pin else None |
| rows.append( | ||
| { | ||
| "arch": arch, | ||
| "cli_rust_image_digest": cli_rust_image_digest or digest, |
| "cli_rust_version": { | ||
| "$ref": "#/definitions/rust_pin", | ||
| "description": "Fully-qualified rust base pin (<rust_base_key>@<image_digest>) to build this stellar-cli release - not the same as the rustc used to compile contracts" | ||
| }, |
| stellar_ref = builds.stellar_cli_ref(data, args.stellar_cli_version) | ||
| parsed = rust_keys.parse(args.rust_version) | ||
| entry = builds.find_cli(data, args.stellar_cli_version) | ||
| cli_rust_pin = entry.get("cli_rust_version") if entry else None | ||
| cli_rust_digest = builds.digest_of(cli_rust_pin) if cli_rust_pin else rust_digest |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0a9a2747dd
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
Closes #23
Adds a separate rust version for building stellar-cli vs compiling contracts.
Tested the following:
Note that it makes building multiple rust versions for the same cli version much faster as the builder stage is fully cached now.