Skip to content

Pr/upload script parallel#5

Open
asarkar157 wants to merge 3 commits into
stackgenhq:mainfrom
asarkar157:pr/upload-script-parallel
Open

Pr/upload script parallel#5
asarkar157 wants to merge 3 commits into
stackgenhq:mainfrom
asarkar157:pr/upload-script-parallel

Conversation

@asarkar157
Copy link
Copy Markdown

@asarkar157 asarkar157 commented May 6, 2026

performance optimization for upload script (10x upload parallelism by default) and argline flag maintenance

asarkar157 added 3 commits May 6, 2026 10:49
Refactor upload_stackgen_modules.sh for significantly faster bulk uploads:

- Parallel uploads via xargs -P (default: 10 concurrent, tunable with --parallel)
- Retry logic with exponential backoff (3 attempts per module)
- Thread-safe progress counter using mkdir-based spinlock (works on macOS + Linux)
- Fail-at-end instead of fail-fast: collects all errors, reports summary
- Structured summary report (succeeded/skipped/failed counts)

New flags:
  --parallel <N>         Set concurrency level (default: 10)
  --provider <name>      Filter to a single provider (aws, azurerm, gcp)
  --version <ver>        Set module version string
  --overwrite-version    Overwrite existing version instead of skipping

Performance: reduces upload time from ~60 min to ~5 min for 800+ modules.
Document upload_stackgen_modules.sh with complete flag reference,
usage examples, and explanation of internals (parallelism, retry
logic, progress tracking). Also documents bulk-tag-modules.sh and
other support files.
Sync the Options table and Behavior section with the current script:
- Add --provider, --version, --overwrite-version, --parallel flags
- Document parallel uploads, retry logic, and fail-at-end behavior
- Add Default column to the flags table
- Reference tools/README.md for detailed docs
- Add bulk-tag-modules.sh to Tools section
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