ci(showcase): replace hermetic build golden tests with Librarian#13569
ci(showcase): replace hermetic build golden tests with Librarian#13569zhumin8 wants to merge 8 commits into
Conversation
There was a problem hiding this comment.
Code Review
This pull request replaces the Docker-based generation and verification of the Java Showcase library with a local setup using a Python virtual environment and the librarian tool. Key changes include updating the README with the new setup steps, simplifying generate_showcase.sh to run librarian in-place, and updating verify.sh to check for git diffs directly. The review feedback suggests several robust improvements: extracting the librarian version locally from librarian.yaml to avoid network latency, scoping the pip configuration to the virtual environment using the --venv flag, and switching verify.sh to Bash with array variables to prevent word-splitting bugs and fix an invalid option in set -oxe.
|
showcase test failure: https://paste.googleplex.com/5262905682558976 |
|
@blakeli0 @JoeWang1127 Two point worth noting and curious on what do you think:
cc. @lqiu96 who I think may recently be running these tests locally. |
|
|
||
| ```shell | ||
| # Setup and activate Python virtual environment | ||
| python -m venv .venv |
There was a problem hiding this comment.
I assume Python is only needed for post-processing, and we should be able to remove it after we migrate it to Go?
| - name: Install protoc | ||
| run: | | ||
| set -e | ||
| VERSION="33.2" |
There was a problem hiding this comment.
How do we specify protoc version with Librarian now? Is it configurable or we just use the available protoc on the machine?
| -P enable-golden-tests \ | ||
| --batch-mode \ | ||
| --no-transfer-progress | ||
| - name: Restore Matrix Java |
There was a problem hiding this comment.
Is this extra step needed?
Is it because hermetic build used to only modify selective files, but Librarian is a replace-all approach? |
Replace the hermetic build code generation and verification workflow for the showcase client with direct Librarian execution.
Choose to put environment setups outside the script to prevent it from intruding on developers' local configurations, keep execution fast. Note that there are on-going work to simplify these setups (googleapis/librarian#6558 to make protoc part of install; https://github.com/googleapis/librarian/milestone/139 to migrate away from python owlbot.py)
Fixes googleapis/librarian#6393