From f249c2781bc8991bf4826758d71ad9665bbe8a10 Mon Sep 17 00:00:00 2001 From: Jammy2211 Date: Wed, 15 Jul 2026 11:44:54 +0100 Subject: [PATCH] fix(pre_build): a fully-ignored dataset/ must not abort the release MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `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: Claude Opus 4.8 --- pre_build.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pre_build.sh b/pre_build.sh index cf61f63..500411b 100644 --- a/pre_build.sh +++ b/pre_build.sh @@ -72,7 +72,12 @@ run_workspace() { # `git add -f` here force-committed simulated datasets that are meant to be # generated at runtime via al.util.dataset.should_simulate(); only allowlisted # real data may be staged. See PyAutoBuild#126. - [ -d dataset ] && git add dataset/ + # A fully-ignored dataset/ is the normal case, not an error: git add exits + # non-zero when every path it matches is ignored, and under `set -e` that + # aborts the whole release. Staging nothing is the correct outcome there. + if [ -d dataset ]; then + git add dataset/ 2>/dev/null || true + fi for d in config notebooks scripts; do [ -d "$d" ] && git add "$d/" done