-
Notifications
You must be signed in to change notification settings - Fork 6
Subresource event filter predicate #6
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
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should invert the model and just filter out events for which the only thing that changed were things in the status subresource. As it stands right now you're going to filter out things that the user will expect to be able to change, and you're going to filter out reconciliations on downstream resources, e.g. jobs.
ffacfa1
to
e0b8cfa
Compare
Updated to filter only on ManagedDatabases generation change. Other types will update when resourceVersion is changed. Doesn't look like Jobs were using the generation field anyways... So I'm guessing we can't just make the assumption that an update to the status of any object type will increment its generation. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I need to think about the event filter some more. There are a lot of cases where we want to run a reconciliation that I think this will filter. For example, we will get awakened when the job or secret changes, but the underlying mdb will not have changed, we want to run reconciliation and I think this will filter those cases. Rather than filter, can we just focus on converging by making the status blocks state dependent and reproduceable?
oneMigration.log.Info("Migration job is complete") | ||
|
||
// TODO: should we write the metric here or wait until cleanup? | ||
} else if job.Status.Active == 0 && job.Status.Conditions != nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you break just this part out into a separate PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
e0b8cfa
to
7804ad6
Compare
Add event filter for
ManagedDatabase
to ignore updates to subresources unless it's theManagedDatabase
's currentVersion, in which case we want to reconcile the next migration.