Skip to content

RPS-10045 Bulk downloading job files#101

Open
az-smartling wants to merge 5 commits into
masterfrom
RPS-10045_Bulk_downloading_job_files
Open

RPS-10045 Bulk downloading job files#101
az-smartling wants to merge 5 commits into
masterfrom
RPS-10045_Bulk_downloading_job_files

Conversation

@az-smartling
Copy link
Copy Markdown
Contributor

@az-smartling az-smartling commented May 15, 2026

Added --job-uid to files pull so customers can download every file × target-locale pair from a Smartling translation job in one command.

New flags on files pull:

  • --job-uid <uid> — pull all files × target locales from the job (composes with<uri> glob, --locale, --directory, etc.)
  • --dry-run — preview the file × locale matrix without downloading
  • --resume — skip files already on disk
  • --threads N — moved from global root flag to local; reads from smartling.yml as fallback (default 20)

Depends on Smartling/api-sdk-go#31 for the new JobApi.ListFiles paginated method and GetJob.TargetLocaleIDs field.

Per-file download failures are now tallied and surfaced as a non-zero error instead of being silently swallowed.

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces job-based pull functionality to the Smartling CLI, allowing users to download files associated with a specific translation job via the --job-uid flag. It also adds a --resume flag to skip existing files and a --dry-run flag to preview the download matrix. Supporting changes include dependency updates, new path formatting defaults, and comprehensive unit tests. Review feedback identifies an issue where errors in parallel download workers are swallowed, preventing the CLI from reporting failures correctly. There is also a recommendation to unify error handling when a job contains no target locales to ensure consistent CLI exit codes.

Comment thread services/files/run_pull.go Outdated
Comment thread services/files/run_pull.go Outdated
@az-smartling az-smartling requested review from dimitrystd and junky May 15, 2026 10:55
@dimitrystd
Copy link
Copy Markdown
Contributor

--job-uid - can we use --job for consistency with other commands? And it is more user-friendly (accepts Uid or the name).

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