Skip to content

chore: regenerate grafeas#15537

Merged
ohmayr merged 1 commit intomainfrom
fix-grafeas
Feb 6, 2026
Merged

chore: regenerate grafeas#15537
ohmayr merged 1 commit intomainfrom
fix-grafeas

Conversation

@parthea
Copy link
Contributor

@parthea parthea commented Feb 6, 2026

Re-generate grafeas following #15532 which mentions Generation failed for grafeas

@parthea parthea requested review from a team as code owners February 6, 2026 20:18
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @parthea, 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 regenerates the Grafeas client library to resolve a prior generation issue. The changes primarily involve updating protobuf import conventions across the codebase, optimizing JSON serialization within the REST transport, and refining the documentation build process by filtering out specific Sphinx warnings. These updates ensure the client library is up-to-date and its documentation generation is cleaner.

Highlights

  • Grafeas Client Regeneration: The core change is the regeneration of the Grafeas client library, addressing a previous generation failure as noted in the PR description.
  • Protobuf Import Style Update: Numerous files across the grafeas_v1 package have been updated to use an aliased import style for google.protobuf and google.rpc modules (e.g., import google.protobuf.X as X instead of from google.protobuf import X).
  • REST Transport JSON Serialization Improvement: The REST transport now uses type(request).to_json(request) for JSON serialization, potentially improving efficiency or correctness in how messages are converted to JSON.
  • Documentation Build Enhancement: A Sphinx warning filter has been added to conf.py to suppress 'Bullet list ends without a blank line' warnings, leading to cleaner documentation build output.
Changelog
  • .librarian/generator-input/client-post-processing/unique-grafeas-client.yaml
    • Refactored the from_service_account_file method call to directly invoke the function without an intermediate variable.
  • .librarian/state.yaml
    • Updated the last_generated_commit for the grafeas library to reflect the latest successful generation.
  • packages/grafeas/docs/conf.py
    • Introduced a logging.Filter to suppress 'Bullet list ends without a blank line' warnings during Sphinx documentation builds.
    • Added logging and typing.Any imports.
    • Minor comment formatting adjustment.
  • packages/grafeas/grafeas/grafeas_v1/services/grafeas/async_client.py
    • Modified protobuf import statements to use import google.protobuf.X as X style.
  • packages/grafeas/grafeas/grafeas_v1/services/grafeas/client.py
    • Modified protobuf import statements to use import google.protobuf.X as X style.
  • packages/grafeas/grafeas/grafeas_v1/services/grafeas/transports/base.py
    • Modified protobuf import statements to use import google.protobuf.X as X style.
  • packages/grafeas/grafeas/grafeas_v1/services/grafeas/transports/grpc.py
    • Modified protobuf import statements to use import google.protobuf.X as X style.
  • packages/grafeas/grafeas/grafeas_v1/services/grafeas/transports/grpc_asyncio.py
    • Modified protobuf import statements to use import google.protobuf.X as X style.
  • packages/grafeas/grafeas/grafeas_v1/services/grafeas/transports/rest.py
    • Modified protobuf import statements to use import google.protobuf.X as X style.
    • Updated JSON serialization from json_format.MessageToJson(request) to type(request).to_json(request).
  • packages/grafeas/grafeas/grafeas_v1/services/grafeas/transports/rest_base.py
    • Modified protobuf import statements to use import google.protobuf.X as X style.
  • packages/grafeas/grafeas/grafeas_v1/types/deployment.py
    • Modified protobuf import statements to use import google.protobuf.X as X style.
  • packages/grafeas/grafeas/grafeas_v1/types/discovery.py
    • Modified protobuf import statements to use import google.protobuf.X as X style.
  • packages/grafeas/grafeas/grafeas_v1/types/grafeas.py
    • Modified protobuf import statements to use import google.protobuf.X as X style.
  • packages/grafeas/grafeas/grafeas_v1/types/intoto_provenance.py
    • Modified protobuf import statements to use import google.protobuf.X as X style.
  • packages/grafeas/grafeas/grafeas_v1/types/intoto_statement.py
    • Modified protobuf import statements to use import google.protobuf.X as X style.
  • packages/grafeas/grafeas/grafeas_v1/types/provenance.py
    • Modified protobuf import statements to use import google.protobuf.X as X style.
  • packages/grafeas/grafeas/grafeas_v1/types/secret.py
    • Modified protobuf import statements to use import google.protobuf.X as X style.
  • packages/grafeas/grafeas/grafeas_v1/types/slsa_provenance.py
    • Modified protobuf import statements to use import google.protobuf.X as X style.
  • packages/grafeas/grafeas/grafeas_v1/types/slsa_provenance_zero_two.py
    • Modified protobuf import statements to use import google.protobuf.X as X style.
  • packages/grafeas/grafeas/grafeas_v1/types/upgrade.py
    • Modified protobuf import statements to use import google.protobuf.X as X style.
  • packages/grafeas/grafeas/grafeas_v1/types/vulnerability.py
    • Modified protobuf import statements to use import google.protobuf.X as X style.
  • packages/grafeas/tests/unit/gapic/grafeas_v1/test_grafeas.py
    • Modified protobuf import statements to use import google.protobuf.X as X style.
Activity
  • The pull request was created to address a previous generation failure for the grafeas library.
  • The last_generated_commit in .librarian/state.yaml was updated, indicating a successful regeneration process.
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

The pull request primarily consists of regenerated code for the grafeas library. Key changes include a consistent update to protobuf import styles across many files, a minor refactoring in a client post-processing YAML, and the addition of a Sphinx logging filter to suppress specific documentation build warnings. The most notable functional change is the switch to type(request).to_json(request) for JSON serialization in the REST transport, which likely leverages a more direct serialization method. Overall, the changes appear to be part of an automated regeneration process aimed at improving code consistency and documentation build stability. The provided comments regarding import style consistency are valid and align with general best practices.

from google.auth.transport.requests import AuthorizedSession # type: ignore
import google.protobuf
from google.protobuf import empty_pb2 # type: ignore
from google.protobuf import json_format
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The import style for json_format is inconsistent with other protobuf imports in this file and across the regenerated code. For better consistency, consider changing it to import google.protobuf.json_format as json_format.

Suggested change
from google.protobuf import json_format
import google.protobuf.json_format as json_format
References
  1. PEP 8 recommends consistency in code style to improve readability and maintainability. (link)


from google.api_core import gapic_v1, path_template
from google.protobuf import empty_pb2 # type: ignore
from google.protobuf import json_format
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The import style for json_format is inconsistent with other protobuf imports in this file and across the regenerated code. For better consistency, consider changing it to import google.protobuf.json_format as json_format.

Suggested change
from google.protobuf import json_format
import google.protobuf.json_format as json_format
References
  1. PEP 8 recommends consistency in code style to improve readability and maintainability. (link)

@ohmayr ohmayr merged commit ab4657e into main Feb 6, 2026
27 checks passed
@ohmayr ohmayr deleted the fix-grafeas branch February 6, 2026 21:47
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.

2 participants