Skip to content

fix(hpc/sync): pull exits 1 after the first extracted archive - #65

Merged
Jammy2211 merged 1 commit into
mainfrom
feature/hpc-sync-zip-count-set-e
Nov 25, 2026
Merged

Jammy2211 merged 1 commit into
mainfrom
feature/hpc-sync-zip-count-set-e

Conversation

@Jammy2211

Copy link
Copy Markdown
Contributor

Summary

Same bug and fix as PyAutoLabs/autolens_assistant#189. hpc/sync runs under set -euo pipefail and unpacked pulled archives with unzip ... && (( zip_count++ )). At zip_count=0 that arithmetic returns 1, so set -e killed pull / pull-full after the first extracted archive, skipping later archives and later PULL_DIRS roots.

Both unzip sites now use if unzip ...; then zip_count=$(( zip_count + 1 )); else echo "WARNING: could not unzip <zip>"; fi, matching autolens_profiling 0dcc528f. A failed unzip is reported and the pull continues.

Scripts Changed

  • hpc/sync: the pull and pull_full unzip loops

Test Plan

This repo has no test_hpc_sync.py and none is added. The pull scenario from the autolens_assistant tests was run by hand (fake ssh/rsync on PATH, three unextracted zips under output/ and results/, the copy's PULL_DIRS=(output results), since this script has no PYAUTO_PULL_DIRS hook):

  • main: exit 1, one archive extracted, no "extracted N" or "Done."
  • this branch: exit 0, "extracted 3 archive(s)", "Done."

Merge mode: human /prm (Consequence: judge).

Generated by the PyAutoLabs agent workflow.

🤖 Generated with Claude Code

`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.

Refs PyAutoLabs/autolens_assistant#189

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Jammy2211
Jammy2211 merged commit b8ae41f into main Nov 25, 2026
2 checks passed
@Jammy2211
Jammy2211 deleted the feature/hpc-sync-zip-count-set-e branch November 25, 2026 11:33
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.

1 participant