pulumi/pkg/backend/httpstate
Will Jones 6ff74d2c6f
Use events to report downloads as system messages (#17019)
When running a Pulumi operation such as a preview or an update, Pulumi
will detect if plugins (e.g. an AWS provider) are missing and download
and install them appropriately. Presently the user experience when this
happens isn't great (see e.g.
https://github.com/pulumi/pulumi/issues/14250), making it hard for the
user to see what is happening/what is taking so long when required
plugins are large.

This commit attempts to rectify this by continuing the work in
https://github.com/pulumi/pulumi/pull/16094 that tracks download
progress using engine events. In doing so, we are able to render
multiple downloads as part of the existing "system messages" panel in
the Pulumi output, and provide a clean view of what is going on when
downloads must occur before program execution. Moreover, we generalise
that PR to handle any engine process, enabling us to play a similar
trick with plugin installations (which can also take a while).

To preserve existing behaviour, we introduce a new class for these
events which we call "ephemeral", meaning that they are not persisted or
rendered in contexts such as diffs, for instance. Specifically,
ephemeral events are *not* sent to HTTP backends (i.e. the service), so
this commit should not require any changes to the service before merging
and releasing.

Fixes #14250
Closes #16094
Closes #16937 



https://github.com/user-attachments/assets/f0fac5e9-b3c8-4ea7-9cb7-075fc4b625d9


https://github.com/user-attachments/assets/7a761aa9-10ad-4f66-afa3-e4550b4553a5
2024-09-03 12:12:04 +00:00
..
client Fix deployment settings serialization and keys consistency (#16904) 2024-08-12 19:28:13 +00:00
testdata [snapshot] Use a newer diff package 2023-05-16 12:33:30 -07:00
backend.go Add GetStoredCredentials to pkg workspace (#17106) 2024-08-29 16:04:27 +00:00
backend_test.go Add GetStoredCredentials to pkg workspace (#17106) 2024-08-29 16:04:27 +00:00
console.go Add support for a PULUMI_CONSOLE_DOMAIN env var (#4410) 2020-04-17 11:50:00 -07:00
console_test.go all: Reformat with gofumpt 2023-03-03 09:00:24 -08:00
diffs.go Clean up uses of .Error() (#14965) 2023-12-20 15:54:06 +00:00
diffs_post_1.20.go Clean up uses of .Error() (#14965) 2023-12-20 15:54:06 +00:00
diffs_pre_1.20.go [snapshot] Use a newer diff package 2023-05-16 12:33:30 -07:00
doc.go Document Go packages (#6009) 2021-01-11 11:07:59 -07:00
environments.go [cli] Include config from ESC in `pulumi config` (#14560) 2023-11-21 10:44:45 +00:00
mock.go Update pu/pu to support deployment run command (#16492) 2024-07-01 14:18:44 +00:00
policypack.go Replace `result.Result` with native errors (#17044) 2024-08-22 14:39:59 +00:00
snapshot.go Lift context parameter to SerializeDeployment/Resource/Operations/Properties (#15929) 2024-04-15 07:45:46 +00:00
snapshot_test.go Add display to the engine tests (#16050) 2024-05-13 07:18:25 +00:00
stack.go Move GetBackendConfigDefaultOrg to pkg workspace (#17105) 2024-08-29 13:22:56 +00:00
state.go Use events to report downloads as system messages (#17019) 2024-09-03 12:12:04 +00:00
token_source.go all: Reformat with gofumpt 2023-03-03 09:00:24 -08:00
token_source_test.go Skip TestTokenSourceWithQuicklyExpiringInitialToken (#16515) 2024-06-28 07:42:46 +00:00