Skip to content

improve: blocklist of problematic resources for previous version annotation #2774

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

Merged
merged 9 commits into from
May 16, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,8 @@ default boolean previousAnnotationForDependentResourcesEventFiltering() {
*
* @return a Set of resource classes where the previous version annotation won't be used.
*/
default Set<Class<? extends HasMetadata>> previousAnnotationUsageBlocklist() {
default Set<Class<? extends HasMetadata>>
previousAnnotationForDependentResourcesEventFilteringBlocklist() {
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 think this is fine to have also with shorter form and keep it consistent. (withPreviousAnnotationForDependentResourcesBlocklist)

return Set.of(Deployment.class, StatefulSet.class);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -189,9 +189,9 @@ public ConfigurationServiceOverrider withCloneSecondaryResourcesWhenGettingFromC
return this;
}

public ConfigurationServiceOverrider previousAnnotationUsageBlocklist(
Set<Class<? extends HasMetadata>> previousAnnotationUsageBlacklist) {
this.previousAnnotationUsageBlocklist = previousAnnotationUsageBlacklist;
public ConfigurationServiceOverrider withPreviousAnnotationForDependentResourcesBlocklist(
Set<Class<? extends HasMetadata>> blocklist) {
this.previousAnnotationUsageBlocklist = blocklist;
return this;
}

Expand Down Expand Up @@ -337,10 +337,11 @@ public boolean cloneSecondaryResourcesWhenGettingFromCache() {
}

@Override
public Set<Class<? extends HasMetadata>> previousAnnotationUsageBlocklist() {
public Set<Class<? extends HasMetadata>>
previousAnnotationForDependentResourcesEventFilteringBlocklist() {
return overriddenValueOrDefault(
previousAnnotationUsageBlocklist,
ConfigurationService::previousAnnotationUsageBlocklist);
ConfigurationService::previousAnnotationForDependentResourcesEventFilteringBlocklist);
}
};
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ private boolean usePreviousAnnotation(Context<P> context) {
&& !context
.getControllerConfiguration()
.getConfigurationService()
.previousAnnotationUsageBlocklist()
.previousAnnotationForDependentResourcesEventFilteringBlocklist()
.contains(this.resourceType());
}
return usePreviousAnnotationForEventFiltering;
Expand Down