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

CLI Instance Sorting #146

Merged
merged 18 commits into from
Jul 26, 2022
Merged

CLI Instance Sorting #146

merged 18 commits into from
Jul 26, 2022

Conversation

digocorbellini
Copy link
Contributor

@digocorbellini digocorbellini commented Jul 21, 2022

Issue #, if available: #21, #52, #122

Description of changes:
Implemented instance type sorting for CLI users through the cmd/pkg/sorter package. Users can specify either a json path to a field in the instancetypes.Details struct or they can use one of the hard-coded shorthand values, which use the quantity CLI flags as keys, in order to specify what field to sort instance types by.

json path parsing is done through the use of the following library: https://github.com/oliveagle/jsonpath

This PR is made in response to the following comment in another PR: #138 (comment)

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@digocorbellini digocorbellini self-assigned this Jul 21, 2022
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
pkg/sorter/sorter.go Outdated Show resolved Hide resolved
@digocorbellini digocorbellini marked this pull request as ready for review July 23, 2022 00:28
@digocorbellini digocorbellini requested a review from a team as a code owner July 23, 2022 00:28
cmd/main.go Outdated Show resolved Hide resolved
pkg/sorter/sorter.go Outdated Show resolved Hide resolved
Copy link
Contributor

@AustinSiu AustinSiu left a comment

Choose a reason for hiding this comment

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

LGTM thanks for the significant changes and your persistence, Rodrigo!

Copy link
Contributor

@bwagner5 bwagner5 left a comment

Choose a reason for hiding this comment

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

looking good! Mainly, just 1 comment on the sorter pkg. The rest looks good! nice work!

cmd/main.go Outdated Show resolved Hide resolved
pkg/sorter/sorter.go Outdated Show resolved Hide resolved
Copy link
Contributor

@bwagner5 bwagner5 left a comment

Choose a reason for hiding this comment

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

one more small comment

cmd/main.go Outdated Show resolved Hide resolved
Copy link
Contributor

@bwagner5 bwagner5 left a comment

Choose a reason for hiding this comment

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

lgtm! nice work!

@digocorbellini digocorbellini merged commit 0256428 into aws:main Jul 26, 2022
@digocorbellini digocorbellini mentioned this pull request Jul 26, 2022
@asychev
Copy link

asychev commented Aug 11, 2022

Very useful feature, any ETA for the release?

@bwagner5
Copy link
Contributor

@asychev hopefully by tomorrow!

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.

None yet

5 participants