-
Notifications
You must be signed in to change notification settings - Fork 104
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 products command #516
Add products command #516
Conversation
* Lists available, staged, and deployed products * Replaces 'available-products', 'staged-products', and 'deployed-products' commands * Update docs around products command * Add deprecation notices to 'available-products', 'staged-products', and 'deployed-products' commands
We have created an issue in Pivotal Tracker to manage this. Unfortunately, the Pivotal Tracker project is private so you may be unable to view the contents of the story. The labels on this github issue will be updated when the story is started. |
Supports any combination of
|
There are probably some edge cases that need to be thought through. |
We just tried with With
When we run it with the command
There is a difference of:
|
Cool, I'll look into those and push a change with the fixes! |
Keep in mind the combined view @eitansuez linked in the issue for as well (the empty line so that everything organizes nice)
|
- Hide products if they have no versions that satisfy the requested columns - Display multiple available product versions
Here's the updated output for
And
|
Seems like I dropped the |
All Comparison outputs (for documentation purposes):
It looks real good (in terms of output) IMO. It takes the same display and functionality, and makes it easier to read and look at. Thanks for alphabetizing the products, too. that adds a lot. Looking at the commits now |
productVersionsCombiner[product.Name] = productVersions | ||
} | ||
|
||
for _, product := range deployedProducts { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This whole section is clear, and easy to read. If I'm trying to be nitpicky, I'd love to see these for
loops in functions (combineStagedProducts
, combineAvailableProducts
, combineDeployedProducts
or something similar)
Just to let this flow top->bottom a little faster without the for loop break
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if these functions also have the sp
receiver like Execute
, you can also clean up some of the earlier setup
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The only reason I didn't pull these into separate functions was the complexity of their signatures when using Intellij's extract method feature. It might not have actually needed to be that complicated, though. I just didn't dig further at that point.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
had a quick additional commit to implement this.
Added a couple more display check tests. Adding the outputs here for documentation
|
var outputData []string | ||
|
||
moreAvailableProducts = false | ||
if products.Available { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lost of nested if
s in these for
loops.
This is still clear, but aesthetically could put the logic of these if blocks into functions to make the nesting a little less crazy
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense. I was definitely running short on time when doing this and wanted something working before the refactoring step.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looking into this now, and refactoring is a little more complicated. We looked into it and are not going to refactor. Maybe there's a good way to do it, but not as simple as originally thought
Added a couple refactor suggestions in the commits @iplay88keys Thank you for re-generating docs 👍 |
Merged |
Resolves #466