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

fix: Enable TF-based reconciler for SQLInstances without clone source #2731

Conversation

jasonvigil
Copy link
Collaborator

@jasonvigil jasonvigil commented Sep 18, 2024

Fixes #2706

@yuwenma
Copy link
Collaborator

yuwenma commented Sep 18, 2024

For the cases we found in #2706, I think we also want to add the support in the direct SQLInstance reconciler to remove system labels, and recognize/propagate the 0 int value. But I'm good if you want to do that in separate PRs.

@jasonvigil
Copy link
Collaborator Author

For the cases we found in #2706, I think we also want to add the support in the direct SQLInstance reconciler to remove system labels, and recognize/propagate the 0 int value. But I'm good if you want to do that in separate PRs.

Yeah, this is just a quick fix to unblock the release.

}

if (hasTerraformController || hasDCLController) && useDirectReconcilerPredicate == nil {
} else {
logger.Error(fmt.Errorf("no predicate where we have multiple controllers"), "skipping direct controller registration", "group", gvk.Group, "version", gvk.Version, "kind", gvk.Kind)
hasDirectController = false
Copy link
Collaborator

Choose a reason for hiding this comment

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

Previously we decouple the CRDs and controllers and let the labels on CRD to choose the controller. It only moves from TF to direct but not vice versa (which is an important precondition).

Now the controller decision is switched to the CR object.

I like the reconcile gate idea overall (except that it is very challenge to figure out which reconciler is being used, that could make triaging more difficult). I think my concern is mainly that the reconcile gate has changed the concept about some basic concept about the direct registry and label based reconciliations, that is not covered by any of our guides, tools, and test.

Copy link
Collaborator

@yuwenma yuwenma 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

I'd like to have this PR goes in to unblock users and continue the reconcile gate discussion.

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

@jasonvigil jasonvigil force-pushed the fix-reconciler-predicate branch from dd9a91c to 4d28f72 Compare September 18, 2024 20:57
@google-oss-prow google-oss-prow bot removed the lgtm label Sep 18, 2024
@yuwenma
Copy link
Collaborator

yuwenma commented Sep 18, 2024

/lgtm

@google-oss-prow google-oss-prow bot added the lgtm label Sep 18, 2024
@google-oss-prow google-oss-prow bot merged commit c2b5793 into GoogleCloudPlatform:master Sep 18, 2024
16 checks passed
@jasonvigil jasonvigil deleted the fix-reconciler-predicate branch September 18, 2024 21:58
@yuwenma yuwenma added this to the 1.123 milestone Oct 25, 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.

SQLInstance Error 400: The incoming request contained invalid data., invalidRequest
2 participants