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
Downloading plugins uses an engine event #16094
base: master
Are you sure you want to change the base?
Conversation
Changelog[uncommitted] (2024-05-14)Features
|
a746903
to
2584c32
Compare
a30da2c
to
cb62091
Compare
@@ -205,7 +205,7 @@ func TestTreeRenderCallsFrameOnTick(t *testing.T) { | |||
terminalText := buf.String() | |||
assert.Contains(t, terminalText, "pulumi:pulumi:Stack") | |||
assert.Contains(t, terminalText, "System Messages") | |||
assert.Contains(t, terminalText, strings.Repeat("a", 1000)) | |||
assert.Contains(t, terminalText, strings.Repeat("a", 70)) |
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.
Why did this change?
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.
Because I fixed the renderer to trim lines, I can "unfix" if you would prefer
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.
No that's fine, easier if you pull little changes like that out to their own but no need now.
@@ -2,34 +2,34 @@ | |||
|
|||
<{%underline%}><{%fg 12%}>Type<{%reset%}> <{%underline%}><{%fg 12%}>Name<{%reset%}> <{%underline%}><{%fg 12%}>Status<{%reset%}> <{%underline%}><{%fg 12%}>Info<{%reset%}>[K | |||
<{%bold%}><{%reset%}> <{%reset%}> pulumi:pulumi:Stack project-stack <{%bold%}><{%reset%}><{%reset%}> <{%reset%}>Configuration:<{%reset%}>[K | |||
[1A[1A <{%underline%}><{%fg 12%}>Type<{%reset%}> <{%underline%}><{%fg 12%}>Name<{%reset%}> <{%underline%}><{%fg 12%}>Status<{%reset%}> <{%underline%}><{%fg 12%}>Info<{%reset%}>[K |
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.
Why did all these change?
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 way the frame/render logic in the tree renderer worked was fragile (and broken if system messages needed to be displayed) when I used the same mechanism to display the download progress --- which is both more common than system messages, and happens at a different stage in the lifecycle of the engine --- I had to fix the way the redraw logic worked, which means different outputs in these files.
I will also investigate whether we can make these outputs not use escape codes, which will make comparing easier (unless you can read VT100/ANSI escape codes without a crib)
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.
I've made the change, LMK what you think, I can always revert it within the PR, it does feel more readable to me
73be3f2
to
9f31b04
Compare
When engine events are available, downloading a plugin will use the engine event, this allows the display of the download progress to be more cleanly integrated with the rest of the pulumi cli display
9f31b04
to
94ac09a
Compare
Description
When engine events are available, downloading a plugin will use the engine event, this allows the display of the download progress to be more cleanly integrated with the rest of the pulumi cli display
Creates a new engine event
DownloadProgressEvent
which is used to both track and display progress for downloads (currently just for plugins, but for policy in the future)This displays the download progress in the cli for actions that use a deployment (up, preview etc.). The progress is displayed in the bottom third of the terminal
Fixes #15821
Checklist
make tidy
to update any new dependenciesmake lint
to verify my code passes the lint checkgofumpt
make changelog
and committed thechangelog/pending/<file>
documenting my change