Skip to content

[do not merge]: Dry run for packages/gapic-generator migration#16106

Draft
ohmayr wants to merge 1390 commits intomainfrom
migration.gapic-generator-python.migration.2026-03-13_19-18-56.migrate
Draft

[do not merge]: Dry run for packages/gapic-generator migration#16106
ohmayr wants to merge 1390 commits intomainfrom
migration.gapic-generator-python.migration.2026-03-13_19-18-56.migrate

Conversation

@ohmayr
Copy link
Contributor

@ohmayr ohmayr commented Mar 13, 2026

See #14907.

This PR should be merged with a merge-commit, not a squash-commit, in order to preserve the git history.

release-please bot and others added 30 commits April 26, 2024 12:30
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>
ohmayr and others added 27 commits February 5, 2026 14:02
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>
…n/main' into migration.gapic-generator-python.migration.2026-03-13_19-18-56.migrate
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello, 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

  • Code Migration: Migrated the code from the googleapis/gapic-generator-python repository into the packages/gapic-generator directory within the repository.
  • Bazel Build: Added Bazel build files and configurations to manage the project's build process.
  • Tooling Configuration: Included various configuration files for tools such as Bazelisk, Flake8, and Docker to ensure consistent development practices.
  • Documentation Setup: Configured documentation generation using Sphinx and added necessary documentation files.
  • Git Hooks: Integrated Git pre-commit hooks to automate code checks and formatting before commits.
  • Licensing: Added LICENSE file and updated relevant files with the Apache 2.0 license.
Activity
  • Code migration from googleapis/gapic-generator-python.
  • Addition of Bazel build files and configurations.
  • Configuration of development tools (Bazelisk, Flake8, Docker).
  • Setup for documentation generation with Sphinx.
  • Integration of Git pre-commit hooks.
  • Addition of Apache 2.0 license and related files.
Using Gemini Code Assist

The 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 /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.

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

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
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 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)

critical

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)

critical

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)

high

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@v4

packages/gapic-generator/.github/workflows/tests.yaml (64)

high

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@v5

packages/gapic-generator/.readthedocs.yml (6)

medium

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.9

packages/gapic-generator/.githooks/pre-commit (127-130)

medium

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)

medium

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)

medium

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)

medium

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)

medium

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)

medium

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)

medium

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)

medium

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)

medium

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.

@parthea parthea changed the title chore(migration): Migrate code from googleapis/gapic-generator-python into packages/gapic-generator [do not merge]: Dry run for packages/gapic-generator migration Mar 13, 2026
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.