# Description
Ensure we always wait for the log promise and run cleanup for `refresh`
and `destroy` to ensure log files get removed and any open pipes get
closed.
Fixes https://github.com/pulumi/pulumi/issues/14879
## 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.
-->
- [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. -->
<!---
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
When writing out the stack settings, some keys get renamed
(`secretsProvider` -> `secretsprovider`). We were mutating the stack
settings object in place instead of working on a copy.
Fixes https://github.com/pulumi/pulumi/issues/14003
## 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.
-->
- [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. -->
<!---
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. -->
Add nodejs automation API support for adding and removing environments
for stack configuration.
Fixes https://github.com/pulumi/pulumi/issues/14795
## 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. -->
Updates the node SDK to have types for the generated protobufs and grpc
services. No more `any`.
I don't think these types show up on any user facing parts of the SDK.
The two places they could show up are the mock monitor (but I've left
that as any for now) and the provider interfaces (which I've also left
alone for now).
But this fixes up most of our sdk internal code to have types, which
flagged a couple of oddities like assuming `Input<string>` was `string`
in the alias code, and a whole load of missing undefined checks.
# Description
Adding the `refresh` option to `up` in the NodeJS automation API
Mirror of this PR adding support for `refresh` in `preview`
(https://github.com/pulumi/pulumi/issues/12740)
File backends currently do not support indicating whether an operation
is currently in progress or not. In the `stack ls --json` output we
always end up with a "updateInProgress = false" field, even when an
update is in progress. This is misleading.
Disable showing this erroneous and misleading output.
Fixes#10677
Based on Luke's comments in that issue, I believe we should merge this
as bug fix for the issue, and then open a separate feature request
tracking the implementation of tracking whether an update is in progress
in the file backend.
## 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.
Empty interfaces have no effect, even when they are subtyping
other interfaces. An empty interface is always equivalent to its supertype.
They can be safely replaced with type aliases, which better express
the semantic equivalence between the two types.
This commit removes instances of prefix-!! where the value
would already be coerced into a boolean. It also removes
instances where the "optional chaining" operator (?.)
would suffice.
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>
When a git username is specified for remote workspaces, we were using the wrong CLI flag. It should be `--remote-git-auth-username` not `--remote-git-username`. This change fixes this and adds tests to confirm we're using the right flag names for all the various remote workspace options.
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>
11659: Add stack tag support for nodejs automation api sdk r=RobbieMcKinstry 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 stack tag management support to the **nodejs** automation api sdk (https://github.com/pulumi/pulumi/issues/5681).
Before I move on to other language/runtime SDKs, I'd like to get a quick sanity check on this nodejs implementation, since they will follow a similar pattern 👍 . There is no changelog for now; this won't be merged as-is. Thank you! 🙏😄
<!--- 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/5681
## 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.
-->
- ~~[ ] 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. -->
Co-authored-by: Matthew Rodrigues <matthew.rodrigues@starburstdata.com>
Co-authored-by: Robbie McKinstry <robbie@pulumi.com>
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>
10622: Enable ESModule interoperability r=RobbieMcKinstry a=RobbieMcKinstry
<!---
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 PR enables ESModule interop for the NodeJS SDK. By enabling interop, we should in theory remove subtle bugs from Pulumi programs that assume our libraries are interopable. In practice, only a few modules weren't already interoperable. Nevertheless, enabling this compiler flag will require future code to be compatible with ESModules, potentially eliminating future bugs.
<!--- 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/10621
This PR is required for bundling the NodeJS runtime (https://github.com/pulumi/pulumi/issues/10210).
## Checklist
<!--- 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 updated the [CHANGELOG-PENDING](https://github.com/pulumi/pulumi/blob/master/CHANGELOG_PENDING.md) file with 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. -->
Co-authored-by: Robbie McKinstry <robbie@pulumi.com>
10806: [sdk/nodejs] Mark internal APIs `@internal` to filter from SDK docs r=justinvp a=justinvp
These exported APIs aren't intended for public use. Marking them as ``@internal`` makes TypeScript remove them from the `.d.ts` files and removes them from our SDK docs.
10810: Update automation api secrets provider docstring link r=Frassle 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.
-->
Updates an outdated docstring link I stumbled across while using Pulumi Automation API.
There is no existing issue.
This is a non-code change and I believe it could be labeled `impact/no-changelog-required`; as such I have not made Changelog updates as per the [updated guidelines](385d08218a). If I am mistaken please let me know!
<!--- Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. -->
## Checklist
<!--- 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 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. -->
Co-authored-by: Justin Van Patten <jvp@justinvp.com>
Co-authored-by: Matthew Rodrigues <matthew.rodrigues@starburstdata.com>
These exported APIs aren't intended for public use. Marking them as `@internal` makes TypeScript remove them from the `.d.ts` files and removes them from our Node.js SDK docs.
* Avoid importing typescript in node SDK where possible
* Lazy-load runtime/closure in dynamic/index.ts
* More targeted runtime import in config.ts
* More precise imports in run-policy-pack/run.ts
* More precise imports for dynamic-provider/index.ts
* More precise imports for automation/server.ts
* Share typescript compiler option loading func in run.ts and run-policy-pack/run.ts
* Lazy-load ts-node that depends on TypeScript
* Break module import cycle
* Fix node lint