Add node_modules/.vite-temp to .dockerignore to prevent Kaniko race condition #227

Closed
opened 2026-04-06 21:48:29 +00:00 by forgejo_admin · 0 comments

Type

Feature

Lineage

Discovered during validation of westside-landing#223. Pipeline #221 failed due to this race condition; #222 succeeded on retry.

Repo

forgejo_admin/westside-landing

User Story

As the CI pipeline
I want Kaniko builds to ignore Vite temp files
So that builds don't fail intermittently due to file race conditions

Context

Woodpecker pipeline #221 failed at the build-and-push step. Kaniko's COPY . . directive listed node_modules/.vite-temp/vite.config.js.timestamp-*.mjs during directory scan, but the file was deleted by the time COPY executed. This is a known Kaniko/Vite race condition. The retry (#222) succeeded because the temp file wasn't present. Fix is to add node_modules/.vite-temp to .dockerignore so Kaniko never tries to copy these transient files.

File Targets

Files the agent should modify:

  • .dockerignore — add node_modules/.vite-temp entry

Files the agent should NOT touch:

  • Dockerfile — no changes needed
  • Any source files

Acceptance Criteria

  • When Kaniko runs COPY . ., then node_modules/.vite-temp is excluded
  • When the pipeline runs, then build-and-push step succeeds consistently

Test Expectations

  • Verify .dockerignore contains the new entry
  • Pipeline succeeds on push
  • Run command: visual inspection of .dockerignore

Constraints

  • Single-line change to .dockerignore
  • No other files should be modified

Checklist

  • PR opened
  • Tests pass
  • No unrelated changes
  • westside — project this affects
  • Discovered during validation of #223
### Type Feature ### Lineage Discovered during validation of westside-landing#223. Pipeline #221 failed due to this race condition; #222 succeeded on retry. ### Repo `forgejo_admin/westside-landing` ### User Story As the CI pipeline I want Kaniko builds to ignore Vite temp files So that builds don't fail intermittently due to file race conditions ### Context Woodpecker pipeline #221 failed at the `build-and-push` step. Kaniko's `COPY . .` directive listed `node_modules/.vite-temp/vite.config.js.timestamp-*.mjs` during directory scan, but the file was deleted by the time COPY executed. This is a known Kaniko/Vite race condition. The retry (#222) succeeded because the temp file wasn't present. Fix is to add `node_modules/.vite-temp` to `.dockerignore` so Kaniko never tries to copy these transient files. ### File Targets Files the agent should modify: - `.dockerignore` — add `node_modules/.vite-temp` entry Files the agent should NOT touch: - `Dockerfile` — no changes needed - Any source files ### Acceptance Criteria - [ ] When Kaniko runs `COPY . .`, then `node_modules/.vite-temp` is excluded - [ ] When the pipeline runs, then build-and-push step succeeds consistently ### Test Expectations - [ ] Verify `.dockerignore` contains the new entry - [ ] Pipeline succeeds on push - Run command: visual inspection of `.dockerignore` ### Constraints - Single-line change to `.dockerignore` - No other files should be modified ### Checklist - [ ] PR opened - [ ] Tests pass - [ ] No unrelated changes ### Related - `westside` — project this affects - Discovered during validation of #223
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
forgejo_admin/westside-app#227
No description provided.