Repository navigation
ci: enable sccache for sidecar image builds - #16360
devin-ai-integration[bot] wants to merge 3 commits into
Conversation
Closes OPS-8922 Signed-off-by: Tushar Sharma <[email protected]> Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Signed-off-by: Tushar Sharma <[email protected]> Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
|
I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".
|
| # Forward IRSA secrets as compliance-extract does, for a cache-missed rebuild. | ||
| SECRET_ARGS="" | ||
| if [ -n "${SCCACHE_S3_BUCKET:-}" ]; then | ||
| TOKEN_FILE="${AWS_WEB_IDENTITY_TOKEN_FILE:-}" |
There was a problem hiding this comment.
is this the same sccache steps we follow for our frontend builds?
There was a problem hiding this comment.
Mostly yes. Two of the sidecar sccache steps are identical to the frontend path in shared-build-image.yml, and this extract step is new because the frontend has no equivalent.
Same as frontend:
- Main build:
docker-remote-buildwithsccache_s3_bucket: ${{ secrets.SCCACHE_S3_BUCKET }}, as inshared-build-image.ymlL494. The action addsUSE_SCCACHE/SCCACHE_BUCKET/SCCACHE_REGIONbuild-args and the IRSA secrets. - Compliance extract:
sccache_bucketandsccache_region, the same lines asshared-build-image.ymlL600-601. - Dockerfile side: copied from the EPP Dockerfile, which the frontend job builds. That covers the ARGs, the gated ENV,
use-sccache.sh install/setup-env/show-stats, and the two--mount=type=secretIRSA mounts. The only change is the prefix,rust-sidecar-${TARGETARCH}instead ofrust-epp-*.
This step (extract sidecar binaries) is sidecar-only. The frontend has no plain docker buildx build --target ... extract. It passes the same 3 build-args as docker-remote-build, because they are now part of the sidecar-builder layer's cache key; without them this step would rerun the full cargo build. It forwards the IRSA secrets with the same conditional as compliance-extract/action.yml.
One intentional difference from the frontend's EPP step (shared-build-image.yml L419-427):
- The EPP step drops all sccache args when IRSA is missing.
- This step always passes
USE_SCCACHE=trueplus the bucket and region, becausedocker-remote-buildalways does whenuse_sccache: true, and the values must match for the cache hit. - Only the secrets are conditional. If IRSA is missing,
use-sccache.sh setup-envcan't start the server and the build compiles without sccache.
|
/ok to test c02340c |
…ble-sccache-for-sidecar-builds Signed-off-by: Tushar Sharma <[email protected]>
| ARG SCCACHE_BUCKET="" | ||
| ARG SCCACHE_REGION="" | ||
|
|
||
| # Install sccache using the shared helper |
There was a problem hiding this comment.
This comment just narrates the immediately following COPY/RUN of container/use-sccache.sh; the helper name and install invocation already say the same thing, and it does not preserve a lasting constraint.
🤖 AI Fix
Remove this comment.
❌ Dynamo PR CI failed — run 38608965402 (attempt 1) on
|
| Framework | 1-GPU amd64 | Multi-GPU amd64 |
|---|---|---|
| vLLM | ✅ 1 | ❌ 1 |
| SGLang | ❌ 1 | ✅ 1 |
Failure details
2 jobs failed, both in Initialize containers before any test ran: the self-hosted K8s runner's container hook failed to start the job container. This is a runner infrastructure failure; rerunning the failed jobs is likely enough.
❌ sglang-runtime / Test cuda13.0, amd64: runner container hook failed (Initialize containers)
Job: sglang-runtime / Test cuda13.0, amd64 · Failed step: Initialize containers · Logs: gh run view --job 116011331063 -R ai-dynamo/dynamo --log-failed
Velonix runner admission allowed repository=ai-dynamo/dynamo event=push ref=refs/heads/pull-request/16360
##[group]Run '/home/runner/k8s-novolume/index.js'
(node:125) [DEP0005] DeprecationWarning: Buffer() is deprecated ...
##[error]Executing the custom container implementation failed. Please contact your self hosted runner administrator.
The runner's k8s container hook (k8s-novolume/index.js) failed while creating the job container, so no tests executed. Infrastructure signature (self-hosted runner / pod setup); a rerun of failed jobs is likely enough.
❌ vllm-runtime / 2-GPU Test cuda13.0, amd64: runner container hook failed (Initialize containers)
Job: vllm-runtime / 2-GPU Test cuda13.0, amd64 · Failed step: Initialize containers · Logs: gh run view --job 116013421514 -R ai-dynamo/dynamo --log-failed
Velonix runner admission allowed repository=ai-dynamo/dynamo event=push ref=refs/heads/pull-request/16360
##[group]Run '/home/runner/k8s-novolume/index.js'
(node:118) [DEP0005] DeprecationWarning: Buffer() is deprecated ...
##[error]Executing the custom container implementation failed. Please contact your self hosted runner administrator.
The runner's k8s container hook (k8s-novolume/index.js) failed while creating the job container, so no tests executed. Infrastructure signature (self-hosted runner / pod setup); a rerun of failed jobs is likely enough.
For agents
{"pr": 16360, "run_id": 38608965402, "run_attempt": 1, "head_sha": "2da2ec5b69812e6fec7553a6ca9cb4faad213b23", "failures": [{"job": "sglang-runtime / Test cuda13.0, amd64", "job_id": 116011331063, "failed_step": "Initialize containers", "signature": "Executing the custom container implementation failed", "tests": [], "log_cmd": "gh run view --job 116011331063 -R ai-dynamo/dynamo --log-failed"}, {"job": "vllm-runtime / 2-GPU Test cuda13.0, amd64", "job_id": 116013421514, "failed_step": "Initialize containers", "signature": "Executing the custom container implementation failed", "tests": [], "log_cmd": "gh run view --job 116013421514 -R ai-dynamo/dynamo --log-failed"}]}Posted automatically by Devin for run 38608965402. Updated on every full-CI run of this PR.
|
/ok to test 2da2ec5 |
Overview:
dynamo-sidecar / Build multi-arch cpuspends about 23m per arch in an uncached cargo RUN. ItsBuild and Push Imagestep has a p50 of about 26m. This PR enables the S3-backed sccache that the EPP and wheel builds already use, for the sidecar build only.The release profile, LTO, codegen-units and
cargo build --releaseare unchanged, so runtime performance is unaffected.Details:
lib/sidecar/Dockerfile(sidecar-builderstage):USE_SCCACHE/SCCACHE_BUCKET/SCCACHE_REGIONARGs and gated ENV, and installs sccache withcontainer/use-sccache.sh.SCCACHE_S3_KEY_PREFIX=rust-sidecar-${TARGETARCH}, rather thanrust-epp-*.setup-envruns aftercargo install cargo-cyclonedx, so the tool install is not wrapped.show-statsat the end, so the hit rate shows up in CI logs.cargo build -pcalls stay. There is no target-dir cache, andrm -rf targetstays (see 6e74933)..github/workflows/shared-build-sidecar.yml:use_sccache: trueand passessccache_s3_bucket, and declares the optionalSCCACHE_S3_BUCKETsecret.docker buildx buildand compliance-extract now pass the same sccache build-args and IRSA secrets as the main build. The new ARG/ENV are part of thesidecar-buildercache key, so without matching args both would rerun the full cargo build.pr.yaml,post-merge-ci.yml,nightly-ci.yml: addsecrets: inheritto thesidecar-buildcall, as the other build jobs do. Without it the bucket secret is empty and nothing is cached.Expected effect: about 7m per arch when the cache is warm.
rust-sidecar-*, so it will be cold.Validation
pre-commit runon the 5 changed files: passed.docker buildx build --check -f lib/sidecar/Dockerfile .: no warnings.Build and Push Imagestep time against the 26m p50 and read thesccache --show-statshit rate in the build log.Where should the reviewer start?
lib/sidecar/Dockerfile(the cargo RUN), then the extract step in.github/workflows/shared-build-sidecar.yml.Related Issues
Link to Devin session: https://nvidia-cloud.devinenterprise.com/sessions/5e379d9599114d9aba833da5a5b10605
Open in Devin Desktop: https://nvidia-cloud.devinenterprise.com/desktop/session/5e379d9599114d9aba833da5a5b10605?variant=devin