Skip to content

Pass DSpace overlay lines to awk through the environment - #93

Merged
gauravtiwari merged 1 commit into
mainfrom
dspace-prepare-awk
Nov 12, 2026
Merged

gauravtiwari merged 1 commit into
mainfrom
dspace-prepare-awk

Conversation

@gauravtiwari

Copy link
Copy Markdown
Contributor

DSpace rolling step 1 (run 43190333755) failed in boringcache-docker-plus on both runners. The base lanes passed.

Cause

This is a harness bug in the prepare script from #92. It passed the upstream build line to awk -v, and that line ends in a backslash. gawk, the awk on GitHub's Ubuntu runners, drops a trailing backslash in a -v value; mawk keeps it, which is why my local check passed:

mawk -v b='x && \' 'BEGIN { print b }'   # x && \
gawk -v b='x && \' 'BEGIN { print b }'   # x &&

The build line never matched, so the overlay kept the original mvn command without -Dmaven.build.cache.alwaysRunPlugins=maven-assembly-plugin:single. The extension line has no backslash, so it was still inserted. Step 1 restored 12 modules from BoringCache, including dspace. Maven logged Skipping plugin execution (cached): assembly:single, then BUILD SUCCESS at 104 s, and the Dockerfile's next command failed:

mv: cannot stat '/app/dspace/target/dspace-installer/*': No such file or directory

Fix

  • awk reads both lines from ENVIRON, which no awk escape-processes.
  • Preparation fails unless the generated overlay contains the extension line and the changed build line exactly once.
  • test/bench/docker_overlay_test.rb prepares the recorded upstream Dockerfile (test/bench/fixtures/dspace.Dockerfile) with every awk on the machine and checks both edits. It fails against the old script under gawk, and also checks that a changed upstream build line is refused.

Checks

  • Ruby 3.4.10 suite: 205 runs, 0 failures. bin/bench check: ok.
  • The fixed script adds both lines under mawk 1.3.4 and gawk 5.2.1. The old script under gawk exits 0 without the flag.

After merge

Re-run step 1 with -f mode=rolling -f step=1. It builds only the two boringcache-docker-plus jobs, which have no passing step-1 record.


Generated by Claude Code

The prepare script passed the upstream build line to awk with -v. That
line ends in a backslash, and gawk, the awk on GitHub's Ubuntu runners,
drops a trailing backslash in a -v value, so the line never matched.
The overlay kept the original mvn command without alwaysRunPlugins.
Step 1 restored the dspace module from the build cache, skipped the
installer assembly, and the Dockerfile's mv of dspace-installer failed
on both runners.

awk now reads both lines from ENVIRON, which no awk escape-processes,
and preparation fails unless the overlay contains the extension line
and the changed build line. The test prepares the recorded upstream
Dockerfile with every awk on the machine.
@gauravtiwari
gauravtiwari merged commit 1c9a760 into main Nov 12, 2026
4 checks passed
@gauravtiwari
gauravtiwari deleted the dspace-prepare-awk branch November 12, 2026 09:34
gauravtiwari added a commit that referenced this pull request Nov 12, 2026
Both runners have two step 1 records for boringcache-docker-plus, and
neither is a measurement of the lane. Run 43190333755 failed because
the prepare script dropped the alwaysRunPlugins flag under gawk, fixed
in #93. The re-run, 43192716311, restored every module, including the
three that the failed attempt had rebuilt and saved for that commit.
Step 1 of the other lanes is unchanged.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants