Skip to content

feat(internal/librarian/java): generate owlbot.py for newly added library#5905

Merged
sofisl merged 9 commits into
mainfrom
addOwlbotTemplateJava
May 14, 2026
Merged

feat(internal/librarian/java): generate owlbot.py for newly added library#5905
sofisl merged 9 commits into
mainfrom
addOwlbotTemplateJava

Conversation

@sofisl
Copy link
Copy Markdown
Contributor

@sofisl sofisl commented May 7, 2026

Ensures that when a new Java client library is generated for the first time, the post-processor dynamically templates and writes owlbot.py if it is missing from the output directory. This aligns Librarian with the legacy Python hermetic build's prerequisite setup and prevents "owlbot.py not found" errors.

Fixes #5679

@sofisl sofisl changed the title Add owlbot template java feat(java): generate owlbot.py for newly added library May 7, 2026
@sofisl sofisl changed the title feat(java): generate owlbot.py for newly added library feat(internal/librarian/java): generate owlbot.py for newly added library May 7, 2026
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 introduces the automatic creation of owlbot.py from an embedded template if the file is missing during Java post-processing, along with a new test case and the template file. Feedback indicates that the process should fail if this mandatory file is missing rather than attempting to create it, to ensure configuration issues are identified early.

Comment thread internal/librarian/java/postprocess.go Outdated
Comment thread internal/librarian/java/template/owlbot_py.tmpl
@sofisl sofisl marked this pull request as ready for review May 7, 2026 20:13
@sofisl sofisl requested a review from a team as a code owner May 7, 2026 20:13
Comment thread internal/librarian/java/postprocess.go Outdated
Comment thread internal/librarian/java/testdata/postprocess/owlbot.py.golden Outdated
Comment thread internal/librarian/java/postprocess.go
Comment thread internal/librarian/java/postprocess.go Outdated
Comment thread internal/librarian/java/postprocess.go Outdated
Comment thread internal/librarian/java/postprocess_test.go Outdated
Comment thread internal/librarian/java/postprocess_test.go Outdated
Comment thread internal/librarian/java/testdata/postprocess/owlbot.py.golden
Comment thread internal/librarian/java/postprocess_test.go Outdated
Comment thread internal/librarian/java/postprocess.go Outdated
Comment thread internal/librarian/java/postprocess.go Outdated
@sofisl sofisl requested a review from zhumin8 May 11, 2026 17:52
Comment thread internal/librarian/java/postprocess.go Outdated
Comment thread internal/librarian/java/postprocess.go Outdated
@sofisl sofisl merged commit 0e11120 into main May 14, 2026
44 checks passed
@sofisl sofisl deleted the addOwlbotTemplateJava branch May 14, 2026 17:34
sofisl added a commit that referenced this pull request May 14, 2026
…rary (#5905)

Ensures that when a new Java client library is generated for the first
time, the post-processor dynamically templates and writes `owlbot.py` if
it is missing from the output directory. This aligns Librarian with the
legacy Python hermetic build's prerequisite setup and prevents
"owlbot.py not found" errors.

Fixes #5679
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.

java: generate owlbot.py for newly added library

2 participants