Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 we
delete
thespin_thread
fromThread.main['spinners']
here in the ensure, then what does theThread.main['spinners'].pop
later on after theensure
block do... because if nothing gets raised, then this will run both theThread.main['spinners'].delete(spin_thread)
andThread.main['spinners'].pop
?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.
Yeah, it does both... the
pop
is a no-op if theThread.main['spinners']
is empty:I'm guessing this would only be relevant for nested spinners, though... where in the CLI are those actually used? I couldn't find any with a quick look around.
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.
Hopefully not anywhere. There was one in the master deploy wizard but I think it has been removed.
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.
Could this code be simplified to not be broken in complex cases that are not actually used? :/
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 whole spinner.rb should be buried. Very deep.
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.
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.
Dunno how the nested spinners are supposed to work, but testing by changing the
kontena stack install
->Installing dependency ...
into a spinner, it actually behaves alright with this buggy change, at least without errors:In fact, I maybe like the "broken" output with the delete+pop in this PR more than the "working" output before this PR?