[do not merge]: Dry run for packages/gapic-generator migration#16106
[do not merge]: Dry run for packages/gapic-generator migration#16106
Conversation
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
Co-authored-by: Victor Chudnovsky <vchudnov@google.com>
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Anthonios Partheniou <partheniou@google.com>
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
Co-authored-by: Anthonios Partheniou <partheniou@google.com>
Co-authored-by: Anthonios Partheniou <partheniou@google.com>
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: Anthonios Partheniou <partheniou@google.com>
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
Co-authored-by: Anthonios Partheniou <partheniou@google.com>
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
Co-authored-by: Anthonios Partheniou <partheniou@google.com>
Co-authored-by: Anthonios Partheniou <partheniou@google.com>
Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: Anthonios Partheniou <partheniou@google.com>
Co-authored-by: Anthonios Partheniou <partheniou@google.com>
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Anthonios Partheniou <partheniou@google.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: Anthonios Partheniou <partheniou@google.com>
Co-authored-by: Anthonios Partheniou <partheniou@google.com>
Co-authored-by: Anthonios Partheniou <partheniou@google.com>
…cloud-kms and google-cloud-os-config (#2588)
…n/main' into migration.gapic-generator-python.migration.2026-03-13_19-18-56.migrate
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request migrates the gapic-generator code from the googleapis repository to a dedicated package within this repository. It includes significant structural changes, incorporating Bazel build configurations, tooling setups, documentation infrastructure, and pre-commit hooks to standardize and improve the development workflow. Highlights
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request migrates the gapic-generator-python code into the packages/gapic-generator directory. My review focuses on ensuring the build configurations, CI/CD workflows, and documentation are correct after this migration. I've identified several critical issues in the Bazel WORKSPACE file and high-severity issues in the GitHub Actions workflow that could cause build failures. Additionally, there are several medium-severity issues in documentation and pre-commit hooks that should be addressed to ensure consistency and correctness.
I am having trouble creating individual review comments. Click here to see my feedback.
packages/gapic-generator/WORKSPACE (75)
The protobuf version 30.2 appears to be incorrect. Based on the provided SHA256 hash, the correct version should be 21.12. An incorrect version will cause the http_archive rule to fail when fetching the dependency.
_protobuf_version = "21.12"
packages/gapic-generator/WORKSPACE (63)
The gRPC version 1.71.0 appears to be incorrect. Based on the provided SHA256 hash, the correct version should be 1.47.0. An incorrect version will cause the http_archive rule to fail when fetching the dependency.
_grpc_version = "1.47.0"
packages/gapic-generator/.github/workflows/tests.yaml (62)
The version v5 for actions/checkout is likely incorrect as the latest stable version is v4. Using a non-existent version will cause the workflow to fail. Please update this and all other occurrences in this file to use a valid version, such as v4.
- uses: actions/checkout@v4packages/gapic-generator/.github/workflows/tests.yaml (64)
The version v6 for actions/setup-python is likely incorrect as the latest stable version is v5. Using a non-existent version will cause the workflow to fail. Please update this and all other occurrences in this file to use a valid version, such as v5.
uses: actions/setup-python@v5packages/gapic-generator/.readthedocs.yml (6)
Python 3.7 has reached its end-of-life and is no longer supported. This project's test configurations and setup.py indicate a minimum Python version of 3.9. Please update the Python version here to be consistent with the project's requirements, for example, to 3.9.
version: 3.9packages/gapic-generator/.githooks/pre-commit (127-130)
The buildifier is run on all BUILD.bazel files found in the repository. A pre-commit hook should ideally only process files that are staged for commit. This can be made more efficient and correct by iterating over staged BUILD.bazel files only.
for FILE in $(git diff --cached --name-only '**/BUILD.bazel')
do
buildifier --lint=fix $FILE
done
packages/gapic-generator/.githooks/pre-commit (48-68)
The function header_check_preparation is defined but never called within the script. This appears to be dead code and should be removed to improve code clarity and maintainability.
packages/gapic-generator/README.rst (40)
The language for this code block is specified as c, but it contains Bazel/Starlark code. Using python or bazel would provide more accurate syntax highlighting.
.. code-block:: python
packages/gapic-generator/README.rst (70)
The language for this code block is specified as c, but it contains a Bazel command. Using shell or bash would be more appropriate for syntax highlighting.
.. code-block:: shell
packages/gapic-generator/README.rst (76)
The language for this code block is specified as c, but it contains a shell command. Using shell or bash would be more appropriate for syntax highlighting.
.. code-block:: shell
packages/gapic-generator/.githooks/pre-commit (80)
The path src/test/*/*.golden is a convention for Java projects. For Python projects, test files are typically in a tests/ directory. This line seems to be a leftover from a different project and might not work as intended. If there are no unit test golden files, this variable and its usage should be removed. Otherwise, the path should be corrected to match the project's structure.
packages/gapic-generator/.githooks/pre-commit (71)
The Bazel cache directory name includes _java, which seems to be a copy-paste error from another project, as this is a Python generator. To avoid confusion and potential conflicts, it should be updated to reflect that it's for Python.
BAZEL_CACHE_DIR=/tmp/bazel_cache_gapic_generator_python
packages/gapic-generator/docs/getting-started/_verifying.rst (11)
The documentation suggests using Python 3.7, which has reached its end-of-life. The project requires Python 3.9 or newer. Please update the command to reflect the project's supported Python versions, for example, using python3.9.
$ virtualenv ~/.local/client-lib --python=`which python3.9`
packages/gapic-generator/docs/status.rst (14)
This line states that the output works on Python 3.5 and above, which is outdated. The project now requires Python 3.9 or newer. Please update this documentation to reflect the current minimum supported Python version.
- The output only works on Python 3.9 and above.
See #14907.
This PR should be merged with a merge-commit, not a squash-commit, in order to preserve the git history.