Skip to content

Commit fc34df7

Browse files
Jammy2211Jammy2211claude
authored
fix(pre_build): a fully-ignored dataset/ must not abort the release (#154)
`git add dataset/` exits non-zero when every path it matches is ignored, and pre_build.sh runs under `set -e`, so the first workspace with a wholly ignored dataset/ killed the release before anything was dispatched. 7 of 11 release workspaces ignore dataset/ outright (autofit_workspace, the three *_workspace_test repos, and the three HowTo repos), so this aborted on the very first repo processed. Staging nothing is the correct outcome there. Latent since #150 dropped the `git add -f` (correctly — the -f was force- committing simulated datasets, #126). The live path has not run since: the 2026.7.9.1 release predates #150, and the nightly driver has stopped at Stage 4 validation every night since, so this is the first execution of the step post-#150. Only the failure path changes: where `git add dataset/` already succeeded (autolens_workspace's 13 allowlisted real datasets, autogalaxy_workspace's 5) the command is unchanged and real observational data still stages. Co-authored-by: Jammy2211 <JNightingale2211@gmail.com> Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
1 parent dfa509e commit fc34df7

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

pre_build.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,12 @@ run_workspace() {
7272
# `git add -f` here force-committed simulated datasets that are meant to be
7373
# generated at runtime via al.util.dataset.should_simulate(); only allowlisted
7474
# real data may be staged. See PyAutoBuild#126.
75-
[ -d dataset ] && git add dataset/
75+
# A fully-ignored dataset/ is the normal case, not an error: git add exits
76+
# non-zero when every path it matches is ignored, and under `set -e` that
77+
# aborts the whole release. Staging nothing is the correct outcome there.
78+
if [ -d dataset ]; then
79+
git add dataset/ 2>/dev/null || true
80+
fi
7681
for d in config notebooks scripts; do
7782
[ -d "$d" ] && git add "$d/"
7883
done

0 commit comments

Comments
 (0)