Skip to content
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

chore: Refactor registry to be more reusable #1955

Merged

Conversation

justinsb
Copy link
Collaborator

@justinsb justinsb commented Jun 5, 2024

We need to move things around to avoid import cycles as we add IAM
support.

@justinsb justinsb force-pushed the refactor_registry branch 8 times, most recently from cbbf85b to 949c622 Compare June 5, 2024 17:48
Copy link
Collaborator

Choose a reason for hiding this comment

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

It's weird that this file shows up here. (Since it looks good, no need to clean it up)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I'll rebase once we merge #1956 so this goes away

return registration.model, nil
}

func PreferredGVK(gk schema.GroupKind) (schema.GroupVersionKind, bool) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

I like this name


// SupportsIAM returns true if this resource supports IAM (not all GCP resources do).
// An error will be returned if IsDirect(groupKind) is not true.
func SupportsIAM(groupKind schema.GroupKind) (bool, error) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

I don't see where the registry.SupportsIAM is called. Mind giving me some pointers?

Copy link
Collaborator Author

@justinsb justinsb Jun 5, 2024

Choose a reason for hiding this comment

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

In pkg/cli/cmd/bulkexport/singleresourceiamclient/singleresourceiamclient.go Generally this refactor is working towards #1877

Copy link
Collaborator

Choose a reason for hiding this comment

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

Got it.

@yuwenma
Copy link
Collaborator

yuwenma commented Jun 5, 2024

/lgtm
/approve

/hold one question, otherwise LGTM! And thank you for the change!

Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: yuwenma

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@yuwenma
Copy link
Collaborator

yuwenma commented Jun 7, 2024

/hold cancel
/lgtm

We need to move things around to avoid import cycles as we add IAM
support.
@yuwenma
Copy link
Collaborator

yuwenma commented Jun 13, 2024

/lgtm

@google-oss-prow google-oss-prow bot added the lgtm label Jun 13, 2024
@google-oss-prow google-oss-prow bot merged commit 00c444b into GoogleCloudPlatform:master Jun 13, 2024
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants