Skip to content

fix(rbgs): missing re-generate client code for rbgs#236

Merged
cheyang merged 1 commit intosgl-project:mainfrom
Syspretor:fix/missing-generate-latest-client-code-for-rbgs
Mar 23, 2026
Merged

fix(rbgs): missing re-generate client code for rbgs#236
cheyang merged 1 commit intosgl-project:mainfrom
Syspretor:fix/missing-generate-latest-client-code-for-rbgs

Conversation

@Syspretor
Copy link
Copy Markdown
Collaborator

Ⅰ. Motivation

Ⅱ. Modifications

Ⅲ. Does this pull request fix one issue?

fixes #XXXX

Ⅳ. List the added test cases (unit test/integration test) if any, please explain if no tests are needed.

Ⅴ. Describe how to verify it

VI. Special notes for reviews

Checklist

  • Format your code make fmt.
  • Add unit tests or integration tests.
  • Update the documentation related to the change.

@gemini-code-assist
Copy link
Copy Markdown

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 rectifies an oversight in the client code generation for RoleBasedGroupSets by eliminating an erroneously generated RoleBasedGroupTemplateSpec type. The RoleBasedGroupSetSpec has been refactored to directly embed the RoleBasedGroupSpec, simplifying the overall API structure and ensuring that the client-go types accurately reflect the intended resource definitions. This change improves the correctness and maintainability of the generated client code.

Highlights

  • Client Code Regeneration Fix: Addressed an issue where client code for RoleBasedGroupSets (RBGS) was incorrectly generated, leading to the presence of an unnecessary RoleBasedGroupTemplateSpec type.
  • API Structure Simplification: The RoleBasedGroupTemplateSpecApplyConfiguration type and its associated file have been entirely removed, streamlining the API definition.
  • RoleBasedGroupSetSpec Update: The RoleBasedGroupSetSpecApplyConfiguration has been updated to directly reference RoleBasedGroupSpecApplyConfiguration via a Template field, replacing the previously used GroupTemplate field which pointed to the now-removed template type.
  • Utility Function Cleanup: The ForKind utility function in client-go/applyconfiguration/utils.go was cleaned up by removing the case for the deprecated RoleBasedGroupTemplateSpec.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

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.

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
Copy Markdown

@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 updates the auto-generated client-go apply configurations to match the recent refactoring of the RoleBasedGroupSet API. The changes correctly replace the now-defunct RoleBasedGroupTemplateSpec with RoleBasedGroupSpec in the RoleBasedGroupSetSpecApplyConfiguration, remove the obsolete generated files, and update the utility functions. These modifications are consistent and necessary to align the client code with the API definition.

Copy link
Copy Markdown
Collaborator

@cheyang cheyang left a comment

Choose a reason for hiding this comment

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

/lgtm
/approve

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Regenerates/fixes the client-go apply-configuration output for workloads/v1alpha1 so it matches the actual v1alpha1 API shape (RBGS uses template, not groupTemplate), removing stale generated types and mappings.

Changes:

  • Removes the v1alpha1 apply-configuration for RoleBasedGroupTemplateSpec (type does not exist in v1alpha1 API).
  • Updates RoleBasedGroupSetSpecApplyConfiguration (v1alpha1) to use Template with the correct JSON tag and builder method.
  • Drops the v1alpha1 ForKind mapping for RoleBasedGroupTemplateSpec in apply-configuration utilities.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
client-go/applyconfiguration/workloads/v1alpha1/rolebasedgrouptemplatespec.go Removes stale v1alpha1 generated apply-config type for a non-existent API kind.
client-go/applyconfiguration/workloads/v1alpha1/rolebasedgroupsetspec.go Aligns v1alpha1 RBGS spec apply-config to Template (and WithTemplate) instead of GroupTemplate.
client-go/applyconfiguration/utils.go Removes v1alpha1 ForKind case for RoleBasedGroupTemplateSpec while keeping v1alpha2 support.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@cheyang cheyang merged commit 1e5144b into sgl-project:main Mar 23, 2026
13 checks passed
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.

3 participants