Skip to content

fix(download): keep downloading sources past a failed file - #1116

Draft
bhdnb wants to merge 1 commit into
mainfrom
download-sources-update
Draft

fix(download): keep downloading sources past a failed file#1116
bhdnb wants to merge 1 commit into
mainfrom
download-sources-update

Conversation

@bhdnb

@bhdnb bhdnb commented Sep 10, 2026

Copy link
Copy Markdown
Collaborator

Summary

download sources fetched project files one at a time and aborted on the first error. Every file after the failing one went untried, and the files already written were never reported.

It now downloads four files at a time and keeps going when one fails, the same way upload sources and upload translations already work:

  • every failure is printed
  • --output json|toon|plain still lists the files that were written, sorted by path
  • the command then exits 1 with Current execution finished with errors

Behaviour changes

Before After
Order one file at a time 4 concurrent (runConcurrently, same limit as upload)
One file fails abort, later files skipped remaining files still downloaded
Exit code on failure the failing request's own code (102, 103, …) 1, as upload does
Text output order project path order completion order

Difference from Java. DownloadSourcesAction also runs in parallel and keeps going, but CrowdinExecutorService.afterExecute only prints the error and the command exits 0. That part is deliberately not ported. A run that failed to write files should not exit 0, the same reasoning as #1106.

Changes

  • DownloadCommand.sourcesAction: the sequential loop is replaced with runConcurrently + reportFailures, and machine-format output is sorted. The --reviewed path is unchanged, since it only extracts from a local archive.
  • reportFailures / EXECUTION_FINISHED_WITH_ERRORS move from upload/uploadFailures.ts to common/failures.ts, now that download shares them. The two upload imports are updated.
  • Fixed a stale comment in translationsAction that described the old sequential sources loop.

@bhdnb bhdnb self-assigned this Sep 10, 2026
@bhdnb
bhdnb marked this pull request as draft September 10, 2026 17:34
@codecov

codecov Bot commented Sep 10, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.22%. Comparing base (175b5cd) to head (159dfe3).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1116      +/-   ##
==========================================
+ Coverage   92.21%   92.22%   +0.01%     
==========================================
  Files         142      142              
  Lines       11500    11506       +6     
==========================================
+ Hits        10604    10610       +6     
  Misses        896      896              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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