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

fix: Restore method removed without prior notice #2898

Merged
merged 2 commits into from
Mar 12, 2021

Conversation

manusa
Copy link
Member

@manusa manusa commented Mar 12, 2021

Description

Method removed in #2667 is still used by dependent projects (cc @ppatierno)

Restored the missing method and added a @Depreaction annotation yet to be discussed.

Relates to #2738

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • Feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change
  • Chore (non-breaking change which doesn't affect codebase;
    test, version modification, documentation, etc.)

Checklist

  • Code contributed by me aligns with current project license: Apache 2.0
  • I Added CHANGELOG entry regarding this change
  • I have implemented unit tests to cover my changes
  • I have added/updated the javadocs and other documentation accordingly
  • No new bugs, code smells, etc. in SonarCloud report
  • I tested my code in Kubernetes
  • I tested my code in OpenShift

@centos-ci
Copy link

Can one of the admins verify this patch?

@manusa manusa requested review from metacosm and rohanKanojia March 12, 2021 09:43
Copy link
Contributor

@ppatierno ppatierno left a comment

Choose a reason for hiding this comment

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

Not a admin/maintainer but I approve :-) thanks!

@rohanKanojia
Copy link
Member

I think we would need to update CRD registering logic too to be able to register same pojo for different versions of Custom Resource depending upon OperationContext, right now we're picking group and version from annotations. If someone tries to override this with custom CRDContext, this might fail during watch :

private <T extends HasMetadata> void registerKindToKubernetesDeserializer(Class<T> apiTypeClass) {
if (CustomResource.class.isAssignableFrom(apiTypeClass)) {
KubernetesDeserializer.registerCustomKind(HasMetadata.getApiVersion(apiTypeClass), apiTypeClass.getSimpleName(), apiTypeClass);
}

manusa added a commit to manusa/kubernetes-client that referenced this pull request Mar 12, 2021
Copy link
Collaborator

@metacosm metacosm left a comment

Choose a reason for hiding this comment

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

LGTM apart the Deprecated comment.

@manusa manusa force-pushed the restore/missing-method branch from e24be5d to b0db155 Compare March 12, 2021 11:56
@sonarqubecloud
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants