Repository navigation
fix(hpc/sync): pull exits 1 after the first extracted archive - #190
Merged
Merged
Conversation
`unzip ... && (( zip_count++ ))` returns 1 when zip_count is 0, so under `set -euo pipefail` pull and pull-full exited 1 after the first archive, skipping the rest and any later PULL_DIRS roots. Branch on unzip explicitly and increment with zip_count=$(( zip_count + 1 )), as autolens_profiling (0dcc528f) does; a failed unzip now prints a WARNING and the pull goes on. Adds two offline tests to autoassistant/tests/test_hpc_sync.py: pull over two roots with three zips, and pull-full with two zips. Both fail on main. Fixes #189 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Jammy2211
added a commit
to Jammy2211/ic50_workspace
that referenced
this pull request
Nov 25, 2026
`unzip ... && (( zip_count++ ))` returns 1 when zip_count is 0, so under `set -euo pipefail` pull and pull-full exited 1 after the first archive, skipping the rest and any later PULL_DIRS roots. Branch on unzip explicitly and increment with zip_count=$(( zip_count + 1 )), as the assistants now do (PyAutoLabs/autolens_assistant#190); a failed unzip prints a WARNING and the pull goes on. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
hpc/syncruns underset -euo pipefailand unpacked pulled archives withunzip ... && (( zip_count++ )). Post-increment from 0 evaluates to 0, so the arithmetic returned exit status 1 andset -ekilled the script after the first extracted archive.pullandpull-fullthen exited 1 without "extracted N archive(s)" or "Done.", and any laterPULL_DIRSroots were never pulled.Both unzip sites (
pull,pull_full) now branch explicitly, as autolens_profiling (0dcc528f) does:if unzip ...; then zip_count=$(( zip_count + 1 )); else echo "WARNING: could not unzip <zip>"; fi. A failed unzip is now reported and the pull carries on. Before, it was skipped silently. Nothing else in the script uses(( var++ ))/(( var-- ))as a statement.Fixes #189. Same fix for the siblings: PyAutoLabs/autogalaxy_assistant and PyAutoLabs/autofit_assistant, branch
feature/hpc-sync-zip-count-set-e.Scripts Changed
hpc/sync: thepullandpull_fullunzip loopsautoassistant/tests/test_hpc_sync.py: two offline regression tests (fakessh/rsync):pulloveroutput+results(viaPYAUTO_PULL_DIRS) with three unextracted zips: exit 0, all three extracted, "extracted 3 archive(s)" and "Done."pull-fullwith two zips on the fake remote: exit 0, "extracted 2 archive(s)"Test Plan
main(exit 1, exactly one archive extracted,results/never reached) and pass on this branchpython -m pytest autoassistant/tests/test_hpc_sync.py: 51 passedMerge mode: human /prm (Consequence: judge).
Generated by the PyAutoLabs agent workflow.
🤖 Generated with Claude Code