-
Notifications
You must be signed in to change notification settings - Fork 116
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
Log deployed resources in alphabetical order for ease of comparison #441
Conversation
7fdbf42
to
b23efe2
Compare
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.
Thanks for this pr. I'm hoping this will be a small change that makes for a better user experience.
Two quick thoughts:
-
I dislike passing an additional arg to
initialize
andbuild
that really only gets used by secrets created byejson
, It feels like we're already passing too many args to those functions. -
Does logging all of the names at once, instead of near the processing of the resource make debugging harder if something raises an exception?
Resolved
Do you have a suggestion for how to ensure these log messages are sorted while also emitting them immediately while iterating an unsorted set? |
I agree that doesn't sound possible. I'm thinking that there's more value to the discovery step if it continues to print the list as it goes, and that it is very reasonable for a step called "discovery" to list things in the order encountered. I would be inclined to sort right at the end of discovery, which will still result in printing an ordered list very early on (at "checking initial statuses"). We also wouldn't need to make |
@KnVerey I understood the contention to be around deployment, not discovery: https://github.com/Shopify/kubernetes-deploy/pull/441/files#diff-4c33bbb177fdf882c41d892f3bde9570L379 |
aef5ae3
to
08c2c25
Compare
That link doesn't point to anything in particular for me, but I'm really not concerned about consolidating the deploy list. In practice, there's only one type that (sadly) still cannot be applied in k8s 1.10+: On the other hand, during template discovery, there are a lot more moving parts and a much higher chance of user error and resulting failure. That's why I think we should keep logging the resources as we go there, even though that means the first listing will stay out of order. |
08c2c25
to
c76f36c
Compare
@KnVerey Done. With that restriction to the sorting, the implementation turned out really simple. |
2 test failure:
Both look to be just an ordering issue |
Seems like a simple improvement that will be much appreciated (I'm definitely happy to see it). I'll hold off ✅ until the tests are passing but this looks good to me. |
c76f36c
to
79407c9
Compare
@dturn @timothysmith0609 @KnVerey Failing tests fixed. This should be good to go. |
Closes #261