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

[Backport 2.x] Generate GetSnapshot (#1299) #1336

Merged

Conversation

hogesako
Copy link
Contributor

@hogesako hogesako commented Dec 4, 2024

Description

Backport #1299 to 2.x
Please review to ensure compatibility is maintained.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

@hogesako hogesako changed the title Generate GetSnapshot (#1299) [Backport 2.x] Generate GetSnapshot (#1299) Dec 4, 2024
public final int total() {
return this.total;
return 0;
Copy link
Collaborator

Choose a reason for hiding this comment

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

May be:

Suggested change
return 0;
return snapshots().size();

Copy link
Collaborator

Choose a reason for hiding this comment

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

Could also rather than removing the fields just make them optional, and just have the minor "breakage"/inconvenience of them going from int to Integer

@Xtansia
Copy link
Collaborator

Xtansia commented Dec 4, 2024

Please also run ./gradlew spotlessApply

@hogesako hogesako force-pushed the backport/backport-1299-to-2.x branch from 989cfc2 to deb52b6 Compare December 5, 2024 12:36
public final List<InfoFeatureState> featureStates() {
return this.featureStates;
return new ArrayList<>();
Copy link
Collaborator

Choose a reason for hiding this comment

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

Super nit:

Suggested change
return new ArrayList<>();
return Collections.emptyList();

Copy link
Collaborator

@reta reta Dec 5, 2024

Choose a reason for hiding this comment

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

Or just delete it as well, since it was not supported anyway

* Generate get snapshot

Signed-off-by: Tatsuya Kawakami <43780506+hogesako@users.noreply.github.com>

* add changelog

Signed-off-by: Tatsuya Kawakami <43780506+hogesako@users.noreply.github.com>

* Update codegen

Signed-off-by: Thomas Farr <tsfarr@amazon.com>

---------

Signed-off-by: Tatsuya Kawakami <43780506+hogesako@users.noreply.github.com>
Signed-off-by: Thomas Farr <tsfarr@amazon.com>
Co-authored-by: Thomas Farr <tsfarr@amazon.com>
(cherry picked from commit 1c7c6e0)
@hogesako hogesako force-pushed the backport/backport-1299-to-2.x branch from deb52b6 to 2929787 Compare December 5, 2024 13:33
@Xtansia Xtansia merged commit 2a7cd60 into opensearch-project:2.x Dec 5, 2024
49 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.

3 participants