Commit Graph

240 Commits

Author SHA1 Message Date
Justin Van Patten 1ea602d7fe
Upgrade pulumi-java to v0.11.0 ()
Upgrade pulumi-java to the latest version:

### Bug Fixes

* Escape javadoc special characters in generated code.
* Fail fast rather than emitting `PANIC`s when attempting to generate
code for ill-formed programs.
2024-05-10 22:10:01 +00:00
Thomas Gummerer f35e98e944
Upgrade pulumi-yaml to 1.7.0 ()
title
2024-04-30 11:32:16 +00:00
Justin Van Patten 61c5b03dc7
Bump go modules ()
This is a replacement of https://github.com/pulumi/pulumi/pull/16043,
with an additional commit that includes the changes after running `make
tidy`.

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-25 14:30:00 +00:00
Thomas Gummerer fbfe3904a5
Upgrade gocloud.dev to 0.37 ()
Upgrade gocloud.dev to 0.37.  

Given what I found in
https://github.com/pulumi/pulumi/issues/15786#issuecomment-2051667094, I
don't believe this will help with this issue, but we should probably
upgrade this to the latest version anyway.

This should not be merged until
https://github.com/pulumi/pulumi/pull/15906 is also merged.
2024-04-15 07:47:29 +00:00
Thomas Gummerer 80f6ea9686
Add AWS access key to environment variables ()
This should make the AWS tests actually be run in CI instead of them
being skipped.

Fixes: https://github.com/pulumi/pulumi/issues/15908
2024-04-12 09:34:53 +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
dependabot[bot] 3308b1db17
Bump the go_modules group across 1 directory with 1 update ()
Bumps the go_modules group with 1 update in the /pkg directory:
[github.com/moby/moby](https://github.com/moby/moby).

Updates `github.com/moby/moby` from 24.0.9+incompatible to
25.0.4+incompatible
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/moby/moby/releases">github.com/moby/moby's
releases</a>.</em></p>
<blockquote>
<h2>v25.0.4</h2>
<p>For a full list of pull requests and changes in this release, refer
to the relevant GitHub milestones:</p>
<ul>
<li><a
href="https://github.com/docker/cli/issues?q=is%3Aclosed+milestone%3A25.0.4">docker/cli,
25.0.4 milestone</a></li>
<li><a
href="https://github.com/moby/moby/issues?q=is%3Aclosed+milestone%3A25.0.4">moby/moby,
25.0.4 milestone</a></li>
<li>Deprecated and removed features, see <a
href="https://github.com/docker/cli/blob/v25.0.4/docs/deprecated.md">Deprecated
Features</a>.</li>
<li>Changes to the Engine API, see <a
href="https://github.com/moby/moby/blob/v25.0.4/docs/api/version-history.md">API
version history</a>.</li>
</ul>
<h3>Bug fixes and enhancements</h3>
<ul>
<li>Restore DNS names for containers in the default &quot;nat&quot;
network on Windows. <a
href="https://redirect.github.com/moby/moby/pull/47490">moby/moby#47490</a></li>
<li>Fix <code>docker start</code> failing when used with
<code>--checkpoint</code> <a
href="https://redirect.github.com/moby/moby/pull/47466">moby/moby#47466</a></li>
<li>Don't enforce new validation rules for existing swarm networks <a
href="https://redirect.github.com/moby/moby/pull/47482">moby/moby#47482</a></li>
<li>Restore IP connectivity between the host and containers on an
internal bridge network. <a
href="https://redirect.github.com/moby/moby/pull/47481">moby/moby#47481</a></li>
<li>Fix a regression introduced in v25.0 that prevented the classic
builder from ADDing a tar archive with xattrs created on a non-Linux OS
<a
href="https://redirect.github.com/moby/moby/pull/47483">moby/moby#47483</a></li>
<li>containerd image store: Fix image pull not emitting <code>Pulling fs
layer</code> status <a
href="https://redirect.github.com/moby/moby/pull/47484">moby/moby#47484</a></li>
</ul>
<h3>API</h3>
<ul>
<li>To preserve backwards compatibility, make read-only mounts not
recursive by default when using older clients (API version &lt; v1.44).
<a
href="https://redirect.github.com/moby/moby/pull/47393">moby/moby#47393</a></li>
<li><code>GET /images/{id}/json</code> omits the <code>Created</code>
field (previously it was <code>0001-01-01T00:00:00Z</code>) if the
<code>Created</code> field is missing from the image config. <a
href="https://redirect.github.com/moby/moby/pull/47451">moby/moby#47451</a></li>
<li>Populate a missing <code>Created</code> field in <code>GET
/images/{id}/json</code> with <code>0001-01-01T00:00:00Z</code> for API
version &lt;= 1.43. <a
href="https://redirect.github.com/moby/moby/pull/47387">moby/moby#47387</a></li>
<li>Fix a regression that caused API socket connection failures to
report an API version negotiation failure instead. <a
href="https://redirect.github.com/moby/moby/pull/47470">moby/moby#47470</a></li>
<li>Preserve supplied endpoint configuration in a container-create API
request, when a container-wide MAC address is specified, but
<code>NetworkMode</code> name-or-id is not the same as the name-or-id
used in <code>NetworkSettings.Networks</code>. <a
href="https://redirect.github.com/moby/moby/pull/47510">moby/moby#47510</a></li>
</ul>
<h3>Packaging updates</h3>
<ul>
<li>Upgrade Go runtime to <a
href="https://go.dev/doc/devel/release#go1.21.8">1.21.8</a>. <a
href="https://redirect.github.com/moby/moby/pull/47503">moby/moby#47503</a></li>
<li>Upgrade RootlessKit to <a
href="https://github.com/rootless-containers/rootlesskit/releases/tag/v2.0.2">v2.0.2</a>.
<a
href="https://redirect.github.com/moby/moby/pull/47508">moby/moby#47508</a></li>
<li>Upgrade Compose to <a
href="https://github.com/docker/compose/releases/tag/v2.24.7">v2.24.7</a>.
<a
href="https://redirect.github.com/docker/docker-ce-packaging/pull/998">docker/docker-ce-packaging#998</a></li>
<li>Upgrade Buildx to <a
href="https://github.com/docker/buildx/releases/tag/v0.13.0">v0.13.0</a>.
<a
href="https://redirect.github.com/docker/docker-ce-packaging/pull/997">docker/docker-ce-packaging#997</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/moby/moby/compare/v25.0.3...v25.0.4">https://github.com/moby/moby/compare/v25.0.3...v25.0.4</a></p>
<h2>v25.0.3</h2>
<h2>25.0.3</h2>
<p>For a full list of pull requests and changes in this release, refer
to the relevant GitHub milestones:</p>
<ul>
<li><a
href="https://github.com/docker/cli/issues?q=is%3Aclosed+milestone%3A25.0.3">docker/cli,
25.0.3 milestone</a></li>
<li><a
href="https://github.com/moby/moby/issues?q=is%3Aclosed+milestone%3A25.0.3">moby/moby,
25.0.3 milestone</a></li>
</ul>
<h2>What's Changed</h2>
<ul>
<li>[25.0 backport] pkg/ioutils: Make subsequent Close attempts noop <a
href="https://redirect.github.com/moby/moby/pull/47222">moby/moby#47222</a></li>
<li>[25.0 backport] Fix HasResource inverted boolean error - vendor
swarmkit v2.0.0-20240125134710-dcda100a8261 <a
href="https://redirect.github.com/moby/moby/pull/47225">moby/moby#47225</a></li>
<li>[25.0 backport] gha: update actions to account for node 16
deprecation <a
href="https://redirect.github.com/moby/moby/pull/47291">moby/moby#47291</a></li>
<li>[25.0 backport] docs: remove dead links from api verison history <a
href="https://redirect.github.com/moby/moby/pull/47296">moby/moby#47296</a></li>
<li>[25.0 backport] Assert temp output directory is not an empty string
<a
href="https://redirect.github.com/moby/moby/pull/47298">moby/moby#47298</a></li>
<li>[25.0 backport] api: Document <code>version</code> in
<code>/build</code> <a
href="https://redirect.github.com/moby/moby/pull/47295">moby/moby#47295</a></li>
<li>[25.0 backport] De-flake TestSwarmClusterRotateUnlockKey <a
href="https://redirect.github.com/moby/moby/pull/47201">moby/moby#47201</a></li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="061aa95809"><code>061aa95</code></a>
Merge pull request <a
href="https://redirect.github.com/moby/moby/issues/47513">#47513</a>
from vvoland/v25.0-47498</li>
<li><a
href="d0d85f6438"><code>d0d85f6</code></a>
daemon: overlay2: remove world writable permission from the lower
file</li>
<li><a
href="5d6679345c"><code>5d66793</code></a>
Merge pull request <a
href="https://redirect.github.com/moby/moby/issues/47508">#47508</a>
from vvoland/v25.0-47504</li>
<li><a
href="ef1fa235cd"><code>ef1fa23</code></a>
Merge pull request <a
href="https://redirect.github.com/moby/moby/issues/47510">#47510</a>
from akerouanton/25.0-47441_mac_addr_config_migration</li>
<li><a
href="0451b287dc"><code>0451b28</code></a>
Don't create endpoint config for MAC addr config migration</li>
<li><a
href="d27fe2558d"><code>d27fe25</code></a>
dockerd-rootless-setuptool.sh: check RootlessKit functionality</li>
<li><a
href="77de535364"><code>77de535</code></a>
Dockerfile: update RootlessKit to v2.0.2</li>
<li><a
href="9e526bc394"><code>9e526bc</code></a>
Merge pull request <a
href="https://redirect.github.com/moby/moby/issues/47503">#47503</a>
from vvoland/v25.0-47502</li>
<li><a
href="2d347024d1"><code>2d34702</code></a>
update to go1.21.8</li>
<li><a
href="51e876cd96"><code>51e876c</code></a>
Merge pull request <a
href="https://redirect.github.com/moby/moby/issues/47493">#47493</a>
from akerouanton/25.0-47370_windows_natnw_dns_test</li>
<li>Additional commits viewable in <a
href="https://github.com/moby/moby/compare/v24.0.9...v25.0.4">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=github.com/moby/moby&package-manager=go_modules&previous-version=24.0.9+incompatible&new-version=25.0.4+incompatible)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

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>
Co-authored-by: Justin Van Patten <jvp@justinvp.com>
2024-03-18 14:57:43 +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
Fraser Waters a9b86b6836
Update yaml to 1.6 () 2024-03-13 09:45:31 +00:00
Julien P db85b851ef
Add InstrumentationScope to otelSpan ()
# Description

Re https://github.com/pulumi/pulumi/pull/15439


I was trying out the `--otel` flag for trace export and got a nil
pointer in `span.InstrumentationScope`

```
Pulumi Version:   3.106.1-dev.0
Go Version:       go1.21.7
Go Compiler:      gc
Architecture:     arm64
Operating System: darwin
Panic:            runtime error: invalid memory address or nil pointer dereference

goroutine 1 [running]:
runtime/debug.Stack()
        /opt/homebrew/Cellar/go/1.21.7/libexec/src/runtime/debug/stack.go:24 +0x64
main.panicHandler(0x1400231feff)
        /Users/julien/Projects/pulumi/pulumi/pkg/cmd/pulumi/main.go:35 +0x44
panic({0x107033d20?, 0x1087b94c0?})
        /opt/homebrew/Cellar/go/1.21.7/libexec/src/runtime/panic.go:914 +0x218
main.(*otelSpan).InstrumentationScope(0x1072ffe40?)
        <autogenerated>:1 +0x34
go.opentelemetry.io/otel/exporters/otlp/otlptrace/internal/tracetransform.Spans({0x140015a3000, 0x1, 0x1?})
        /Users/julien/Projects/go/pkg/mod/go.opentelemetry.io/otel/exporters/otlp/otlptrace@v1.19.0/internal/tracetransform/span.go:51 +0x168
go.opentelemetry.io/otel/exporters/otlp/otlptrace.(*Exporter).ExportSpans(0x14002000050, {0x107482ec8, 0x1089ffe20}, {0x140015a3000?, 0x1400231fb08?, 0x1?})
        /Users/julien/Projects/go/pkg/mod/go.opentelemetry.io/otel/exporters/otlp/otlptrace@v1.19.0/exporter.go:44 +0x38
main.exportTraceToOtel({0x10745ae08, 0x140015155a0}, 0x1)
        /Users/julien/Projects/pulumi/pulumi/pkg/cmd/pulumi/convert-trace.go:645 +0x3c0
main.newConvertTraceCmd.func1(0x0?, {0x14001515540, 0x1, 0x0?})
        /Users/julien/Projects/pulumi/pulumi/pkg/cmd/pulumi/convert-trace.go:677 +0xf8
main.newConvertTraceCmd.RunFunc.func2(0x0?, {0x14001515540?, 0x0?, 0x0?})
        /Users/julien/Projects/pulumi/pulumi/sdk/go/common/util/cmdutil/exit.go:99 +0x28
main.newConvertTraceCmd.RunFunc.RunResultFunc.func5(0x1400157a900?, {0x14001515540, 0x1, 0x2})
        /Users/julien/Projects/pulumi/pulumi/sdk/go/common/util/cmdutil/exit.go:115 +0x34
github.com/spf13/cobra.(*Command).execute(0x14001592600, {0x14001515520, 0x2, 0x2})
        /Users/julien/Projects/go/pkg/mod/github.com/spf13/cobra@v1.7.0/command.go:944 +0x654
github.com/spf13/cobra.(*Command).ExecuteC(0x14000d5f800)
        /Users/julien/Projects/go/pkg/mod/github.com/spf13/cobra@v1.7.0/command.go:1068 +0x320
github.com/spf13/cobra.(*Command).Execute(...)
        /Users/julien/Projects/go/pkg/mod/github.com/spf13/cobra@v1.7.0/command.go:992
main.main()
        /Users/julien/Projects/pulumi/pulumi/pkg/cmd/pulumi/main.go:56 +0x54
```

## 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-02-20 12:09:14 +00:00
Pat Gavlin 1c68e3fc77
[cli] Add otel export to convert-trace ()
These changes add support for converting a trace file into OpenTelemetry
spans and sending them to a collector for further processing.
2024-02-16 00:00:36 +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
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
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 2371602aef
Upgrade pulumi-yaml to 1.5.0 ()
Upgrade pulumi-yaml to the latest version, which includes
https://github.com/pulumi/pulumi-yaml/pull/546
2024-01-23 13:24:11 +00:00
Fraser Waters 72bddd809f
Update github.com/cloudflare/circl to v1.3.7 ()
<!--- 
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. -->

Dependabot updated some references to this in
https://github.com/pulumi/pulumi/pull/15131. But missed a lot,
importantly it didn't update pkg or sdk which are the most important
modules in this repo.


## 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. -->
- [ ] 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-16 08:59:57 +00:00
Thomas Gummerer c48ed3ba49
Revert "upgrade gocloud.dev to latest version" ()
Reverts 

/xref https://github.com/pulumi/pulumi/issues/15126
/xref https://github.com/pulumi/pulumi/issues/15127
2024-01-10 15:16:36 +00:00
Thomas Gummerer d7b1a1d9b1
upgrade gocloud.dev to latest version ()
Upgrade gocloud.dev to the latest version.  

This requires a bit of a workaround, since `gocloud.dev` changed its
expectations how the encryption key is stored for Azure. In v0.27.0 and
earlier, gocloud.dev accepted an encryption key that was wrapped in
base64.RawURLEncoding (and produced one that was wrapped as such.
However in v0.28.0 that changed and the encryption key was no longer
wrapped in gocloud.dev, and as such it also didn't expect a wrapped key
anymore .

To keep compatibility we'll keep wrapping the azure key for gocloud.dev
in an inner encoding, which seems to be the path of least resistance.
Alternatively we could introduce a `v2` encoding by prefixing the
string, but that ends up being messier than just keeping the strings
compatible.

## 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. -->
Tests were introduced in https://github.com/pulumi/pulumi/pull/14649,
I've updated them slightly to cover the new code as well.
- [ ] 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-04 09:03:42 +00:00
Fraser Waters 40b45ecc85
Add test for azure secrets ()
Add a test showing the problems we ran into when upgrading from
gocloud.dev 0.27.0 to 0.28.0 and 0.29.0. It's a little bit awkward,
since the issue only happens when upgrading form an encrypted key
generated with the old version of gocloud.dev to a newer version of
gocloud.dev.

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

---------

Co-authored-by: Thomas Gummerer <t.gummerer@gmail.com>
2024-01-03 14:47:09 +00:00
Justin Van Patten 37e6ad44d0
Upgrade go-git to v5.11.0 ()
Bumps github.com/go-git/go-git/v5 to 5.11.0 to address
https://github.com/go-git/go-git/security/advisories/GHSA-mw99-9chc-xw7r

Co-authored-by: Roy Reznik <roy@wiz.io>
2024-01-02 18:41:06 +00:00
Justin Van Patten c07baf6f3b
Upgrade pulumi-java and pulumi-yaml ()
Upgrade pulumi-java to v0.9.9 and upgrade pulumi-yaml to v1.4.5.
2023-12-27 20:51:53 +00:00
Justin Van Patten 58248fada6
Upgrade pulumi-yaml to 1.4.4 ()
Upgrade `pulumi-yaml` to the latest version, which includes
https://github.com/pulumi/pulumi-yaml/pull/533.
2023-12-20 09:14:47 +00:00
Justin Van Patten 53244f09ae
Bump golang.org/x/crypto to 0.17.0 ()
Bumps [golang.org/x/crypto](https://github.com/golang/crypto) to 0.17.0.

Replaces all the dependabot PRs in the repo with this single PR.

Also bumped `github.com/pulumi/pulumi/sdk/v3` in
`tests/integration/transformations/go/simple/go.mod` from v3.97.0 to
v3.98.0 to use esc v0.6.1, and avoid the appdash issue.
2023-12-20 09:14:29 +00:00
Justin Van Patten 9853228bc9
Update esc to v0.6.2 ()
Update to the latest version of esc.
2023-12-20 04:15:34 +00:00
Justin Van Patten b0c276ece0
Update esc to v0.6.1 ()
First step in addressing https://github.com/pulumi/pulumi/issues/14873

Note: I suspect I'll need to temporarily disable some codegen tests to
get this merged, and then once we release v3.98.0 and the next version
of esc, we can re-enable.
2023-12-19 08:05:16 +00:00
Fraser Waters 29bf5d694b
Replace ResourceSet with a generic set type ()
<!--- 
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've got a few "Set" types written up from before generics. We should
be able to replace them all with just one generic set container now.
This replaces `graph.ResourceSet` (which is only used in pkg) with a
generic set type (github.com/deckarep/golang-set).
2023-12-03 23:20:43 +00:00
Justin Van Patten 422a6419bd
Upgrade pulumi-yaml to 1.4.3 ()
Upgrade `pulumi-yaml` to the latest version, including
https://github.com/pulumi/pulumi-yaml/pull/529.
2023-12-01 03:30:05 +00:00
Fraser Waters d078735823
Reimport appdash from our mirror ()
Fixes https://github.com/pulumi/pulumi/issues/14646.
2023-11-30 14:21:35 +00:00
Pat Gavlin 064fb93587
[esc] Add commands for managing stack environments ()
These changes add two commands for managing a stack's environments:

- `pulumi config env add`, which adds environments to a stack's import
list
- `pulumi config env rm`, which removes an environment from a stack's
import list

As implied by their paths, these commands hang off of a new sub-command
of `pulumi config`, `pulumi config env`.

From the usage:

* `pulumi config env add`

Adds environments to the end of a stack's import list. Imported
environments are merged in order per the ESC merge rules. The list of
stacks behaves as if it were the import list in an anonymous
environment.

* `pulumi config env rm`

Removes an environment from a stack's import list.

Each of these commands previews the new stack environment and shows the
environment definition. These commands print a warning if the stack's
environment does not define any of the `environmentVariables`, `files`,
or `pulumiConfig` properties.
2023-11-22 05:04:14 +00:00
Pat Gavlin ecb58cc9f7
[cli] Include config from ESC in `pulumi config` ()
These changes include any configuration values sourced from a stack's
ESC environment to the output of `pulumi config`.

These changes also add an `ENVIRONMENT` block to the output of `pulumi
config` for stacks that reference environments. This block shows the
definition of the stack's environment.

Finally, these changes add a warning to `pulumi config` if the stack's
ESC environment does not define any of the `environmentVariables`,
`files`, or `pulumiConfig` properties.
2023-11-21 10:44:45 +00:00
Thomas Gummerer 1ccc0690ad
upgrade pulumi-yaml to 1.4.2 ()
# Description

Upgrade pulumi-yaml to the latest version, including
https://github.com/pulumi/pulumi-yaml/pull/526.


## 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. -->
- [ ] 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. -->
2023-11-17 10:54:20 +00:00
Fraser Waters 84ac5036d9
Update esc to v0.6.0 ()
Should help with the `cli.PrepareEnvironment` build issues some people
have been seeing.
2023-11-17 07:39:36 +00:00
Thomas Gummerer e471301987
upgrade pulumi-yaml to 1.4.1 ()
Includes the fix for https://github.com/pulumi/pulumi-yaml/issues/518.

## 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. -->
2023-11-13 10:50:48 +00:00
Bryce Lampe cbcad3277e
Allow shallow clones for local workspaces ()
<!--- 
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 exposes a GitRepo option to enable shallow cloning repositories.
This is helpful in cases where the repo has a large history.


## 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.
-->
- [ ] 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. -->
2023-11-01 17:21:52 +00:00
Pat Gavlin d7da7c0177
[cli] Support ESC files projection ()
These changes add support for the ESC `files` projection to Pulumi IaC.
This projection writes data to temporary files to disk and publishes the
path of each file in a user-specified environment variable.
2023-10-30 23:03:57 +00:00
Thomas Gummerer 4a577563ef
upgrade pulumi-yaml to 1.4.0 ()
Upgrade pulumi-yaml to the latest version
2023-10-28 07:25:27 +00:00
Pat Gavlin 06f1154a82
[esc] update to v0.5.7 ()
Co-authored-by: Justin Van Patten <jvp@justinvp.com>
2023-10-28 02:10:00 +00:00
Justin Van Patten 9d653491f6
[chore] update esc ()
Pin to v0.5.6 to pick up the CLI doc generation fix, and other
improvements.

Fixes 
2023-10-19 19:42:54 +00:00
Pat Gavlin 7e189e3a78
[chore] update esc ()
Pin to v0.5.2 to pick up a couple of bug fixes and a new command-line
option for `env init`.
2023-10-11 16:57:30 +00:00
Pat Gavlin 4d3b82cb9f
[cli] Add support for environments ()
These changes add support for ESC environments to the Pulumi CLI. This
involves two major changes:

- Support for the `env` subcommand
- Support for the `environment` stanza in stack config files

The former reuses the command from `esc` itself with a little
rebranding.

The latter adds support to stack config files for an `environment`
property of the form:

```yaml
environment:
  - list
  - of
  - environment
  - names
```

If this property is present in a stack's config file, the CLI will open
the and merge the listed environments during `pulumi up` et. al. If an
object-valued `pulumiConfig` property is present in the opened
environment, its values will be merged on top of the stack's config
prior to whatever operation is to be performed. If an object-valued
`environmentVariables` property is present inthe opened environment, its
values will be published as environment variables prior to the Pulumi
operation. Any values in the open environment's `pulumiConfig` or
`environmentVariables` that are marked as secret will be encrypted in
the resulting config and will be filtered from the command's logs.
2023-10-10 01:35:39 +00:00
Joe Duffy 96a9a77167
Policy remediations feature ()
This PR implements the new policy transforms feature, which allows
policy packs to not only issue warnings and errors in response to policy
violations, but actually fix them by rewriting resource property state.
This can be used, for instance, to auto-tag resources, remove Internet
access on the fly, or apply encryption to storage, among other use
cases.
2023-10-09 18:31:17 +00:00
Pat Gavlin 6756c12fd0
[config] Clean up implementation ()
These changes replace the idiosyncratic implementation of some of the
config Map and Value APIs with (hopefully) more straightforward code.

The fundamental representation of a config.Value remains a (value,
secure, object) tuple, where value is either a plain, possible-encrypted
string value or the JSON encoding of an object value. All operations on
values that need to observe the object value itself still decode the
JSON representation into a richer representation. This richer
representation, however, is no longer composed of `any` values: instead,
it is composed of `object` values. These values contain a restricted set
of types and directly track whether or not their contents are a secure
string value. The object-based representation allows for much clearer
implementations of the marshaling and traversal code without breaking
compatibility.

In addition to the new implementation for config.Value, these changes
add a config.Plaintext type that represents a plaintext config value. A
Plaintext value can be created manually or by decrypting a Value, and
can be encrypted and converted to a Value. This allows for more natural
creation and manipulation of config values.
2023-10-09 04:51:21 +00:00
Justin Van Patten 15b40db732
Upgrade pulumi-java go dependency to v0.9.8 () 2023-10-06 14:40:12 +00:00
Fraser Waters bf601d2070
Update golang.org/x/mod ()
<!--- 
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. -->

Go 1.21.1 is now adding new toolchain declarations to go.mod files. This
updates our dependency for this so users shouldn't hit errors due to
toolchain bits in their go.mod files.

## 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. -->
- [ ] 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. -->
2023-09-28 21:07:26 +00:00
Kyle Dixler 779f82dfdd
[`pulumi new` wrapping] Fix pulumi new selector wrapping on narrow terminals. ()
<!--- 
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/8169
Fixes https://github.com/pulumi/pulumi/issues/11812

Bump survey to v2.3.7 which contains a fix for
https://github.com/go-survey/survey/issues/101

Old: https://asciinema.org/a/jhHadL382jrzrLiU9vAsV7YR9
New: https://asciinema.org/a/lEVkdm1UdMXwUWdpipMxLGOga

## 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. -->
2023-09-20 14:48:41 +00:00
Kyle Dixler e78f98e2ab
Revert "PoC: cli/new: Use bubbletea for template list" ()
Reverts 

Temporarily reverting this until we make some improvements to the
experience.
2023-09-15 20:29:18 +00:00
Abhinav Gupta 630a790a23
PoC: cli/new: Use bubbletea for template list ()
Switches the survey-based list picker we use to pick a template
to use bubbletea with the bubbles/list widget.
Instead of using any of the default bubbles/list renderings,
this implements a custom renderer for list items (the delegate)
that provides an experience closer in look to the 'pulumi new' today.

Related to  in spirit.

Fixes 
Fixes 

---

Demos

<details>
<summary>Basic usage</summary>


[![asciicast](https://asciinema.org/a/NeecyanZP2iyzlrAOKRiKckJZ.svg)](https://asciinema.org/a/NeecyanZP2iyzlrAOKRiKckJZ)

</details>

<details>
<summary>Handling of really small terminals</summary>


[![asciicast](https://asciinema.org/a/RZW3NfX5SQ8rL4mR1iRLQ6yi1.svg)](https://asciinema.org/a/RZW3NfX5SQ8rL4mR1iRLQ6yi1)

</details>
2023-09-14 19:48:54 +00:00
Abhinav Gupta b51caa6ab4
cmdutil.ReadConsole[NoEcho]: Use bubbletea ()
Switch the cmdutil.ReadConsole and cmdutil.ReadConsoleNoEcho functions
to use the bubbletea library to render the prompt,
using the textinput widget provided by the accompanying bubbles library.
The resulting input widgets support arrow keys, back space,
and some basic readline-style bindings including Ctrl-A, Alt-B, etc.

I went through all uses of ReadConsole or ReadConsoleNoEcho.
Only the one in new.go had a non-compliant prompt that I had to adjust.

Note: One divergence in behavior I opted for was that
password prompts will echo '*' characters as the user is typing
and then no echo once they've accepted or canceled the value.
Previously, the prompt did not echo anything in either case.

<details>

  <summary>
  Introduction if you're unfamiliar with bubbletea
  </summary>

  bubbletea operates by modeling the widget state as
  an immutable data structure that receives messages for events.
  On receiving a message (key press, e.g.) the model's Update method
  returns a new model instance representing its new state.
  Update may also optionally return additional commands for the program,
  e.g. stop running, or print something and move on.
  The model's View method returns what should be drawn in the terminal
  based on the model's current state.
This programming model makes it reasonably straightforward to unit test
  some of the core functionality of independent widgets
  as demonstrated in this PR.

</details>

Resolves 

---

Demos:

<details>
  <summary>Plain text</summary>
  

![prompt-plain](https://github.com/pulumi/pulumi/assets/41730/66258fc8-f772-4d01-bc7c-1f7b116aebaa)
</details>

<details>
  <summary>Secret</summary>


![prompt-secret](https://github.com/pulumi/pulumi/assets/41730/372f862e-9186-4d47-ba7d-0107c47f52f6)
</details>

<details>
  <summary>Secret prompt with padding</summary>


![prompt-secret-2](https://github.com/pulumi/pulumi/assets/41730/e9b7c253-4c9d-4235-9fa6-197aa0522033)
</details>
2023-08-30 17:08:44 +00:00
Zaid Ajaj 0d15dc574c
[pkg] Update pulumi-yaml, pulumi-java and pulumi-dotnet ()
# Description

Update the following preparing for the CLI release
 - pulumi-yaml (v1.2.1 -> v1.2.2) 
 - pulumi-java (v0.9.0 -> v0.9.6)  
 - pulumi-dotnet (v3.54.0 -> v3.56.1)


## 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. -->
2023-08-24 22:15:53 +00:00