pulumi/pkg/cmd/pulumi
Ian Wahbe 78c48204e0
Normalize plugin.Provider methods to (Context, Request) -> (Response, error) (#16302)
Normalize methods on plugin.Provider to the form:

```go
Method(context.Context, MethodRequest) (MethodResponse, error)
```

This provides a more consistent and forwards compatible interface for
each of our methods.

---

I'm motivated to work on this because the bridge maintains a copy of
this interface: `ProviderWithContext`. This doubles the pain of dealing
with any breaking change and this PR would allow me to remove the extra
interface. I'm willing to fix consumers of `plugin.Provider` in
`pulumi/pulumi`, but I wanted to make sure that we would be willing to
merge this PR if I get it green.

<!--- 
Thanks so much for your contribution! If this is your first time
contributing, please ensure that you have read the
[CONTRIBUTING](https://github.com/pulumi/pulumi/blob/master/CONTRIBUTING.md)
documentation.
-->

# Description

<!--- Please include a summary of the change and which issue is fixed.
Please also include relevant motivation and context. -->

Fixes # (issue)

## Checklist

- [ ] I have run `make tidy` to update any new dependencies
- [ ] I have run `make lint` to verify my code passes the lint check
  - [ ] I have formatted my code using `gofumpt`

<!--- Please provide details if the checkbox below is to be left
unchecked. -->
- [ ] I have added tests that prove my fix is effective or that my
feature works
<!--- 
User-facing changes require a CHANGELOG entry.
-->
- [ ] I have run `make changelog` and committed the
`changelog/pending/<file>` documenting my change
<!--
If the change(s) in this PR is a modification of an existing call to the
Pulumi Cloud,
then the service should honor older versions of the CLI where this
change would not exist.
You must then bump the API version in
/pkg/backend/httpstate/client/api.go, as well as add
it to the service.
-->
- [ ] Yes, there are changes in this PR that warrants bumping the Pulumi
Cloud API version
<!-- @Pulumi employees: If yes, you must submit corresponding changes in
the service repo. -->
2024-06-07 19:47:49 +00:00
..
convert_testdata Refactor convert command to add entrypoint for pulumi convert debugging 2022-10-01 15:40:17 -07:00
pcl_convert_testdata Support PCL as a convert input (and output) 2022-11-11 10:45:40 +00:00
testdata policy publish: default to default-org if possible (#14090) 2023-10-05 16:51:06 +00:00
about.go Pass ProgramInfo through to LanguageRuntime.About (#16311) 2024-06-06 08:21:46 +00:00
about_env.go [cli] Colorize table headers (#14557) 2023-11-14 22:52:57 +00:00
about_test.go Move about information to language plugins (#10392) 2022-08-15 14:55:04 +01:00
ai.go Propagte cobra command context correctly (#15312) 2024-01-30 15:50:39 +00:00
ai_web.go Propagte cobra command context correctly (#15312) 2024-01-30 15:50:39 +00:00
cancel.go Propagte cobra command context correctly (#15312) 2024-01-30 15:50:39 +00:00
config.go Lift context parameter for ApplyProjectConfig (#16012) 2024-04-22 06:37:34 +00:00
config_env.go Fix non-interactive flag for 'new' and 'config env' commands (#16338) 2024-06-06 14:16:45 +00:00
config_env_add.go Fix non-interactive flag for 'new' and 'config env' commands (#16338) 2024-06-06 14:16:45 +00:00
config_env_add_test.go Propagte cobra command context correctly (#15312) 2024-01-30 15:50:39 +00:00
config_env_init.go Fix non-interactive flag for 'new' and 'config env' commands (#16338) 2024-06-06 14:16:45 +00:00
config_env_init_test.go Propagte cobra command context correctly (#15312) 2024-01-30 15:50:39 +00:00
config_env_ls.go Fix non-interactive flag for 'new' and 'config env' commands (#16338) 2024-06-06 14:16:45 +00:00
config_env_ls_test.go Propagte cobra command context correctly (#15312) 2024-01-30 15:50:39 +00:00
config_env_rm.go Fix non-interactive flag for 'new' and 'config env' commands (#16338) 2024-06-06 14:16:45 +00:00
config_env_rm_test.go Propagte cobra command context correctly (#15312) 2024-01-30 15:50:39 +00:00
config_env_test.go [chore] Update esc to v0.9.1 (#16322) 2024-06-05 06:22:01 +00:00
config_test.go Lift context parameter for ApplyProjectConfig (#16012) 2024-04-22 06:37:34 +00:00
console.go Propagte cobra command context correctly (#15312) 2024-01-30 15:50:39 +00:00
convert-trace.go `convert-trace` handles root spans with no TimespanEvent (#15508) 2024-02-26 23:32:14 +00:00
convert.go Refactor: move plugin kind to apitype (#15946) 2024-04-25 17:30:30 +00:00
convert_test.go chore: fix function names in comment (#16044) 2024-04-24 06:23:35 +00:00
crypto.go Fix TestDestroySetsEncryptionsalt test and resulting bug (#15432) 2024-02-15 09:33:27 +00:00
destroy.go Lift context parameter for ApplyProjectConfig (#16012) 2024-04-22 06:37:34 +00:00
doc.go Document Go packages (#6009) 2021-01-11 11:07:59 -07:00
env.go [cli] Include config from ESC in `pulumi config` (#14560) 2023-11-21 10:44:45 +00:00
errors.go Clean up uses of .Error() (#14965) 2023-12-20 15:54:06 +00:00
gen_completion.go chore: fix function names in comment (#16044) 2024-04-24 06:23:35 +00:00
gen_markdown.go Consecutive markdown heading levels CLI docs (#13822) 2023-09-28 17:36:24 +00:00
import.go [cli/import] Add flag --json which would serialize the import diffs, operations, and overall output as JSON (#16342) 2024-06-07 14:20:09 +00:00
import_test.go Add a missing test for the import system (#15664) 2024-03-13 14:13:36 +00:00
install.go Add --no-plugins and --no-dependencies to `pulumi install` (#15910) 2024-04-11 14:59:54 +00:00
login.go Rename filestate to DIY (#15314) 2024-01-30 15:53:10 +00:00
logout.go Remove Logout logic from Backend interface (#13951) 2023-09-18 17:21:32 +00:00
logs.go Lift context parameter for ApplyProjectConfig (#16012) 2024-04-22 06:37:34 +00:00
logs_test.go Use `assert.NoError` rather than `assert.Nil` (#14233) 2023-10-13 09:46:07 +00:00
main.go Use slice.Prealloc instead of make([]T, 0, ...) 2023-06-29 11:27:50 +01:00
new.go Fix non-interactive flag for 'new' and 'config env' commands (#16338) 2024-06-06 14:16:45 +00:00
new_acceptance_test.go Rename filestate to DIY (#15314) 2024-01-30 15:53:10 +00:00
new_ai.go upgrade to latest version of golangci-lint (#15977) 2024-04-19 06:20:33 +00:00
new_ai_test.go Fix AI prompt repetition on Windows (#15010) 2024-01-03 23:03:11 +00:00
new_test.go Populate pulumi:template tag also for interactively selected templates (#16308) 2024-06-03 19:38:03 +00:00
org.go Update set-default command description (#16233) 2024-05-23 19:38:54 +00:00
org_search.go Propagte cobra command context correctly (#15312) 2024-01-30 15:50:39 +00:00
org_search_ai.go Propagte cobra command context correctly (#15312) 2024-01-30 15:50:39 +00:00
org_search_ai_test.go Replace some more uses of assert.Contains(err.Error()) with assert.ErrorContains (#14863) 2023-12-15 17:45:32 +00:00
org_search_test.go Enable perfsprint linter (#14813) 2023-12-12 12:19:42 +00:00
package.go Normalize plugin.Provider methods to (Context, Request) -> (Response, error) (#16302) 2024-06-07 19:47:49 +00:00
package_extract_mapping.go Normalize plugin.Provider methods to (Context, Request) -> (Response, error) (#16302) 2024-06-07 19:47:49 +00:00
package_extract_schema.go Support Parameterize in get-schema, gen-sdk (#16210) 2024-05-20 07:58:00 +00:00
package_gen_sdk.go Support Parameterize in get-schema, gen-sdk (#16210) 2024-05-20 07:58:00 +00:00
package_pack_sdk.go Add SupportPack to schemas to write out in the new style (#15713) 2024-03-22 09:25:46 +00:00
package_publish.go Propagte cobra command context correctly (#15312) 2024-01-30 15:50:39 +00:00
plugin.go Add `plugin run` command (#12613) 2024-02-05 08:35:48 +00:00
plugin_install.go Refactor: move plugin kind to apitype (#15946) 2024-04-25 17:30:30 +00:00
plugin_install_test.go Refactor: move plugin kind to apitype (#15946) 2024-04-25 17:30:30 +00:00
plugin_ls.go [cli] Colorize table headers (#14557) 2023-11-14 22:52:57 +00:00
plugin_rm.go Refactor: move plugin kind to apitype (#15946) 2024-04-25 17:30:30 +00:00
plugin_run.go Fix plugin run to pickup binary path correctly (#16249) 2024-05-22 14:39:13 +00:00
policy.go [breaking] Changing the version of go.mod in sdk / pkg to be v3 2021-04-14 19:32:18 +01:00
policy_disable.go Propagte cobra command context correctly (#15312) 2024-01-30 15:50:39 +00:00
policy_enable.go Propagte cobra command context correctly (#15312) 2024-01-30 15:50:39 +00:00
policy_group_ls.go Propagte cobra command context correctly (#15312) 2024-01-30 15:50:39 +00:00
policy_ls.go Propagte cobra command context correctly (#15312) 2024-01-30 15:50:39 +00:00
policy_new.go Propagte cobra command context correctly (#15312) 2024-01-30 15:50:39 +00:00
policy_new_acceptance_test.go Use context.Background in tests (#14029) 2023-09-25 12:25:26 +00:00
policy_new_test.go Use context.Background in tests (#14029) 2023-09-25 12:25:26 +00:00
policy_publish.go Propagte cobra command context correctly (#15312) 2024-01-30 15:50:39 +00:00
policy_publish_test.go policy publish: default to default-org if possible (#14090) 2023-10-05 16:51:06 +00:00
policy_rm.go Propagte cobra command context correctly (#15312) 2024-01-30 15:50:39 +00:00
policy_validate.go Propagte cobra command context correctly (#15312) 2024-01-30 15:50:39 +00:00
preview.go add support for --import-file when using the Automation API (#16071) 2024-04-30 11:31:43 +00:00
preview_test.go Fix hang in --preview-file (#15203) 2024-01-25 18:03:38 +00:00
pulumi.go Support always qualifying stack names (#11081) (#15857) 2024-04-04 10:11:46 +00:00
pulumi_test.go correct version check when we have a dev version installed (#14954) 2023-12-22 16:40:12 +00:00
query.go Propagte cobra command context correctly (#15312) 2024-01-30 15:50:39 +00:00
refresh.go Lift context parameter for ApplyProjectConfig (#16012) 2024-04-22 06:37:34 +00:00
replay_events.go Add `--suppress-progresss` flag to CLI (#14690) 2024-02-05 11:48:10 +00:00
schema.go [codegen/schema] Add a schema checker (#7865) 2021-08-30 19:29:24 -07:00
schema_check.go all: Drop ioutil 2023-01-06 16:35:14 -08:00
stack.go Propagte cobra command context correctly (#15312) 2024-01-30 15:50:39 +00:00
stack_change_secrets_provider.go Lift context parameter to SerializeDeployment/Resource/Operations/Properties (#15929) 2024-04-15 07:45:46 +00:00
stack_change_secrets_provider_test.go Lift context parameter to SerializeDeployment/Resource/Operations/Properties (#15929) 2024-04-15 07:45:46 +00:00
stack_export.go Lift context parameter to SerializeDeployment/Resource/Operations/Properties (#15929) 2024-04-15 07:45:46 +00:00
stack_graph.go Propagte cobra command context correctly (#15312) 2024-01-30 15:50:39 +00:00
stack_graph_test.go Adds a flag to graph command to insert fragment (#14858) 2024-01-08 22:03:08 +00:00
stack_history.go Revert "The `--expect-no-changes` flag checks for output diffs" (#16131) 2024-05-06 17:34:24 +00:00
stack_import.go Lift context parameter to SerializeDeployment/Resource/Operations/Properties (#15929) 2024-04-15 07:45:46 +00:00
stack_init.go Propagte cobra command context correctly (#15312) 2024-01-30 15:50:39 +00:00
stack_init_test.go service to cloud 2023-04-08 09:49:37 -07:00
stack_ls.go Propagte cobra command context correctly (#15312) 2024-01-30 15:50:39 +00:00
stack_ls_test.go [test] fix `TestCreatingProjectWithEmptyConfig` flakiness (#14777) 2023-12-08 23:00:49 +00:00
stack_output.go Lift context parameter to SerializeDeployment/Resource/Operations/Properties (#15929) 2024-04-15 07:45:46 +00:00
stack_output_fuzz_test.go cli/stack-ouput/test: Fix Powershell test failures 2023-01-30 07:58:47 -08:00
stack_output_test.go fix(cli/stack output): Don't escape HTML characters 2023-06-23 09:11:20 -07:00
stack_rename.go Propagte cobra command context correctly (#15312) 2024-01-30 15:50:39 +00:00
stack_rm.go Propagte cobra command context correctly (#15312) 2024-01-30 15:50:39 +00:00
stack_select.go Propagte cobra command context correctly (#15312) 2024-01-30 15:50:39 +00:00
stack_tag.go Propagte cobra command context correctly (#15312) 2024-01-30 15:50:39 +00:00
stack_test.go fix(cli/stack output): Don't escape HTML characters 2023-06-23 09:11:20 -07:00
stack_unselect.go include error in formatted message and explicitly check for an empty stack 2022-03-14 11:32:33 +01:00
state.go Lift context parameter to SerializeDeployment/Resource/Operations/Properties (#15929) 2024-04-15 07:45:46 +00:00
state_delete.go State: fix panic when deleting non-unique Provider (#15322) 2024-02-05 16:21:38 +00:00
state_edit.go upgrade to latest version of golangci-lint (#15977) 2024-04-19 06:20:33 +00:00
state_edit_encoder.go Lift context parameter to SerializeDeployment/Resource/Operations/Properties (#15929) 2024-04-15 07:45:46 +00:00
state_edit_test.go Fix context in state edit command (#15354) 2024-02-07 09:01:56 +00:00
state_rename.go Fix state renames involving `DeletedWith` (#16260) 2024-05-24 15:09:33 +00:00
state_rename_test.go Allow anything in resource names (#14107) 2023-11-20 08:59:00 +00:00
state_unprotect.go Propagte cobra command context correctly (#15312) 2024-01-30 15:50:39 +00:00
state_upgrade.go Add --yes to state upgrade (#15648) 2024-03-12 19:57:41 +00:00
state_upgrade_test.go Add --yes to state upgrade (#15648) 2024-03-12 19:57:41 +00:00
terminal.go crypto/ssh/terminal is deprecated 2023-01-12 09:07:34 -08:00
terminal_test.go Fix negative page size panic (#10475) 2022-08-23 16:45:47 -04:00
up.go Implement up --continue-on-error (#15740) 2024-04-22 11:12:45 +00:00
up_test.go all: Reformat with gofumpt 2023-03-03 09:00:24 -08:00
util.go Implement preview-only refresh (#15330) 2024-02-01 20:30:40 +00:00
util_remote.go Use new API for deployments (#15684) 2024-04-16 23:23:56 +00:00
util_remote_test.go [cli] Experimental support for remote operations 2022-10-27 16:15:59 -07:00
util_test.go chore: fix function names in comment (#16044) 2024-04-24 06:23:35 +00:00
version.go [breaking] Changing the version of go.mod in sdk / pkg to be v3 2021-04-14 19:32:18 +01:00
view-trace.go Reimport appdash from our mirror (#14701) 2023-11-30 14:21:35 +00:00
watch.go Lift context parameter for ApplyProjectConfig (#16012) 2024-04-22 06:37:34 +00:00
whoami.go Propagte cobra command context correctly (#15312) 2024-01-30 15:50:39 +00:00
whoami_test.go Fix panic in whoami (#14108) 2023-10-06 16:56:36 +00:00