Skip to content

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

Merged
google-oss-prow[bot] merged 1 commit into
GoogleCloudPlatform:masterfrom
jasonvigil:fix-reconciler-predicate
Sep 18, 2024
Merged

google-oss-prow[bot] merged 1 commit into
GoogleCloudPlatform:masterfrom
jasonvigil:fix-reconciler-predicate

Conversation

@jasonvigil

@jasonvigil jasonvigil commented Sep 18, 2024 •

Copy link
Copy Markdown

Fixes #2706

@yuwenma

yuwenma commented Sep 18, 2024

Copy link
Copy Markdown
Contributor

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

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.

@yuwenma yuwenma left a comment

Copy link
Copy Markdown
Contributor

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.

@google-oss-prow

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

Details 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 removed the lgtm label Sep 18, 2024
@yuwenma

yuwenma commented Sep 18, 2024

Copy link
Copy Markdown
Contributor

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