pulumi/sdk/go/common
Fraser Waters e42cfbb349
Ensure project plugins are absolute paths (#15470)
<!--- 
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 https://github.com/pulumi/pulumi/issues/15467.

This tightens the restriction on paths passed to `NewProgramInfo`.
Previously it allowed relative paths like "./providers/my_provider".
That is now an error. This is correct behaviour. The fields of this
structure are passed via protobuf and the descriptions for them in the
proto spec are that they should always be absolute paths.

Where we build plugin paths we ensure that if they're relative we
resolve them to what they are relative to. That is generally _not_ the
current working directory so `filepath.Abs` doesn't do the right thing
here.


## Checklist

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

<!--- Please provide details if the checkbox below is to be left
unchecked. -->
- [x] I have added tests that prove my fix is effective or that my
feature works
<!--- 
User-facing changes require a CHANGELOG entry.
-->
- [x] 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-02-22 11:43:18 +00:00
..
apitype Enable finding Pulumi projects created from Templates (#15056) 2024-01-24 16:47:12 +00:00
channel Send all events to the engine event stream (#14607) 2023-11-20 21:55:59 +00:00
constant Send update metadata about update plans 2022-10-12 22:55:59 +01:00
diag turn on the golangci-lint exhaustive linter (#15028) 2024-01-17 16:50:41 +00:00
encoding all: Reformat with gofumpt 2023-03-03 09:00:24 -08:00
env Warn about non-project mode (#15411) 2024-02-13 08:25:24 +00:00
promise Use promise rather than `atomic.Value` to record step errors. (#14612) 2023-11-18 19:03:35 +00:00
resource Ensure project plugins are absolute paths (#15470) 2024-02-22 11:43:18 +00:00
slice Engine support for remote transforms (#15290) 2024-02-21 16:30:46 +00:00
testing Enable perfsprint linter (#14813) 2023-12-12 12:19:42 +00:00
tokens Fix stack name validation check (#15245) 2024-01-27 10:35:20 +00:00
tools all: Reformat with gofumpt 2023-03-03 09:00:24 -08:00
util Add `--suppress-progresss` flag to CLI (#14690) 2024-02-05 11:48:10 +00:00
version move pkg/version -> sdk/go/common/version 2020-03-18 15:25:25 -07:00
workspace Add `plugin run` command (#12613) 2024-02-05 08:35:48 +00:00