Commit Graph

9 Commits

Author SHA1 Message Date
Thomas Gummerer de26122fdf
name invoke transforms RegisterInvokeTransform in the Go SDK ()
This is more consistent with `RegisterResourceTransform`. The
`RegisterStackInvokeTransform` version has not been released yet, so we
still have the option of making this consistent.
2024-07-18 07:37:16 +00:00
Thomas Gummerer 2034f7e2ae
add Go support for invoke transforms ()
Add support to the Go SDK for invoke transforms. This only adds support
for setting transforms globally, not yet via a resource option, which
resource transforms allow.

---------

Co-authored-by: Will Jones <will@sacharissa.co.uk>
2024-07-15 08:28:11 +00:00
Justin Van Patten c2cb41f49b
Flip stack transforms to non-experimental ()
Registering stack transforms is now non-experimental. This change
updates the function signatures in the Go, Node.js, and Python SDKs
along with associated types and comments.

Follow-up to 
2024-05-30 18:01:33 +00:00
Fraser Waters a514601236
Flip transforms to non-experimental ()
Co-authored-by: Thomas Gummerer <t.gummerer@gmail.com>
2024-04-29 10:54:41 +00:00
Fraser Waters b04280ccdd
Test setting and changing providers on component resources via 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. -->

Fixes https://github.com/pulumi/pulumi/issues/15984.

The bug was actually caused by a longstanding mistake in
`_collapse_providers` that didn't iterate the providers correctly if it
was passed as a `dict`. But worth having this test in full to sanity
check the other languages as well.

## 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. -->
2024-04-23 15:20:43 +00:00
Fraser Waters 859baddac7
Add tests for providers with transforms ()
Adding some more transform tests. Trying to repro
https://github.com/pulumi/pulumi/issues/15984 although it oddly seems to
be component resource specific. These tests are still worth having and
found some other issues.
2024-04-22 12:37:23 +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
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
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