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

Add functions for generic OpenAPI CRUD handling #644

Merged
merged 11 commits into from
Jan 30, 2024

Conversation

Didainius
Copy link
Collaborator

@Didainius Didainius commented Jan 19, 2024

About

This PR is about an attempt to leverage Go generics (parametric polymorphism) to streamline SDK development.
As part of this PR, a few of the existing entities were converted to demonstrate the use of new functions.

Terminology

These names are not set in stone and are subject to change.

  • inner
  • outer*

Commits

  • Commit 4d5a06a contains only introduction of generic CRUD entities (inner and outer)
  • Commit dc93038 adds consumption examples throughout our codebase

Next PRs contain self review and fixed over all codebase.

Testing

  • Test suite passed on 10.5.1 for both SDK and Terraform (at commit bfabfb0)

@Didainius Didainius force-pushed the generics-pr branch 3 times, most recently from 2b43b78 to 9cae7bc Compare January 22, 2024 06:52
@Didainius Didainius force-pushed the generics-pr branch 2 times, most recently from 9f370c6 to b3b69da Compare January 22, 2024 11:32
@Didainius Didainius force-pushed the generics-pr branch 5 times, most recently from a041cf4 to a9968ac Compare January 23, 2024 06:28
Signed-off-by: Dainius Serplis <[email protected]>
@Didainius Didainius force-pushed the generics-pr branch 3 times, most recently from 88ca688 to 53b72bf Compare January 24, 2024 11:24
Signed-off-by: Dainius Serplis <[email protected]>
@Didainius Didainius force-pushed the generics-pr branch 3 times, most recently from 5f00d72 to 2df30b0 Compare January 25, 2024 05:38
Signed-off-by: Dainius Serplis <[email protected]>
Signed-off-by: Dainius Serplis <[email protected]>
@Didainius Didainius marked this pull request as ready for review January 26, 2024 11:01
Signed-off-by: Dainius Serplis <[email protected]>
Copy link
Contributor

@dataclouder dataclouder left a comment

Choose a reason for hiding this comment

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

First pass, mainly dealing with documentation and comments. More after testing

Copy link
Collaborator

@lvirbalas lvirbalas left a comment

Choose a reason for hiding this comment

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

Thanks for a huge refactoring and reduction of repeated code. Let's test the nuts of it before merging!

Signed-off-by: Dainius Serplis <[email protected]>
Copy link
Collaborator

@adambarreiro adambarreiro left a comment

Choose a reason for hiding this comment

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

Running some tests with CSE, LGTM, will approve afterwards

Signed-off-by: Dainius Serplis <[email protected]>
@Didainius Didainius merged commit 3741967 into vmware:main Jan 30, 2024
2 checks passed
@Didainius Didainius deleted the generics-pr branch January 30, 2024 07:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants