Skip to content

Clean-up Matcher / ResourceUpdatePreProcessor duality #1914

@metacosm

Description

@metacosm

Both concepts are actually quite tied together because usually, if you cannot use the generic matching behavior, this means that you also cannot update the associated resources. This usually means that you need to implement ResourceUpdatePreProcessor if you implement Matcher, for example, if your dependent needs to update the metadata, it probably also need to check whether the actual resource matches the desired one by examining the metadata. However, if you only implement Matcher, your dependent will use the default updating logic, which will only consider the spec part. To fix that problem, you must also implement ResourceUpdatePreProcessor. However, this makes things awkward because we now have a matches method on that interface. We therefore need to unify both Matcher and Updater interfaces by recognising that both are linked and specific behavior in one usually requires specific behavior in the other. This work was started in #1786 but needs to be cleaned-up further.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions