mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-10-25 09:41:04 +01:00
fix(cargo): apply the network config in the Daytona build and harden the test
Copy the repository .cargo directory into the Daytona runner Docker build stage, so the production cargo build picks up the raised retry count and transfer timeout instead of the cargo defaults. Add .cargo to the audited Daytona image input paths, so a future change to that file invalidates the cached image. Make Arm B of the network stall differential harness unset CARGO_NET_RETRY and CARGO_HTTP_TIMEOUT before it runs cargo fetch, so the harness tests the repository config instead of a value the caller happens to have exported. Correct the .cargo/config.toml comment: the retry count rises from Cargo's default of 3 to 5, which is two more retries, not one. Co-authored-by: Paperclip <noreply@paperclip.ing>
This commit is contained in:
4 files changed
+4
-2
No files matched your search
+1
-1
@@ -2,7 +2,7 @@
|
||||
# below 10 bytes per second for 30 seconds, then retry 3 times. On a
|
||||
# shared CI runner a brief network stall can cross that 30-second window
|
||||
# on every attempt, so the whole download fails even though the network
|
||||
# recovers soon after. A wider timeout and one more retry give a stall
|
||||
# recovers soon after. A wider timeout and two more retries give a stall
|
||||
# more time to pass before cargo gives up.
|
||||
#
|
||||
# Worst case for one dead crate: 6 attempts (1 try plus 5 retries) times
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
FROM rust:1.97-bookworm@sha256:408fe88047cef61a2087653b0c5255fa51c0f2d6d94ddedd7a2562a9b91a46f6 AS runnerd-build
|
||||
|
||||
WORKDIR /workspace/packages/paperclip-runner/runner
|
||||
COPY .cargo /workspace/.cargo
|
||||
COPY packages/paperclip-runner/runner/Cargo.toml packages/paperclip-runner/runner/Cargo.lock ./
|
||||
COPY packages/paperclip-runner/runner/crates ./crates
|
||||
COPY packages/paperclip-runner/protocol ../protocol
|
||||
|
||||
@@ -106,7 +106,7 @@ echo "$ARM_A_OUTPUT"
|
||||
echo "Arm A exit status: $ARM_A_STATUS"
|
||||
|
||||
set +e
|
||||
ARM_B_OUTPUT="$(run_arm B env 2>&1)"
|
||||
ARM_B_OUTPUT="$(run_arm B env -u CARGO_NET_RETRY -u CARGO_HTTP_TIMEOUT 2>&1)"
|
||||
ARM_B_STATUS=$?
|
||||
set -e
|
||||
echo "$ARM_B_OUTPUT"
|
||||
|
||||
@@ -14,6 +14,7 @@ export const DAYTONA_IMAGE_DOCKERFILE_PATH = "docker/daytona-runner/Dockerfile";
|
||||
// Keep it conservative: a false positive only rebuilds the image, while a
|
||||
// missing input could incorrectly reuse an incompatible paid-test image.
|
||||
export const DAYTONA_IMAGE_INPUT_PATHS = [
|
||||
".cargo",
|
||||
".dockerignore",
|
||||
".npmrc",
|
||||
"docker/daytona-runner/Dockerfile",
|
||||
|
||||
Reference in new issue
Block a user