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

tests: Introduce internal annotation to force reconciliation #1800

Conversation

justinsb
Copy link
Collaborator

@justinsb justinsb commented May 14, 2024

The test.cnrm.cloud.google.com/reconcile-cookie annotation can be
changed without affecting the "true" desired state, but we special-case the annotation in our filtering, so that it still triggers the
reconciler.

@acpana
Copy link
Collaborator

acpana commented May 14, 2024

/hold

CI needs #1799 to run or an early sha as base ref. Feel free to cancel as needed.

Copy link
Collaborator

@acpana acpana left a comment

Choose a reason for hiding this comment

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

Looked at the last commit and I like it! 💯

Would you want to rebase/ discard the commits that have already been merged into main?

@@ -113,6 +114,9 @@ var (
OrgIDAnnotation,
}

// Internal Annotation to force reconciliation
InternalForceReconcileAnnotation = CNRMInternalGroup + "/reconcile-cookie"
Copy link
Collaborator

Choose a reason for hiding this comment

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

this may be overkill but do we want to prevent modifying this anon for non test usage?

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 like your change to make it test, it clearly signals that this should not be relied on in prod. If we discover that people are (ab)using it, that's interesting info and we should probably implement a similar production-suitable feature (which might not actually look very different, but .... shrug)

pkg/k8s/constants.go Outdated Show resolved Hide resolved
@justinsb justinsb changed the title WIP: tests: Introduce internal annotation to force reconciliation tests: Introduce internal annotation to force reconciliation Jun 5, 2024
@justinsb justinsb force-pushed the force_reconcile_with_annotation branch from b55c68b to 3d5786f Compare June 5, 2024 03:14
The test.cnrm.cloud.google.com/reconcile-cookie annotation can be
changed without affecting the "true" desired state, but we special
case the annotation in our filtering, so that it still triggers the
reconciler.

Co-authored-by: alex <[email protected]>
@yuwenma
Copy link
Collaborator

yuwenma commented Jun 5, 2024

/lgtm
/approve

Thank you for the quick fix! (I hit the LLM lazy reconcile flakiness as well). And it is really good to learn the predicate usage with such an example 🌞

@yuwenma
Copy link
Collaborator

yuwenma commented Jun 5, 2024

/hold cancel

#1799 has been merged.

@yuwenma
Copy link
Collaborator

yuwenma commented Jun 5, 2024

/lgtm
/approve

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

@google-oss-prow google-oss-prow bot merged commit 040a9a2 into GoogleCloudPlatform:master Jun 5, 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

3 participants