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

[crd-generator] Fix fallback value of Default annotation in presence of multiple accessors #5503

Merged
merged 5 commits into from
Oct 16, 2023

Conversation

andreaTP
Copy link
Member

@andreaTP andreaTP commented Oct 9, 2023

Description

Fix #5501

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

@@ -558,7 +558,7 @@ public Property process() {
LOGGER.debug("Description for property {} has already been contributed by: {}", name, descriptionContributedBy);
}
}
defaultValue = p.getDefault().orElse(null);
defaultValue = p.getDefault().orElse(defaultValue);
Copy link
Member Author

Choose a reason for hiding this comment

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

for the records, this is the bug.

public class ZookeeperSpec {

@SpecReplicas
private int size;
@Required
private String version;
@Default("false")
Copy link
Member Author

Choose a reason for hiding this comment

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

Please, take note that the issue was reproducible only here.

@sonarqubecloud
Copy link

sonarqubecloud bot commented Oct 9, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

100.0% 100.0% Coverage
0.0% 0.0% Duplication

warning The version of Java (11.0.20.1) you have used to run this analysis is deprecated and we will stop accepting it soon. Please update to at least Java 17.
Read more here

@manusa manusa added this to the 6.10.0 milestone Oct 16, 2023
@manusa manusa merged commit 77a65f7 into fabric8io:main Oct 16, 2023
20 checks passed
@manusa manusa modified the milestones: 6.10.0, 6.9.1 Oct 26, 2023
euberseder-hubspot added a commit to HubSpot/kubernetes-client that referenced this pull request Dec 21, 2023
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.

Default annotation not working as expected
3 participants