Repository navigation
feat(dashmate): add optional GitHub token and fix cargo git cache race condition - #2912
Conversation
WalkthroughAdds optional GitHub token support to Docker builds via a build secret and conditional git URL substitution in the Dockerfile, standardizes cargo git cache mounts from Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20–30 minutes
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: defaults Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
🧰 Additional context used🧠 Learnings (18)📓 Common learnings📚 Learning: 2024-11-25T13:09:41.979ZApplied to files:
📚 Learning: 2024-11-13T12:30:16.951ZApplied to files:
📚 Learning: 2024-11-13T10:31:31.084ZApplied to files:
📚 Learning: 2024-10-09T00:22:57.778ZApplied to files:
📚 Learning: 2024-11-25T12:59:11.416ZApplied to files:
📚 Learning: 2024-11-13T10:32:02.981ZApplied to files:
📚 Learning: 2024-12-16T08:59:40.337ZApplied to files:
📚 Learning: 2024-11-03T10:39:11.242ZApplied to files:
📚 Learning: 2024-11-25T12:59:13.055ZApplied to files:
📚 Learning: 2024-11-25T12:59:18.673ZApplied to files:
📚 Learning: 2024-11-25T12:59:11.765ZApplied to files:
📚 Learning: 2024-12-05T09:29:38.918ZApplied to files:
📚 Learning: 2025-11-25T13:10:47.943ZApplied to files:
📚 Learning: 2025-11-25T13:10:23.481ZApplied to files:
📚 Learning: 2025-11-25T13:10:23.481ZApplied to files:
📚 Learning: 2024-10-17T08:52:54.300ZApplied to files:
📚 Learning: 2025-11-25T13:10:23.481ZApplied to files:
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (5)
🔇 Additional comments (3)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
Dockerfile (1)
15-48: Document the new GITHUB_TOKEN build argument.The file header comprehensively documents other build arguments (lines 15-39), but the newly added
GITHUB_TOKENparameter is not documented.🔎 Add documentation for GITHUB_TOKEN
# The following build arguments can be provided using --build-arg: # - CARGO_BUILD_PROFILE - set to `release` to build final binary, without debugging information # - NODE_ENV - node.js environment name to use to build the library +# - GITHUB_TOKEN - optional GitHub personal access token to increase API rate limits from 60 to 5000 req/hour +# during dependency resolution. WARNING: token will be visible in image history if not properly managed. # - ALPINE_VERSION - use different version of Alpine base image; requires also rust:apline... # image to be available
📜 Review details
Configuration used: defaults
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (5)
Dockerfile(7 hunks)packages/dashmate/docker-compose.build.base.yml(1 hunks)packages/dashmate/docker-compose.build.dashmate_helper.yml(1 hunks)packages/dashmate/docker-compose.build.drive_abci.yml(1 hunks)packages/dashmate/docker-compose.build.rs-dapi.yml(1 hunks)
🧰 Additional context used
🧠 Learnings (12)
📓 Common learnings
Learnt from: lklimek
Repo: dashpay/platform PR: 2318
File: .github/workflows/tests-build-image.yml:45-45
Timestamp: 2024-11-13T10:31:30.891Z
Learning: In the dashpay/platform repository, changes to `.github/workflows/tests-build-image.yml` that switch the Docker image platform from `linux/arm64` to `linux/amd64` for testing purposes are acceptable when required to run on GitHub-hosted runners. ARM64 testing is covered on the testnet.
Learnt from: shumkov
Repo: dashpay/platform PR: 2184
File: .github/workflows/prebuild-devcontainers.yml:0-0
Timestamp: 2024-10-09T00:22:57.778Z
Learning: In this repository, using a personal access token is necessary for GitHub Actions workflows to push to the GitHub Container Registry because `GITHUB_TOKEN` lacks the required permissions.
Learnt from: shumkov
Repo: dashpay/platform PR: 2184
File: .github/workflows/prebuild-devcontainers.yml:0-0
Timestamp: 2024-09-29T01:40:54.588Z
Learning: In this repository, using a personal access token is necessary for GitHub Actions workflows to push to the GitHub Container Registry because `GITHUB_TOKEN` lacks the required permissions.
Learnt from: lklimek
Repo: dashpay/platform PR: 2374
File: Dockerfile:117-118
Timestamp: 2024-12-16T08:59:40.337Z
Learning: In our Dockerfiles, using `ONBUILD ARG CARGO_BUILD_PROFILE=dev` works correctly, and `CARGO_BUILD_PROFILE` is recognized in subsequent stages.
📚 Learning: 2025-10-15T14:45:30.856Z
Learnt from: lklimek
Repo: dashpay/platform PR: 2716
File: packages/dashmate/src/test/constants/services.js:4-4
Timestamp: 2025-10-15T14:45:30.856Z
Learning: In the dashmate codebase (packages/dashmate), during the DAPI Rust migration (rs-dapi), the old service keys `dapi_api` and `dapi_core_streams` are intentionally kept in `generateEnvsFactory.js` for backward compatibility even though the test constants in `src/test/constants/services.js` have been updated to use `rs_dapi`. These deprecated keys will be removed in a future PR after the transition is complete.
Applied to files:
packages/dashmate/docker-compose.build.rs-dapi.yml
📚 Learning: 2024-10-09T00:22:57.778Z
Learnt from: shumkov
Repo: dashpay/platform PR: 2184
File: .github/workflows/prebuild-devcontainers.yml:0-0
Timestamp: 2024-10-09T00:22:57.778Z
Learning: In this repository, using a personal access token is necessary for GitHub Actions workflows to push to the GitHub Container Registry because `GITHUB_TOKEN` lacks the required permissions.
Applied to files:
packages/dashmate/docker-compose.build.rs-dapi.ymlpackages/dashmate/docker-compose.build.base.ymlDockerfilepackages/dashmate/docker-compose.build.drive_abci.ymlpackages/dashmate/docker-compose.build.dashmate_helper.yml
📚 Learning: 2024-11-13T10:31:31.084Z
Learnt from: lklimek
Repo: dashpay/platform PR: 2318
File: Dockerfile:160-198
Timestamp: 2024-11-13T10:31:31.084Z
Learning: In the `Dockerfile` for the rs-drive-abci project, when configuring sccache, we do not need to add validation checks for configuration variables, as sccache performs validation at runtime.
Applied to files:
packages/dashmate/docker-compose.build.rs-dapi.ymlpackages/dashmate/docker-compose.build.base.ymlDockerfilepackages/dashmate/docker-compose.build.drive_abci.yml
📚 Learning: 2024-11-13T10:32:02.981Z
Learnt from: lklimek
Repo: dashpay/platform PR: 2318
File: Dockerfile:0-0
Timestamp: 2024-11-13T10:32:02.981Z
Learning: In the Dockerfile's sccache configuration script, the team relies on sccache to validate required arguments, so explicit error handling for missing variables is unnecessary.
Applied to files:
packages/dashmate/docker-compose.build.base.ymlpackages/dashmate/docker-compose.build.drive_abci.ymlpackages/dashmate/docker-compose.build.dashmate_helper.yml
📚 Learning: 2024-11-13T12:30:16.951Z
Learnt from: shumkov
Repo: dashpay/platform PR: 2321
File: Dockerfile:1-1
Timestamp: 2024-11-13T12:30:16.951Z
Learning: In Dockerfiles, specifying `# syntax = docker/dockerfile:1` ensures that the Dockerfile uses the latest `1.x` syntax, which supports advanced features like `RUN --mount` commands with cache mounting.
Applied to files:
Dockerfile
📚 Learning: 2024-12-16T08:59:40.337Z
Learnt from: lklimek
Repo: dashpay/platform PR: 2374
File: Dockerfile:117-118
Timestamp: 2024-12-16T08:59:40.337Z
Learning: In our Dockerfiles, using `ONBUILD ARG CARGO_BUILD_PROFILE=dev` works correctly, and `CARGO_BUILD_PROFILE` is recognized in subsequent stages.
Applied to files:
Dockerfile
📚 Learning: 2024-11-25T13:09:41.979Z
Learnt from: lklimek
Repo: dashpay/platform PR: 2344
File: Dockerfile:198-207
Timestamp: 2024-11-25T13:09:41.979Z
Learning: In the `Dockerfile`, credentials are managed by Docker secret mounts (e.g., `--mount=type=secret,id=AWS`), so there's no need to add cleanup steps to wipe credentials after use.
Applied to files:
Dockerfile
📚 Learning: 2024-11-25T12:59:13.055Z
Learnt from: lklimek
Repo: dashpay/platform PR: 2344
File: Dockerfile:55-58
Timestamp: 2024-11-25T12:59:13.055Z
Learning: In Dockerfile multi-stage builds, variables defined within `RUN` instructions are not available in `FROM` commands in subsequent stages.
Applied to files:
Dockerfile
📚 Learning: 2024-11-25T12:59:11.765Z
Learnt from: lklimek
Repo: dashpay/platform PR: 2344
File: Dockerfile:188-189
Timestamp: 2024-11-25T12:59:11.765Z
Learning: In the `Dockerfile`, when using `echo` with single quotes to write to a file, variable expansion and command substitution do not occur during the build process. Therefore, commands like `echo 'export VAR="$(cat /run/secrets/FILE)"' >> /root/env` do not expose secrets in image layers, as the substitution happens only when the file is sourced at runtime.
Applied to files:
Dockerfile
📚 Learning: 2024-12-05T09:29:38.918Z
Learnt from: shumkov
Repo: dashpay/platform PR: 2375
File: packages/rs-drive-abci/Cargo.toml:61-63
Timestamp: 2024-12-05T09:29:38.918Z
Learning: In the `drive-abci` package, avoid adding unused dependencies like `hashbrown` to `Cargo.toml`. The team relies on CI to detect dependency version issues.
Applied to files:
Dockerfile
📚 Learning: 2024-10-17T08:52:54.300Z
Learnt from: shumkov
Repo: dashpay/platform PR: 2248
File: packages/rs-drive-abci/src/main.rs:106-111
Timestamp: 2024-10-17T08:52:54.300Z
Learning: In this project, the environment variable `CARGO_PKG_RUST_VERSION` is defined and can be used safely with the `env!` macro.
Applied to files:
Dockerfile
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (5)
- GitHub Check: Build Docker images (Drive, drive, drive-abci) / Build Drive image
- GitHub Check: Build Docker images (RS-DAPI, rs-dapi, rs-dapi) / Build RS-DAPI image
- GitHub Check: Build Docker images (Dashmate helper, dashmate-helper, dashmate-helper) / Build Dashmate helper image
- GitHub Check: Build JS packages / Build JS
- GitHub Check: Rust crates security audit
🔇 Additional comments (4)
packages/dashmate/docker-compose.build.base.yml (1)
10-10: LGTM! Correctly propagates the optional GITHUB_TOKEN.The GITHUB_TOKEN build argument is properly passed through from the environment. Docker Compose will substitute an empty string if the environment variable is not set, which aligns with the optional nature of this feature in the Dockerfile.
packages/dashmate/docker-compose.build.rs-dapi.yml (1)
10-10: LGTM! Consistent with other service configurations.The GITHUB_TOKEN build argument is correctly added to the rs_dapi service, maintaining consistency with the base service and other build configurations.
packages/dashmate/docker-compose.build.drive_abci.yml (1)
10-10: LGTM! Properly configured.The GITHUB_TOKEN build argument follows the same pattern as other services.
packages/dashmate/docker-compose.build.dashmate_helper.yml (1)
10-10: LGTM! Completes the consistent pattern.The GITHUB_TOKEN build argument is correctly added to the dashmate_helper service, completing the consistent implementation across all build configurations.
There was a problem hiding this comment.
Actionable comments posted: 1
♻️ Duplicate comments (2)
Dockerfile (2)
555-557: Same git config cleanup bug exists in build-js stage.The git config unset command uses the wrong key and won't actually remove the URL rewrite rule. Apply the same fix as recommended for the build-drive-abci stage (lines 434-457).
Also applies to: 566-567
782-784: Same git config cleanup bug exists in build-rs-dapi stage.The git config unset command uses the wrong key and won't actually remove the URL rewrite rule. Apply the same fix as recommended for the build-drive-abci stage (lines 434-457).
Also applies to: 794-795
📜 Review details
Configuration used: defaults
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (5)
Dockerfile(10 hunks)packages/dashmate/docker-compose.build.base.yml(1 hunks)packages/dashmate/docker-compose.build.dashmate_helper.yml(1 hunks)packages/dashmate/docker-compose.build.drive_abci.yml(1 hunks)packages/dashmate/docker-compose.build.rs-dapi.yml(1 hunks)
🚧 Files skipped from review as they are similar to previous changes (3)
- packages/dashmate/docker-compose.build.dashmate_helper.yml
- packages/dashmate/docker-compose.build.drive_abci.yml
- packages/dashmate/docker-compose.build.base.yml
🧰 Additional context used
🧠 Learnings (19)
📓 Common learnings
Learnt from: lklimek
Repo: dashpay/platform PR: 2318
File: .github/workflows/tests-build-image.yml:45-45
Timestamp: 2024-11-13T10:31:30.891Z
Learning: In the dashpay/platform repository, changes to `.github/workflows/tests-build-image.yml` that switch the Docker image platform from `linux/arm64` to `linux/amd64` for testing purposes are acceptable when required to run on GitHub-hosted runners. ARM64 testing is covered on the testnet.
Learnt from: shumkov
Repo: dashpay/platform PR: 2184
File: .github/workflows/prebuild-devcontainers.yml:0-0
Timestamp: 2024-10-09T00:22:57.778Z
Learning: In this repository, using a personal access token is necessary for GitHub Actions workflows to push to the GitHub Container Registry because `GITHUB_TOKEN` lacks the required permissions.
Learnt from: shumkov
Repo: dashpay/platform PR: 2184
File: .github/workflows/prebuild-devcontainers.yml:0-0
Timestamp: 2024-09-29T01:40:54.588Z
Learning: In this repository, using a personal access token is necessary for GitHub Actions workflows to push to the GitHub Container Registry because `GITHUB_TOKEN` lacks the required permissions.
Learnt from: lklimek
Repo: dashpay/platform PR: 2344
File: .github/workflows/tests-rs-package.yml:30-37
Timestamp: 2024-11-25T12:59:18.673Z
Learning: The `sccache` action exists in the repository at `./.github/actions/sccache`.
Learnt from: lklimek
Repo: dashpay/platform PR: 2318
File: Dockerfile:0-0
Timestamp: 2024-11-13T10:32:02.981Z
Learning: In the Dockerfile's sccache configuration script, the team relies on sccache to validate required arguments, so explicit error handling for missing variables is unnecessary.
Learnt from: lklimek
Repo: dashpay/platform PR: 2318
File: Dockerfile:160-198
Timestamp: 2024-11-13T10:31:31.084Z
Learning: In the `Dockerfile` for the rs-drive-abci project, when configuring sccache, we do not need to add validation checks for configuration variables, as sccache performs validation at runtime.
Learnt from: lklimek
Repo: dashpay/platform PR: 2344
File: .github/workflows/release-docker-image.yml:66-70
Timestamp: 2024-11-25T12:59:11.416Z
Learning: In the CI workflows (e.g., `.github/workflows/release-docker-image.yml` and `tests-build-image.yml`), we do not add validation steps for cache configuration variables. We rely on the build process to quickly reveal any misconfigurations.
📚 Learning: 2024-11-25T13:09:41.979Z
Learnt from: lklimek
Repo: dashpay/platform PR: 2344
File: Dockerfile:198-207
Timestamp: 2024-11-25T13:09:41.979Z
Learning: In the `Dockerfile`, credentials are managed by Docker secret mounts (e.g., `--mount=type=secret,id=AWS`), so there's no need to add cleanup steps to wipe credentials after use.
Applied to files:
Dockerfilepackages/dashmate/docker-compose.build.rs-dapi.yml
📚 Learning: 2024-11-13T12:30:16.951Z
Learnt from: shumkov
Repo: dashpay/platform PR: 2321
File: Dockerfile:1-1
Timestamp: 2024-11-13T12:30:16.951Z
Learning: In Dockerfiles, specifying `# syntax = docker/dockerfile:1` ensures that the Dockerfile uses the latest `1.x` syntax, which supports advanced features like `RUN --mount` commands with cache mounting.
Applied to files:
Dockerfile
📚 Learning: 2024-11-13T10:31:31.084Z
Learnt from: lklimek
Repo: dashpay/platform PR: 2318
File: Dockerfile:160-198
Timestamp: 2024-11-13T10:31:31.084Z
Learning: In the `Dockerfile` for the rs-drive-abci project, when configuring sccache, we do not need to add validation checks for configuration variables, as sccache performs validation at runtime.
Applied to files:
Dockerfilepackages/dashmate/docker-compose.build.rs-dapi.yml
📚 Learning: 2024-10-09T00:22:57.778Z
Learnt from: shumkov
Repo: dashpay/platform PR: 2184
File: .github/workflows/prebuild-devcontainers.yml:0-0
Timestamp: 2024-10-09T00:22:57.778Z
Learning: In this repository, using a personal access token is necessary for GitHub Actions workflows to push to the GitHub Container Registry because `GITHUB_TOKEN` lacks the required permissions.
Applied to files:
Dockerfilepackages/dashmate/docker-compose.build.rs-dapi.yml
📚 Learning: 2024-11-13T10:32:02.981Z
Learnt from: lklimek
Repo: dashpay/platform PR: 2318
File: Dockerfile:0-0
Timestamp: 2024-11-13T10:32:02.981Z
Learning: In the Dockerfile's sccache configuration script, the team relies on sccache to validate required arguments, so explicit error handling for missing variables is unnecessary.
Applied to files:
Dockerfilepackages/dashmate/docker-compose.build.rs-dapi.yml
📚 Learning: 2024-11-25T12:59:11.416Z
Learnt from: lklimek
Repo: dashpay/platform PR: 2344
File: .github/workflows/release-docker-image.yml:66-70
Timestamp: 2024-11-25T12:59:11.416Z
Learning: In the CI workflows (e.g., `.github/workflows/release-docker-image.yml` and `tests-build-image.yml`), we do not add validation steps for cache configuration variables. We rely on the build process to quickly reveal any misconfigurations.
Applied to files:
Dockerfilepackages/dashmate/docker-compose.build.rs-dapi.yml
📚 Learning: 2024-12-16T08:59:40.337Z
Learnt from: lklimek
Repo: dashpay/platform PR: 2374
File: Dockerfile:117-118
Timestamp: 2024-12-16T08:59:40.337Z
Learning: In our Dockerfiles, using `ONBUILD ARG CARGO_BUILD_PROFILE=dev` works correctly, and `CARGO_BUILD_PROFILE` is recognized in subsequent stages.
Applied to files:
Dockerfile
📚 Learning: 2024-11-03T10:39:11.242Z
Learnt from: shumkov
Repo: dashpay/platform PR: 2305
File: packages/rs-drive-abci/src/abci/handler/finalize_block.rs:81-0
Timestamp: 2024-11-03T10:39:11.242Z
Learning: In `packages/rs-drive-abci/src/abci/handler/finalize_block.rs`, the use of `.expect("commit transaction")` after `app.commit_transaction(platform_version)` is intentional due to the provided comment explaining its necessity. Do not flag this usage in future reviews.
Applied to files:
Dockerfile
📚 Learning: 2024-11-25T12:59:13.055Z
Learnt from: lklimek
Repo: dashpay/platform PR: 2344
File: Dockerfile:55-58
Timestamp: 2024-11-25T12:59:13.055Z
Learning: In Dockerfile multi-stage builds, variables defined within `RUN` instructions are not available in `FROM` commands in subsequent stages.
Applied to files:
Dockerfile
📚 Learning: 2024-11-25T12:59:18.673Z
Learnt from: lklimek
Repo: dashpay/platform PR: 2344
File: .github/workflows/tests-rs-package.yml:30-37
Timestamp: 2024-11-25T12:59:18.673Z
Learning: The `sccache` action exists in the repository at `./.github/actions/sccache`.
Applied to files:
Dockerfilepackages/dashmate/docker-compose.build.rs-dapi.yml
📚 Learning: 2024-11-25T12:59:11.765Z
Learnt from: lklimek
Repo: dashpay/platform PR: 2344
File: Dockerfile:188-189
Timestamp: 2024-11-25T12:59:11.765Z
Learning: In the `Dockerfile`, when using `echo` with single quotes to write to a file, variable expansion and command substitution do not occur during the build process. Therefore, commands like `echo 'export VAR="$(cat /run/secrets/FILE)"' >> /root/env` do not expose secrets in image layers, as the substitution happens only when the file is sourced at runtime.
Applied to files:
Dockerfile
📚 Learning: 2024-12-05T09:29:38.918Z
Learnt from: shumkov
Repo: dashpay/platform PR: 2375
File: packages/rs-drive-abci/Cargo.toml:61-63
Timestamp: 2024-12-05T09:29:38.918Z
Learning: In the `drive-abci` package, avoid adding unused dependencies like `hashbrown` to `Cargo.toml`. The team relies on CI to detect dependency version issues.
Applied to files:
Dockerfile
📚 Learning: 2025-11-25T13:10:23.481Z
Learnt from: CR
Repo: dashpay/platform PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-25T13:10:23.481Z
Learning: Run Rust tests for packages using `cargo test -p <package_name>` and all Rust tests with `cargo test --workspace`
Applied to files:
Dockerfile
📚 Learning: 2025-11-25T13:10:47.943Z
Learnt from: CR
Repo: dashpay/platform PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T13:10:47.943Z
Learning: Applies to **/*.rs : Follow rustfmt defaults and keep code clippy-clean for Rust modules
Applied to files:
Dockerfile
📚 Learning: 2025-11-25T13:10:23.481Z
Learnt from: CR
Repo: dashpay/platform PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-25T13:10:23.481Z
Learning: Applies to **/*.rs : Rust code must pass `cargo clippy --workspace` linter checks
Applied to files:
Dockerfile
📚 Learning: 2024-10-17T08:52:54.300Z
Learnt from: shumkov
Repo: dashpay/platform PR: 2248
File: packages/rs-drive-abci/src/main.rs:106-111
Timestamp: 2024-10-17T08:52:54.300Z
Learning: In this project, the environment variable `CARGO_PKG_RUST_VERSION` is defined and can be used safely with the `env!` macro.
Applied to files:
Dockerfile
📚 Learning: 2025-11-25T13:10:23.481Z
Learnt from: CR
Repo: dashpay/platform PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-25T13:10:23.481Z
Learning: Applies to **/*.rs : Rust code must be formatted using `cargo fmt --all`
Applied to files:
Dockerfile
📚 Learning: 2025-10-15T14:45:30.856Z
Learnt from: lklimek
Repo: dashpay/platform PR: 2716
File: packages/dashmate/src/test/constants/services.js:4-4
Timestamp: 2025-10-15T14:45:30.856Z
Learning: In the dashmate codebase (packages/dashmate), during the DAPI Rust migration (rs-dapi), the old service keys `dapi_api` and `dapi_core_streams` are intentionally kept in `generateEnvsFactory.js` for backward compatibility even though the test constants in `src/test/constants/services.js` have been updated to use `rs_dapi`. These deprecated keys will be removed in a future PR after the transition is complete.
Applied to files:
packages/dashmate/docker-compose.build.rs-dapi.yml
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (5)
- GitHub Check: Build Docker images (Dashmate helper, dashmate-helper, dashmate-helper) / Build Dashmate helper image
- GitHub Check: Build Docker images (Drive, drive, drive-abci) / Build Drive image
- GitHub Check: Build Docker images (RS-DAPI, rs-dapi, rs-dapi) / Build RS-DAPI image
- GitHub Check: Build JS packages / Build JS
- GitHub Check: Rust crates security audit
🔇 Additional comments (4)
packages/dashmate/docker-compose.build.rs-dapi.yml (1)
18-19: LGTM! Secret configuration is correct.The build secret configuration properly exposes the optional
GITHUB_TOKENto the Docker build process. The top-level secrets declaration correctly maps the environment variable, enabling authenticated GitHub requests during builds to increase API rate limits from 60 to 5000 requests/hour.Also applies to: 26-28
Dockerfile (3)
174-177: Good documentation of the optional GITHUB_TOKEN secret.The comment clearly documents the purpose and optional nature of the
GITHUB_TOKENsecret for increasing API rate limits during local builds.
434-434: Cargo git cachesharing=lockedchanges are correct.Changing the cargo git cache from
sharing=sharedtosharing=lockedprevents concurrent write corruption of Cargo's git database during parallel builds. This is a correctness fix separate from the GitHub token authentication feature. The registry caches appropriately remainsharing=shared.Note: The tradeoff is serialized git access which may increase queueing in CI matrix builds, but this prevents corrupted git cache state.
Based on learnings: This aligns with Rust best practices where cargo's git cache requires exclusive access.
Also applies to: 512-512, 552-552, 615-615, 778-778, 848-848
436-436: Good use of Docker secrets for GITHUB_TOKEN.Using
--mount=type=secret,id=GITHUB_TOKENinstead of build ARGs properly prevents the token from appearing in image history or intermediate layers. The conditional usage pattern (checking if the secret file exists) is appropriate for an optional token.Based on learnings: In the Dockerfile, credentials are managed by Docker secret mounts, addressing the security concerns from previous reviews.
Also applies to: 554-554, 780-780
lklimek
left a comment
There was a problem hiding this comment.
LGTM, tested locally and works :)
Issue being fixed or feature implemented
What was done?
How Has This Been Tested?
Breaking Changes
Checklist:
For repository code-owners and collaborators only
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.