-
Notifications
You must be signed in to change notification settings - Fork 235
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
tool: add update-types sync
command to synchronize go types with proto definitions
#3401
base: master
Are you sure you want to change the base?
tool: add update-types sync
command to synchronize go types with proto definitions
#3401
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
967b9e4
to
00988c1
Compare
update-types sync
command to synchronize Go types with proto definitions
update-types sync
command to synchronize Go types with proto definitionsupdate-types sync
command to synchronize go types with proto definitions
schedule. This field supports existing time-based and manual transfer | ||
schedule. Also supports Event-Driven transfer schedule. ScheduleOptionsV2 | ||
cannot be used together with ScheduleOptions/Schedule. | ||
description: Options customizing different types of data transfer |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I previously added the scheduleOptionsV2
field manually using the field comments from [1]. However, the correct field comments is [2]. Only a slight difference between the two.
31cd34f
to
16f0059
Compare
Rebased to pick up the fix for the broken HEAD. |
Add a new command 'update-types sync' that synchronizes existing Go types with their proto definitions. This ensures that Go field types and comments stay in sync with the proto definitions while preserving: - Special annotations (e.g. +required) - Reference fields - Ignored fields - Manual edits
go run . update-types sync \ --service google.cloud.bigquery.datatransfer.v1 \ --api-version bigquerydatatransfer.cnrm.cloud.google.com/v1beta1 \ --legacy-mode ${REPO_ROOT}/dev/tasks/fix-gofmt
16f0059
to
6973b19
Compare
Add a new command
update-types sync
that synchronizes existing Go types with corresponding proto definitions (at the pinned version). This ensures that Go field types and comments stay in sync with the proto definitions while preserving:// +required
,// +kubebuilder:xxx
)Example usage
Use the
--legacy-mode
flag for resources that were previously generated with KRM fields without the// +kcc:proto
annotations.