[PR #697] [MERGED] fix(screenshots): harden CDN downloads with retries and curl-like UA #718

Closed
opened 2026-02-26 22:32:15 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/rudrankriyam/App-Store-Connect-CLI/pull/697
Author: @rudrankriyam
Created: 2/20/2026
Status: Merged
Merged: 2/20/2026
Merged by: @rudrankriyam

Base: mainHead: fix/screenshots-download-transient-403


📝 Commits (4)

  • 0c19c6e fix(screenshots): retry transient CDN download failures
  • c33a858 fix(screenshots): use curl-like user-agent for CDN downloads
  • a77e081 assets: do not retry context-canceled download errors
  • 056c0be Merge pull request #700 from rudrankriyam/cursor/assets-context-error-handling-694e

📊 Changes

3 files changed (+241 additions, -1 deletions)

View changed files

📝 internal/cli/assets/assets_download_helpers.go (+95 -1)
📝 internal/cli/assets/assets_download_helpers_test.go (+38 -0)
📝 internal/cli/cmdtest/assets_download_media_test.go (+108 -0)

📄 Description

Summary

  • keep retry/backoff handling for transient screenshot/media CDN failures so valid template URLs do not fail the whole command on first-pass 403
  • set a curl-like User-Agent on asset download requests to avoid unstable behavior observed with Go's default UA on mzstatic screenshot URLs
  • add cmdtest coverage to assert the download request sends the expected User-Agent header
  • verify live behavior against production screenshot localizations: first-pass downloads succeeded across 15 apps (186 assets)

Test plan

  • make format
  • make lint
  • ASC_BYPASS_KEYCHAIN=1 make test
  • ASC_BYPASS_KEYCHAIN=1 go test ./internal/cli/assets ./internal/cli/cmdtest -count=1
  • Live verification (set A): 10 apps, 117 assets => downloaded 117, failed 0
  • Live verification (set B): 5 additional apps, 69 assets => downloaded 69, failed 0

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/rudrankriyam/App-Store-Connect-CLI/pull/697 **Author:** [@rudrankriyam](https://github.com/rudrankriyam) **Created:** 2/20/2026 **Status:** ✅ Merged **Merged:** 2/20/2026 **Merged by:** [@rudrankriyam](https://github.com/rudrankriyam) **Base:** `main` ← **Head:** `fix/screenshots-download-transient-403` --- ### 📝 Commits (4) - [`0c19c6e`](https://github.com/rudrankriyam/App-Store-Connect-CLI/commit/0c19c6ed47f4914eb02cb41dda26b991f41c10da) fix(screenshots): retry transient CDN download failures - [`c33a858`](https://github.com/rudrankriyam/App-Store-Connect-CLI/commit/c33a8588c9d15b872773c726feeb014989d7eea0) fix(screenshots): use curl-like user-agent for CDN downloads - [`a77e081`](https://github.com/rudrankriyam/App-Store-Connect-CLI/commit/a77e08186b9d562ec793ed13b31091c8c59455f8) assets: do not retry context-canceled download errors - [`056c0be`](https://github.com/rudrankriyam/App-Store-Connect-CLI/commit/056c0be0dd481de65032482a425385356b477f66) Merge pull request #700 from rudrankriyam/cursor/assets-context-error-handling-694e ### 📊 Changes **3 files changed** (+241 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `internal/cli/assets/assets_download_helpers.go` (+95 -1) 📝 `internal/cli/assets/assets_download_helpers_test.go` (+38 -0) 📝 `internal/cli/cmdtest/assets_download_media_test.go` (+108 -0) </details> ### 📄 Description ## Summary - keep retry/backoff handling for transient screenshot/media CDN failures so valid template URLs do not fail the whole command on first-pass `403` - set a curl-like `User-Agent` on asset download requests to avoid unstable behavior observed with Go's default UA on `mzstatic` screenshot URLs - add cmdtest coverage to assert the download request sends the expected `User-Agent` header - verify live behavior against production screenshot localizations: first-pass downloads succeeded across 15 apps (186 assets) ## Test plan - [x] `make format` - [x] `make lint` - [x] `ASC_BYPASS_KEYCHAIN=1 make test` - [x] `ASC_BYPASS_KEYCHAIN=1 go test ./internal/cli/assets ./internal/cli/cmdtest -count=1` - [x] Live verification (set A): 10 apps, 117 assets => downloaded `117`, failed `0` - [x] Live verification (set B): 5 additional apps, 69 assets => downloaded `69`, failed `0` --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-26 22:32:15 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/App-Store-Connect-CLI#718
No description provided.