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: ensures kind is set for generic resource lists #5731

Merged
merged 2 commits into from
Jan 30, 2024

Conversation

shawkins
Copy link
Contributor

@shawkins shawkins commented Jan 29, 2024

closes #5729

There are two additional thoughts here:

  1. we should not need to, but we could do this for types other than generic if we add setKind to HasMetadata.
  2. the logic is currently only doing this for lists as other operations and events doen't seem to have the same problem - but we could of course move the logic into the updateApiVersion if needed.

Description

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

closes fabric8io#5729

Signed-off-by: Steve Hawkins <shawkins@redhat.com>
Signed-off-by: Steve Hawkins <shawkins@redhat.com>
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions

58.0% Coverage on New Code (required ≥ 80%)
C Reliability Rating on New Code (required ≥ A)

See analysis details on SonarCloud

idea Catch issues before they fail your Quality Gate with our IDE extension SonarLint SonarLint

@manusa
Copy link
Member

manusa commented Jan 30, 2024

we should not need to, but we could do this for types other than generic if we add setKind to HasMetadata.

Shouldn't be necessary since the kind is hardcoded during model generation.

@@ -116,7 +117,7 @@ public void onClose(Executor executor) {

BaseClient(final HttpClient httpClient, Config config, ExecutorSupplier executorSupplier,
KubernetesSerialization kubernetesSerialization) {
this.closable = Collections.newSetFromMap(new WeakHashMap<>());
this.closable = Collections.synchronizedSet(Collections.newSetFromMap(new WeakHashMap<>()));
Copy link
Member

Choose a reason for hiding this comment

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

Do these changes have anything to do with this PR?

@manusa manusa added this to the 6.11.0 milestone Jan 30, 2024
@manusa manusa merged commit ef9224a into fabric8io:main Jan 30, 2024
16 of 19 checks passed
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.

Kind is null in for GenericKubernetesResource informer `ResourceEventHandler
4 participants