Commit Graph

667 Commits

Author SHA1 Message Date
Pulumi Bot 28f098a660
Changelog and go.mod updates for v3.112.0 ()
Co-authored-by: github-actions <github-actions@github.com>
2024-03-28 14:14:56 +00:00
Fraser Waters 19f67eb163
Add 'typechecker' option to python runtime ()
<!--- 
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/15724.

This adds a new runtime option to the python language host `typeChecker`
which can be set to either "mypy" or "pyright". If it's set the language
host will run the mypy/pyright module before running the program.

## 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.
-->
- [ ] 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-03-28 10:41:22 +00:00
Zaid Ajaj 00b685606d
[docs] Implement Java constructor syntax examples ()
# Description

This PR implements Java constructor syntax examples, rendering them into
the docs. It upgrades pulumi-java to 0.10.0 which includes features from
https://github.com/pulumi/pulumi-java/pull/1338

It also updates contructor syntax generator to emit an unbound variable
for resource-typed properties. We use the name of the resource as the
name of the variable:
```typescript
const example = new Resource("name", { pet: randomPet })
````
where `pet` is a property that is typed as `random.RandomPet` so it gets
assigned the (unbound) variable called `randomPet`

Previously we would skip emitting any code for resource-typed
properties. I think this gives better docs even though it doesn't
compile

## Checklist

- [ ] 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-03-28 00:03:58 +00:00
Ian Wahbe 41e38c9a27
Fix coming soon misrender ()
<!--- 
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

Fixes a render bug when `Coming soon!` is written.

Fixes https://github.com/pulumi/registry/issues/4202

## 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-03-26 17:24:37 +00:00
Fraser Waters 50eacf3c2f
Add a test and fix that we don't wait for tasks, just outputs ()
<!--- 
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/6762.

## 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-03-26 14:07:37 +00:00
Justin Van Patten afd2561fd2
Fix: Don't delete stack outputs on failed deployments ()
If an update fails, update any stack outputs that were updated, but
otherwise leave existing stack outputs as-is. In other words, don't
delete stack outputs if the stack didn't successfully run to completion.

Implementation note: when we receive a RegisterResourceOutputsEvent for
the stack resource, we defer processing it until the end of the
deployment, to know whether the deployment ran to completion without
errors.

Fixes 

---------

Co-authored-by: Thomas Gummerer <t.gummerer@gmail.com>
2024-03-25 22:37:46 +00:00
Fraser Waters a08b41832a
Make TestConstructComponentConfigureProviderPython less flaky ()
Update TLS library to a more recent version that doesn't have the old
"install the plugin as part of setup.py" logic.

Then enable the engine to do the plugin download for this test by
disabling `PULUMI_DISABLE_AUTOMATIC_PLUGIN_ACQUISITION`. Should make the
test less flaky as the engine is managing the download and can retry,
but at least makes the error much more clear if it does fail.
2024-03-22 15:32:59 +00:00
Justin Van Patten 14babed82b
Bump google.golang.org/protobuf, golang.org/x/crypto, and github.com/moby/moby ()
Bumps google.golang.org/protobuf,
[golang.org/x/crypto](https://github.com/golang/crypto) and
[github.com/moby/moby](https://github.com/moby/moby).

Replaces  -- running the acceptance tests on that PR is having
problems

Fixes 

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-17 22:20:32 +00:00
Pulumi Bot c0257cc107
Changelog and go.mod updates for v3.111.1 ()
Co-authored-by: github-actions <github-actions@github.com>
2024-03-16 10:30:59 +00:00
Pulumi Bot 507a8b26bd
Changelog and go.mod updates for v3.111.0 ()
Co-authored-by: github-actions <github-actions@github.com>
2024-03-15 11:36:24 +00:00
Fraser Waters d78a009bfc
Add context.Context to transform functions ()
<!--- 
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. -->

Transform functions are async grpc calls. Make that clear by having a
`context.Context` on the function parameters. This also allows users to
gracefully handle cancellation if wanted, and will probably be useful
for tracing/logging.


## 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
  - [ ] 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-03-15 08:15:37 +00:00
Pulumi Bot 1f39f8aa57
Changelog and go.mod updates for v3.110.0 ()
Co-authored-by: github-actions <github-actions@github.com>
2024-03-14 15:20:55 +00:00
dependabot[bot] 400cb88e77
Bump the go_modules group across 24 directories with 1 update ()
Bumps the go_modules group with 1 update in the
/tests/integration/backend/diy/project directory:
google.golang.org/protobuf.
Bumps the go_modules group with 1 update in the
/tests/integration/construct_component_methods_provider/go directory:
google.golang.org/protobuf.
Bumps the go_modules group with 1 update in the
/tests/integration/construct_component_unknown/go directory:
google.golang.org/protobuf.
Bumps the go_modules group with 1 update in the
/tests/integration/deleted_with/go directory:
google.golang.org/protobuf.
Bumps the go_modules group with 1 update in the
/tests/integration/empty/go directory: google.golang.org/protobuf.
Bumps the go_modules group with 1 update in the
/tests/integration/empty/gorun directory: google.golang.org/protobuf.
Bumps the go_modules group with 1 update in the
/tests/integration/empty/gorun_main/gorun_main_src directory:
google.golang.org/protobuf.
Bumps the go_modules group with 1 update in the
/tests/integration/gather_plugin/go directory:
google.golang.org/protobuf.
Bumps the go_modules group with 1 update in the
/tests/integration/get_resource/go directory:
google.golang.org/protobuf.
Bumps the go_modules group with 1 update in the
/tests/integration/go/component-configure-panic/go directory:
google.golang.org/protobuf.
Bumps the go_modules group with 1 update in the
/tests/integration/go/go-build-target directory:
google.golang.org/protobuf.
Bumps the go_modules group with 1 update in the
/tests/integration/go/go-exit-5 directory: google.golang.org/protobuf.
Bumps the go_modules group with 1 update in the
/tests/integration/go/go-exit-error directory:
google.golang.org/protobuf.
Bumps the go_modules group with 1 update in the
/tests/integration/go/program-panic directory:
google.golang.org/protobuf.
Bumps the go_modules group with 1 update in the
/tests/integration/large_resource/go directory:
google.golang.org/protobuf.
Bumps the go_modules group with 1 update in the
/tests/integration/printf/go directory: google.golang.org/protobuf.
Bumps the go_modules group with 1 update in the
/tests/integration/project_main/go/a/path/to/main directory:
google.golang.org/protobuf.
Bumps the go_modules group with 1 update in the
/tests/integration/refresh/go directory: google.golang.org/protobuf.
Bumps the go_modules group with 1 update in the
/tests/integration/resource_refs_get_resource/go directory:
google.golang.org/protobuf.
Bumps the go_modules group with 1 update in the
/tests/integration/rotate_passphrase directory:
google.golang.org/protobuf.
Bumps the go_modules group with 1 update in the
/tests/integration/stack_reference/go directory:
google.golang.org/protobuf.
Bumps the go_modules group with 1 update in the
/tests/integration/state_rename_parent directory:
google.golang.org/protobuf.
Bumps the go_modules group with 1 update in the
/tests/integration/transformations/go/simple directory:
google.golang.org/protobuf.
Bumps the go_modules group with 1 update in the
/tests/integration/transforms/go/simple directory:
google.golang.org/protobuf.

Updates `google.golang.org/protobuf` from 1.31.0 to 1.33.0

Updates `google.golang.org/protobuf` from 1.31.0 to 1.33.0

Updates `google.golang.org/protobuf` from 1.31.0 to 1.33.0

Updates `google.golang.org/protobuf` from 1.31.0 to 1.33.0

Updates `google.golang.org/protobuf` from 1.31.0 to 1.33.0

Updates `google.golang.org/protobuf` from 1.31.0 to 1.33.0

Updates `google.golang.org/protobuf` from 1.31.0 to 1.33.0

Updates `google.golang.org/protobuf` from 1.31.0 to 1.33.0

Updates `google.golang.org/protobuf` from 1.31.0 to 1.33.0

Updates `google.golang.org/protobuf` from 1.31.0 to 1.33.0

Updates `google.golang.org/protobuf` from 1.31.0 to 1.33.0

Updates `google.golang.org/protobuf` from 1.31.0 to 1.33.0

Updates `google.golang.org/protobuf` from 1.31.0 to 1.33.0

Updates `google.golang.org/protobuf` from 1.31.0 to 1.33.0

Updates `google.golang.org/protobuf` from 1.31.0 to 1.33.0

Updates `google.golang.org/protobuf` from 1.31.0 to 1.33.0

Updates `google.golang.org/protobuf` from 1.31.0 to 1.33.0

Updates `google.golang.org/protobuf` from 1.31.0 to 1.33.0

Updates `google.golang.org/protobuf` from 1.31.0 to 1.33.0

Updates `google.golang.org/protobuf` from 1.31.0 to 1.33.0

Updates `google.golang.org/protobuf` from 1.31.0 to 1.33.0

Updates `google.golang.org/protobuf` from 1.31.0 to 1.33.0

Updates `google.golang.org/protobuf` from 1.31.0 to 1.33.0

Updates `google.golang.org/protobuf` from 1.31.0 to 1.33.0


Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore <dependency name> major version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's major version (unless you unignore this specific
dependency's major version or upgrade to it yourself)
- `@dependabot ignore <dependency name> minor version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's minor version (unless you unignore this specific
dependency's minor version or upgrade to it yourself)
- `@dependabot ignore <dependency name>` will close this group update PR
and stop Dependabot creating any more for the specific dependency
(unless you unignore this specific dependency or upgrade to it yourself)
- `@dependabot unignore <dependency name>` will remove all of the ignore
conditions of the specified dependency
- `@dependabot unignore <dependency name> <ignore condition>` will
remove the ignore condition of the specified dependency and ignore
conditions
You can disable automated security fix PRs for this repo from the
[Security Alerts page](https://github.com/pulumi/pulumi/network/alerts).

</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-14 07:52:34 +00:00
Justin Van Patten 61380f23d3
[sdk/python] Add support for remote transforms ()
This PR adds support for remote transforms to the Python SDK.

Part of 

---------

Co-authored-by: Fraser Waters <fraser@pulumi.com>
Co-authored-by: Thomas Gummerer <t.gummerer@gmail.com>
2024-03-12 13:57:21 +00:00
Fraser Waters 29307791be
Remove type casts in transform test ()
Remove the type casts before calling `assert.Equal` in the transform
test. Should give a better error message if we hit
https://github.com/pulumi/pulumi/issues/15639 again.
2024-03-12 13:40:21 +00:00
Julien P 5a19d754d7
Fix codepaths computation when working dir is nested relative to package.json ()
# Description

When using `tsc` to precompile typescript in a monorepo, we need to work
relative to the location of `package.json`, not where the pulumi program
lives (which is usually nested further down).

## 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. -->
- [ ] 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-03-08 16:16:47 +00:00
Pulumi Bot d7c4025734
Changelog and go.mod updates for v3.109.0 ()
Co-authored-by: github-actions <github-actions@github.com>
2024-03-07 22:24:05 +00:00
Fraser Waters a18399285f
NodeJS transforms ()
<!--- 
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. -->

This adds a new experimental feature to the NodeJS SDK to register
remote transform functions. These are currently all prefixed 'X' to show
they're experimental.

These transform functions will run even for resources created inside
MLCs.

## 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-03-07 08:52:34 +00:00
Julien P 9a357aff7c
Unskip tests skipped in , , ()
# Description

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

Fixes  
Ref 
Ref 

## 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. -->
- [ ] 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-03-05 09:12:53 +00:00
Thomas Gummerer 99dcdced9d
show all paths when we have multipe local policy packs with the same name ()
It is possible for multiple local policy packs to have the same name.
When there are policy violation, we currently only show one of the paths
for those policy packs (as we consider them the same policy pack because
it has the same name).

Display both of the paths in this case to avoid any confusion. Also sort
the names, so the test we have for this is deterministic.

I think in ideal world it would be better to just error out if there are
multiple policy packs with the same name, but given this behaviour
worked for a long time I wouldn't be surprised if that ends up breaking
some use case, so I'd be a bit worried about doing that now.

A possible alternative would be to not consider policy packs with the
same name as a single policy pack, but if we name it differently I could
imagine people getting confused with that. Happy to hear alternative
opinions on what the right behaviour here is since I'm not quite sure
myself.

Fixes 
2024-03-04 14:02:25 +00:00
Pulumi Bot 6d4049e639
Changelog and go.mod updates for v3.108.1 ()
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Justin Van Patten <jvp@justinvp.com>
2024-03-01 22:33:54 +00:00
Thomas Gummerer 697c8216ca
acquire plugin in python acceptance test ()
This test was disabled on MacOS due to what looks like a failure to
acquire a plugin. This probably worked accidentally (and is working
accidentally on other platforms) because presumably the plugin gets
acquired by another test and is thus available. We should however not
rely on that, end enable plugin acquisition where necessary. With that
we also fix the test on MacOS and can unskip it.

This addresses part of https://github.com/pulumi/pulumi/issues/15240.
Note that I don't think it fixes the flakyness, looking back through the
test logs I think I was conflating two separate things here.
2024-03-01 18:01:20 +00:00
Julien P 794b541d85
Move @types/glob to dev dependencies ()
# Description

In  we added glob and @types/glob to dependencies, but since glob
is not exposed in our public API, @types/glob should be a devDependency.

Fixes 

## 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. -->
- [ ] 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-03-01 12:05:27 +00:00
Justin Van Patten 91aa685304 chore: post-release go.mod and changelog updates for v3.108.0 2024-02-29 21:48:42 -08:00
Julien P 5ff35273d6
Fix merge failures ()
<!--- 
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/15528

See https://github.com/pulumi/pulumi/pull/15540 &
https://github.com/pulumi/pulumi/pull/15531

Re-creating this as a PR with `ci/test` label so we can get it merged.

## 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. -->
- [ ] 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. -->

---------

Co-authored-by: Justin Van Patten <jvp@justinvp.com>
Co-authored-by: Anton Tayanovskyy <anton@pulumi.com>
Co-authored-by: Thomas Gummerer <t.gummerer@gmail.com>
2024-02-29 21:06:24 +00:00
Fraser Waters ae161d6758
Go SDK transform support ()
<!--- 
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. -->


This adds a new experimental feature to the Go SDK to register remote
transform functions. These are currently all prefixed 'X' to show
they're experimental (they can't be in their own package because of
circular dependencies).

These transform functions will run even for resources created inside
MLCs.

## 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-27 13:00:45 +00:00
Julien P be0fe6b1a6
Replace deprecated read-package-tree with @npmcli/arborist ()
<!--- 
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.
-->

read-package-tree is deprecated. Additionally it has a dependency that
is flagged by security scanners.

<!--- 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/9129

Ref https://github.com/pulumi/pulumi/issues/12688

## 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. -->
- [ ] 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-26 18:40:28 +00:00
Julien P 87b01bf35a
Handle workspaces in computeCodePaths ()
# Description

When we compute the code paths for function serialisation, we are not
handling yarn/npm workspace setups where the node_modules might be in a
different directory.

Fixes 
Fixes https://github.com/pulumi/pulumi/issues/2661
Fixes https://github.com/pulumi/pulumi/issues/7168
Fixes https://github.com/pulumi/pulumi/issues/3013

## 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:41:37 +00:00
Pulumi Bot e654626abf
Changelog and go.mod updates for v3.107.0 ()
Co-authored-by: github-actions <github-actions@github.com>
2024-02-22 00:35:07 +00:00
Julien P 0d3d279bdc
Detect npm and yarn workspaces setups ()
# Description

Make `pulumi install` detect npm and yarn workspaces setups and
successfully install dependencies.

Fixes  

## 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`
2024-02-16 08:25:12 +00:00
Pulumi Bot def21b977e
Changelog and go.mod updates for v3.106.0 ()
Co-authored-by: github-actions <github-actions@github.com>
2024-02-16 04:14:52 +00:00
Justin Van Patten 0211ab4a9f
Prepare for v3.106.0 release ()
### Features

- [components] Component providers can return output values in their
response to the engine.

- [programgen/{dotnet,go,nodejs,python}] Emit missing trivia for
resources and local variables
  [](https://github.com/pulumi/pulumi/pull/15419)


### Bug Fixes

- [engine] Engine no longer assumes program dependencies are specified
as semantic versions.
  [](https://github.com/pulumi/pulumi/pull/15409)

- [components/go] Component providers now correctly return output values
to the engine.
  [](https://github.com/pulumi/pulumi/pull/15405)


### Miscellaneous

- [protobuf] Split CallRequest into ResourceCallRequest for the
ResourceMonitor service.
  [](https://github.com/pulumi/pulumi/pull/15404)

- [backend/diy] Add a warning that non-project mode will be deprecated
at some point.
  [](https://github.com/pulumi/pulumi/pull/15411)
2024-02-15 06:06:26 +00:00
Pulumi Bot 7d03ac7174
Changelog and go.mod updates for v3.105.0 ()
Co-authored-by: github-actions <github-actions@github.com>
2024-02-08 08:59:28 +00:00
Pulumi Bot 3f376fe182
Changelog and go.mod updates for v3.104.2 ()
Co-authored-by: github-actions <github-actions@github.com>
2024-02-01 12:34:33 +00:00
Fraser Waters 7bb2a3c2ac
Auto-fix encrypted keys in the wrong format due to gocloud.dev upgrade regression ()
When attempting another gocloud.dev upgrade, some users ran into a
regression related to the format change of encrypted keys between
gocloud versions, which part of the system was not accounting for. This
PR addresses the issue and includes a fix that automatically fixes
forward state that has an encrypted key in the wrong format, and
includes a regression test and test for the auto-fix behavior.

Fixes 

Co-authored-by: Thomas Gummerer <t.gummerer@gmail.com>
2024-02-01 09:39:41 +00:00
Pulumi Bot 93d5605c28
Changelog and go.mod updates for v3.104.1 ()
Co-authored-by: github-actions <github-actions@github.com>
2024-02-01 09:03:09 +00:00
Justin Van Patten d1904beb14
Revert gocloud.dev upgrade ()
Still regressions happening associated with upgrading gocloud.dev. This
reverts https://github.com/pulumi/pulumi/pull/15202.

Fixes 
2024-01-31 23:19:32 +00:00
Pulumi Bot e239dc4319
Changelog and go.mod updates for v3.104.0 ()
Co-authored-by: github-actions <github-actions@github.com>
2024-01-31 19:01:25 +00:00
Paul C. Roberts 5457a03549
Allows SKIP_CHECKPOINTS without EXPERIMENTAL ()
<!--- 
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

This relaxes the requirement on the `PULUMI_SKIP_CHECKPOINTS` env var to
also have `PULUMI_EXPERIMENTAL` set.

Because `PULUMI_EXPERIMENTAL` introduces other behavior, this decouples
the `PULUMI_SKIP_CHECKPOINTS` behavior from that.

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

## 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
  - [ ] 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. -->

---------

Co-authored-by: Paul Roberts <proberts@pulumi.com>
Co-authored-by: Fraser Waters <fraser@pulumi.com>
2024-01-30 18:31:49 +00:00
Fraser Waters afb287d2fb
Rename filestate to DIY ()
This goes through the codebase to try and be consistent about names for
the diy/filestate/local/selfmanaged backend. Every reference to this
backend should now use the terms "DIY". There are a couple of places
that still say "local DIY backend" this is referring to a DIY backend
using the local filesystem (i.e. `pulumi login --local`).
2024-01-30 15:53:10 +00:00
Thomas Gummerer fd4ed7f811
add tests for aws and gcp ()
Fixes https://github.com/pulumi/pulumi/issues/3760

## 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.
-->
- [ ] 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-01-30 11:05:38 +00:00
Fraser Waters 7ba0541e1c
Rename self-managed to diy-backend ()
<!--- 
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. -->

We're moving away from referring to filestate as "self managed"
backends, preferring to refer to this as "DIY" backends going forward.

## 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. -->
- [ ] 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-01-30 09:00:15 +00:00
Thomas Gummerer 927b7efef5
upgrade gocloud.dev take 2 ()
Another attempt at upgrading gocloud.dev to the latest version. We've
identified and added tests for the issues that came up in the last
attempt to do the upgrade in https://github.com/pulumi/pulumi/pull/15161
and https://github.com/pulumi/pulumi/pull/15187.

The problem with the SAS key appears to have been fixed in gocloud.dev
0.36.0 (The previous upgrade tried 0.28.0), and I've added additional
fixes for the azure key vault problem during pulumi refresh in this PR.

This needs https://github.com/pulumi/pulumi/pull/15161 to be merged
first, but I wanted to open a PR in the meantime.

Fixes 
Fixes https://github.com/pulumi/pulumi/issues/14647
Fixes https://github.com/pulumi/pulumi/issues/13161
Fixes  https://github.com/pulumi/pulumi/issues/14431
Fixes https://github.com/pulumi/pulumi/issues/14541

## Checklist

- [x] 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. -->
- [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-01-26 13:14:17 +00:00
Justin Van Patten d446736e59
Unskip tests ()
- Unskip Python tests that needed to be skipped until v3.103.0 of the
`pulumi` PyPi package was released with support for Python 3.12.
- Unskip Node.js test that needed to be skipped until v3.103.1 of the
`@pulumi/pulumi` NPM package was published with a fix for the semver
type issue.

Fixes 
2024-01-25 19:24:22 +00:00
Pulumi Bot 7ff579f95d
Changelog and go.mod updates for v3.103.1 ()
Co-authored-by: github-actions <github-actions@github.com>
2024-01-25 08:41:23 +00:00
Pulumi Bot db0bcc2d9f
Changelog and go.mod updates for v3.103.0 ()
Co-authored-by: github-actions <github-actions@github.com>
2024-01-25 05:53:43 +00:00
Justin Van Patten 7309681b5b
Support Python 3.12 ()
Python 3.12 requires `grpcio` 1.59.0 or higher. Unfortunately, there is
a regression in `grpcio` 1.58.0 through the latest version (currently
1.60.0) which causes any error returned from a Python gRPC server to be
written to stderr, including UNIMPLEMENTED errors. This primarily
affects Python dynamic providers, which don't have implementations for
`CheckConfig` and `DiffConfig`, resulting in a traceback error being
emitted to stderr when the engine calls these, which is visible to
users. This `grpcio` regression has been fixed upstream, but the fix has
not been released yet. We've been waiting for a 1.60.1 patch release.

This has not been great for our Python users who are using Python 3.12.
It's particularly bad for new Pulumi users who are using Python 3.12 and
are trying to get started with Pulumi. For these users, when trying to
install the `pulumi` PyPi package (i.e. via `pulumi new python`) the
installation fails with an error because it is pinned to depending on an
older version of `grpcio` which doesn't work on Python 3.12.

This commit works around the problem by providing default
implementations of `CheckConfig` and `DiffConfig` for python dynamic
providers and the component provider API, so that no error is emitted to
stderr when the engine calls these methods. The default implementations
for these are the same behavior that the engine would use if these
methods had returned UNIMPLEMENTED. I believe these are the only two
methods affected by this. Other methods like `Invoke`, `Call`,
`StreamInvoke`, `Construct`, `Attach`, `GetMapping`, and `GetMappings`,
continue to return UNIMPLEMENTED for dynamic providers, which I think is
OK; I don't believe these will be called by the engine under normal
circumstances.

Out of an abundance of caution, the `pulumi` package continues to depend
on the pinned version of `grpcio` when installing on versions of Python
less than 3.12. On Python 3.12 or greater, we now depend on `grpcio`
`~=1.60.0`. 1.60.0 doesn't have the fix for the regression, but the
workaround should allow things to work on Python 3.12 as before.

Once 1.60.1 is released, we can look into updating the `grpcio`
dependency to `~=1.60.1` for all versions of Python, and possibly revert
the workarounds, if we want.

Note:  added a test for dynamic providers to ensure nothing is
written to stderr. The test would fail if the workaround in this PR did
not work as intended:
https://github.com/pulumi/pulumi/pull/14474/files#diff-d92ccd283e08eadab2597825103e45cdaa96fea93324bc4d4d3b1d2b83c51b76

This PR depends on several other smaller PRs:
- https://github.com/pulumi/pulumi/pull/15220
- https://github.com/pulumi/pulumi/pull/15221
- https://github.com/pulumi/pulumi/pull/15222
- https://github.com/pulumi/pulumi/pull/15223
- https://github.com/pulumi/pulumi/pull/15224
- https://github.com/pulumi/pulumi/pull/15225
- https://github.com/pulumi/pulumi/pull/15226

Fixes 
2024-01-24 22:24:34 +00:00
Justin Van Patten fd7a9a88c0
[tests/integration] Remove `pulumi` from `requirements.txt` ()
In preparation for supporting Python 3.12...

These tests have a `requirements.txt` file that depends on the released
version of the `pulumi` package, but that package depends on the old
`grpcio` package that does not work Python 3.12.

Note that `ProgramTest` first installs `requirements.txt` in the virtual
environment it creates, then it installs any local dependencies
specified via `ProgramTestOptions.Dependencies`.

To make these tests work on Python 3.12, remove `pulumi` from
`requirements.txt`. After we publish a new `pulumi` package that
supports Python 3.12, we could consider reverting this change.

Aside: I considered changing `ProgramTest` to install
`ProgramTestOptions.Dependencies` deps _before_ `requirements.txt` deps.
That would avoid the need to change these `requirements.txt` files and
would work for the most part. If the version specified in
`requirements.txt` is satisfied by the already installed local version,
then pip doesn't install the version from `requirements.txt`. Where this
doesn't work is if `requirements.txt` specifies an older version range.
Then the local dependency would be uninstalled and the older version
from `requirements.txt` would be installed. Which isn't the behavior we
want. And there's very likely `requirements.txt` files in other repos in
this situation (there were even some in this PR that depend on v2.x!)
and I didn't want to change the behavior for those. We'd have to make it
an opt-in `ProgramTestOptions` option. It seemed simpler to just modify
these `requirements.txt` files.

Note: The change to
`tests/integration/python/stack_truncate/main_dir_specified/bar/requirements.txt`
depends on https://github.com/pulumi/pulumi/pull/15225. It's going to
fail without that change.
2024-01-24 14:16:40 +00:00
Justin Van Patten e9ac6f3c9c
[tests/integration] Fix `resource_args` for Python 3.12 ()
In preparation for supporting Python 3.12...

This test is generating a local example library using SDKgen and then
running a program that uses it.

When running on Python 3.12, without this fix, we get an error from the
generated example library's `_utilities.py` file:

```
ModuleNotFoundError: No module named 'pkg_resources'
```

This is because `_utilities.py` depends on `pkg_resources` from
`setuptools`, but our generated provider SDKs do not specify they have a
dependency on `setuptools`. The problem on Python 3.12 is because
virtual environments created with `python -m venv` no longer include
`setuptools` in the virtual environment
(https://github.com/python/cpython/issues/95299).

This generally isn't a problem with projects created using `pulumi new`
because we will explicitly install `setuptools` in the created virtual
environment. But it is a problem in this case, because `ProgramTest` is
creating the virtual environment, and it doesn't install setuptools in
it.

To workaround, for now, include `setuptools` in the test program's
`requirements.txt`.

When we fix Python SDKgen to no longer use `pkg_resources`, we can
remove `setuptools` from the test program's `requirements.txt`
(https://github.com/pulumi/pulumi/issues/12414).

Also remove the `pulumi` dependency in `requirements.txt` as it the
currently published package can't be installed on Python 3.12 due to the
dependency on `grpcio` that doesn't work on Python 3.12. The test
installs the locally built Python SDK, so it's not needed in
`requirements.txt` anyway.

Aside: This test really should be a runtime SDKgen test, which wouldn't
have this problem because it uses the CLI's code for creating the
virtual environment, which installs `setuptools`.

Also note: While looking at this test, I cleaned up a part of the test
that was replacing `${VERSION}` in the generated library's `setup.py`,
which is no longer necessary because that's not how the version is
replaced anymore. A default placeholder version is included that will
work as-is.
2024-01-24 12:47:34 +00:00
Thomas Gummerer 0eededec61
generate unique stack names for tests ()
Tests can run in parallel, e.g. on different PRs/same tests on different
platforms, and if a single test gets killed by the CI runner without
cleaning up all future tests will fail if the stack name is not unique.
Make sure the stack name is unique to avoid these failures.

I a CI failure that's `error: stack 'organization/project/testing'
already exists`. This PR should hopefully fix it.

## 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. -->
- [ ] 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-01-24 11:41:04 +00:00