<!---
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#13687
A bug in @grpc/grpc-js v1.9.7 causes Automation API to hang. Pinning to
v1.9.6 resolves this hang.
See the added test case.
## 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. -->
This change removes the SxS check in the Node.js Automation API since
it's blocking a customer scenario and isn't needed anymore now that
#5449 has been addressed with #10568.
The check was originally added in #7349 to provide a helpful error
message when multiple versions of `@pulumi/pulumi` were used with inline
programs, which could cause clashes with global state. Since then, we've
changed how state is stored to allow parallel execution of multiple
inline programs with #10568. However, the SxS checks were not removed as
part of that change.
A customer recently hit the error associated with the SxS check. They
are creating a Next.js program that runs Pulumi operations as inline
programs. Next.js ends up loading modules multiple times in a way that
confuses the SxS checker, causing the error to be thrown, even though it
wouldn't have been a problem.
Fixes#14128
If you supply a workDir to a NodeJS AutoAPI LocalWorkspace, it
does not validate its correctness, and proceeds to use it when
trying to spawn commands. That leads to misleading and confusing
"Command failed with ENOENT: pulumi version" error messages,
making it look like the issue is a missing `pulumi` binary on
your PATH. This changes to eagerly check and issue a more
friendly error message. Fixes#13274.
This commit applies the Rome autoformatter to the Node SDK.
These changes are automatically produced. To reproduce these
changes, run `make format` from inside sdk/nodejs.
12374: whoami: Add --json flag, expose everything in Auto API r=abhinav a=mrod-io
<!---
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
* Adds `--json` flag to `pulumi whoami` (CLI)
* Adds `url` and `organizations` to WhoAmIResult in NodeJS, Go and Python (automation API)
I sanity tested the auto api in the 3 runtimes and the cli output looks like:
```bash
$ pulumi whoami -j
{
"user": "me",
"organizations": [
"me",
"company"
],
"url": "https://app.pulumi.com/me"
}
```
<!--- 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/10356
## Checklist
<!--- 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 Service,
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 Service API version
<!-- `@Pulumi` employees: If yes, you must submit corresponding changes in the service repo. -->
12397: Changelog and go.mod updates for v3.57.1 r=abhinav a=pulumi-bot
bors merge
Co-authored-by: Matthew Rodrigues <matthew.rodrigues@starburstdata.com>
Co-authored-by: Abhinav Gupta <abhinav@pulumi.com>
Co-authored-by: github-actions <github-actions@github.com>
11943: Test and fix for nodejs automation api r=Frassle a=Frassle
nodejs automation api was setting the envvar PULUMI_CONFIG for every pulumi command it called, this tripped up the dotnet sdk which only expects PULUMI_CONFIG to be set to a valid JSON string (not the empty string).
Looks like this was just a slightly confused bit of code to try and deal with parallel programs, I've moved it out of the workspace part of automation api and fixed up the inline server to deal with parallel programs correctly instead.
Fixes#11945
Co-authored-by: Fraser Waters <fraser@pulumi.com>
The `asyncTest` and `assertAsyncThrows` helpers were necessary when originally written, but are no longer needed as Mocha has built-in support for testing async functions that return promises, and Node's `assert.rejects` can be used to assert whether a promise has been rejected.
10955: Add new install plugin from server function r=jaxxstorm a=jaxxstorm
Add the ability to install plugins from a server.
Co-authored-by: Lee Briggs <lee@leebriggs.co.uk>
Co-authored-by: Fraser Waters <fraser@pulumi.com>
* Fix auto api config set dash-prefixed -value
* Python changes
* Add a Python test
* TS LINT
* Go fix
* Go tests
* Go lint
* Fix test code
* .NET fix and test
* CHANGELOG
* .NET & python SDKs parity for bad pulumi versions
They handle invalid Pulumi CLI version gracefully.
* Make python version property lazy
* Clarify .NET logic
* Add python test for validate_pulumi_version
* Add tests for invalid versions
* Fix python test
* Fix typo
* Fix tests
* Have _validate_pulumi_version handle parsing
* Modify python and .NET to parseAndValidate
* Modify typescript and go to parseAndValidate
* fix name
Temporarily disable the new config secret warning to avoid unactionable warnings from provider `config` modules. We'll re-enable the warning when we've addressed that issue.