Skip to content

feat(internal/librarian/python): parallelize Python generation#5860

Merged
jskeet merged 3 commits into
googleapis:mainfrom
jskeet:python-parallel
May 15, 2026
Merged

feat(internal/librarian/python): parallelize Python generation#5860
jskeet merged 3 commits into
googleapis:mainfrom
jskeet:python-parallel

Conversation

@jskeet
Copy link
Copy Markdown
Contributor

@jskeet jskeet commented May 6, 2026

Generation of each package is now performed within a package-specific tmp directory, with a symlink to fulfil synthtool expectations. The code calling python.Generate within internal/librarian is now parallelized.

See go/sdk:librarian-python-parallel-generation for more details around the design of the tmp directory.

Fixes #3728

Generation of each package is now performed within a package-specific
tmp directory, with a symlink to fulfil synthtool expectations. The
code calling python.Generate within internal/librarian is now
parallelized.

See go/sdk:librarian-python-parallel-generation for more details
around the design of the tmp directory.

Fixes googleapis#3728
@jskeet jskeet requested a review from noahdietz May 6, 2026 13:55
@jskeet jskeet requested a review from a team as a code owner May 6, 2026 13:55
Copy link
Copy Markdown
Contributor

@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 parallelizes Python library generation by introducing a temporary generationRoot directory for each package, isolating concurrent generation and post-processing tasks. Review feedback recommends using defer to guarantee the cleanup of these temporary directories in case of failures and suggests explicitly removing any pre-existing tmp directory to ensure the generation process is idempotent.

Comment thread internal/librarian/python/generate.go
Comment thread internal/librarian/python/generate.go
Comment thread internal/librarian/python/generate.go Outdated
Comment thread internal/librarian/python/generate.go
@jskeet jskeet merged commit 1f7ba6b into googleapis:main May 15, 2026
24 checks passed
@jskeet jskeet deleted the python-parallel branch May 15, 2026 06:45
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.

python: ensure generation works in parallel

2 participants