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

feat: direct dataformrepository ctrl #2283

Merged
merged 3 commits into from
Jul 17, 2024

Conversation

acpana
Copy link
Collaborator

@acpana acpana commented Jul 12, 2024

Add direct controller for DataformRepository.

@acpana acpana force-pushed the acpana/dataform-direct-ctrl branch 4 times, most recently from 65f18f3 to 6435d03 Compare July 16, 2024 00:02
Signed-off-by: Alex Pana <8968914+acpana@users.noreply.github.com>
Signed-off-by: Alex Pana <8968914+acpana@users.noreply.github.com>
@acpana acpana force-pushed the acpana/dataform-direct-ctrl branch from 6435d03 to 448a74d Compare July 16, 2024 19:43
@acpana acpana marked this pull request as ready for review July 16, 2024 19:44
pkg/controller/direct/dataform/repository_controller.go Outdated Show resolved Hide resolved
return fmt.Sprintf("projects/%s/locations/%s", a.projectID, a.location)
}

func setStatus(u *unstructured.Unstructured, typedStatus any) error {
Copy link
Collaborator

Choose a reason for hiding this comment

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

If it's alpha (and therefore uses observedState) we might actually use a different helper setObservedState; it's a much simpler function to write

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Is it ok if I follow up here? There's a few changes to the API that are needed for the beta promotion and there's no ObservedState yet in the Status. I can add it with the other API changes.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Of course!

pkg/controller/direct/export.go Outdated Show resolved Hide resolved
pkg/controller/direct/registry/registry.go Outdated Show resolved Hide resolved
@justinsb
Copy link
Collaborator

LGTM. Only blocker is whether we can do something better than string matching against the error

Signed-off-by: Alex Pana <8968914+acpana@users.noreply.github.com>
@acpana acpana force-pushed the acpana/dataform-direct-ctrl branch from 448a74d to edb09e7 Compare July 17, 2024 21:08
@acpana acpana requested a review from justinsb July 17, 2024 21:37
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: justinsb

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

@google-oss-prow google-oss-prow bot merged commit e1b2313 into master Jul 17, 2024
16 checks passed
@acpana acpana deleted the acpana/dataform-direct-ctrl branch July 26, 2024 19:23
@yuwenma yuwenma added this to the 1.121 milestone Aug 3, 2024
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

3 participants