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

test(crd-generator-v2): ensure Collection properties work like List in CRD generation #6018

Merged

Conversation

sunix
Copy link
Collaborator

@sunix sunix commented May 21, 2024

Description

Making sure #5417 could not be reproduced with crd-generator-v2
In the tests

  • Updated ServiceSpec to use Collection instead of List for loadBalancerSourceRanges.
  • Modified getter and setter methods for loadBalancerSourceRanges to use Collection.
  • Confirmed that CRD generation produces a field of type array when using Collection, ensuring compatibility and correct schema output.

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

…RD generation

- Updated `ServiceSpec` to use `Collection` instead of `List` for `loadBalancerSourceRanges`.
- Modified getter and setter methods for `loadBalancerSourceRanges` to use `Collection`.
- Confirmed that CRD generation produces a field of type array when using `Collection`, ensuring compatibility and correct schema output.

Signed-off-by: Sun Seng David TAN <[email protected]>
Copy link
Contributor

@shawkins shawkins left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

Copy link
Member

@manusa manusa left a comment

Choose a reason for hiding this comment

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

LGTM, thx!

@manusa manusa added this to the 6.13.0 milestone May 21, 2024 — with automated-tasks
@sunix sunix merged commit 9529f1d into fabric8io:main May 23, 2024
21 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.

4 participants