This PR replaces all the dependabot PRs with a single commit that
updates all relevant go.mod files.
This resolves 3 Dependabot alerts on golang.org/x/net including a
moderate severity alert.
Updates to the latest versions of
google.golang.org/genproto and google.golang.org/grpc
in all submodules in the repository.
This is necessary because in a recent change,
genproto split out some of its subpackages into independent submodules.
(https://github.com/googleapis/go-genproto/issues/1015)
As a result of this, some users may see the error:
```
google.golang.org/genproto/googleapis/rpc/status: ambiguous import: found package google.golang.org/genproto/googleapis/rpc/status in multiple modules:
google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 (/home/runner/go/pkg/mod/google.golang.org/genproto@v0.0.0-20230410155749-daa745c078e1/googleapis/rpc/status)
google.golang.org/genproto/googleapis/rpc v0.0.0-20230725213213-b022f6e96895
```
Because pu/pu is using 20230410155749,
which has googleapis/rpc as a subpackage,
but another dependency references the independent submodule (20230725213213),
so the system doesn't know which module to use for the import path,
google.golang.org/genproto/googleapis/rpc/status.
This is a problem for codegen tests and ProgramTest-based tests
for Pulumi Go programs that do not have a go.mod in the test directory.
This issue was encountered by @thomas11 while attempting to upgrade
dependencies in pulumi-docker (pulumi/pulumi-docker#700).
The grpc upgrade is necessary because the current version of grpc
also pulls the outdated version of genproto.
Per team discussion, switching to gofumpt.
[gofumpt][1] is an alternative, stricter alternative to gofmt.
It addresses other stylistic concerns that gofmt doesn't yet cover.
[1]: https://github.com/mvdan/gofumpt
See the full list of [Added rules][2], but it includes:
- Dropping empty lines around function bodies
- Dropping unnecessary variable grouping when there's only one variable
- Ensuring an empty line between multi-line functions
- simplification (`-s` in gofmt) is always enabled
- Ensuring multi-line function signatures end with
`) {` on a separate line.
[2]: https://github.com/mvdan/gofumpt#Added-rules
gofumpt is stricter, but there's no lock-in.
All gofumpt output is valid gofmt output,
so if we decide we don't like it, it's easy to switch back
without any code changes.
gofumpt support is built into the tooling we use for development
so this won't change development workflows.
- golangci-lint includes a gofumpt check (enabled in this PR)
- gopls, the LSP for Go, includes a gofumpt option
(see [installation instrutions][3])
[3]: https://github.com/mvdan/gofumpt#installation
This change was generated by running:
```bash
gofumpt -w $(rg --files -g '*.go' | rg -v testdata | rg -v compilation_error)
```
The following files were manually tweaked afterwards:
- pkg/cmd/pulumi/stack_change_secrets_provider.go:
one of the lines overflowed and had comments in an inconvenient place
- pkg/cmd/pulumi/destroy.go:
`var x T = y` where `T` wasn't necessary
- pkg/cmd/pulumi/policy_new.go:
long line because of error message
- pkg/backend/snapshot_test.go:
long line trying to assign three variables in the same assignment
I have included mention of gofumpt in the CONTRIBUTING.md.
Upgrades all go.mod files to v0.7.0 of golang.org/x/net.
This will take care of the disparate dependabot updates we're receiving
for these files.
See also https://github.com/pulumi/pulumi/security/dependabot/151
Refs CVE-2022-41723
* dotnet program-gen targets .NET 6
* changelog entry
* Update GH workflows to use .NET 6
* Enable DOTNET_ROLL_FORWARD=Major for GH workflows
* Expose GeneratePrograms with ability to provide generation options. Use specialized options for import
* Bump dotnet test projects TFM and relax warnings as errors
* refactor code according to Ian's comments
* Include error in generator diagnostics when unable to find function schema
* remove specialized version of GenerateProgram for import and refactor lowerExpression
* remove AcceptCodegenChanges from program driver
* dotnet integration tests updated to net6.0
* Generate return await on top-level Deployment.RunAsync
* [sdk/dotnet] Add PluginDownloadURL
* Update CHANGELOG_PENDING.md
* Add dotnet test
* Set Random resource.remote = false
* Add codegen
* Codegen changes to Utilizes.cs
* Fix ResourceOptions.merge
* Remove WithVersion
* Fix local test environment
* Add WithVersion back (marked as obsolete)
* Fix ResourceOptions.Copy
* Use null coalescence operator
* Set csharp to use projectReferences
* Add PluginDownloadURL to CallOptions
* Populate CallOptions in codegen
* Revert "Populate CallOptions in codegen"
This reverts commit e3397e0733.
* Make backwards compatible with previous sdks
* Run integration tests on MacOS
* Attempt to fix macos build error
* Disable full testing suite (MacOS)
* [sdk/dotnet] Add PluginDownloadURL
* Update CHANGELOG_PENDING.md
* Add dotnet test
* Set Random resource.remote = false
* Add codegen
* Codegen changes to Utilizes.cs
* Fix ResourceOptions.merge
* Remove WithVersion
* Fix local test environment
* Add WithVersion back (marked as obsolete)
* Fix ResourceOptions.Copy
* Use null coalescence operator
* Set csharp to use projectReferences
* Add PluginDownloadURL to CallOptions
* Populate CallOptions in codegen
* Revert "Populate CallOptions in codegen"
This reverts commit e3397e0733.
* Make backwards compatible with previous sdks
* [sdk/python] add PluginDownloadURL to ResourceOptions
* Setup integration tests
* Cleanup test code
* Cleanup the test framework addition
* Minor cleanup
* Fix lint
* Update CHANGELOG_PENDING.md
* Fix test
* Attempt to get python to use the correct SDK
* Fix integration tests
* Add codegen changes
* Include `InvokeOptions`
* Fix comment spacing
* Add pluginServerURL to the nodejs SDK
Tests that this work are included in the PR.
* Update CHANGELOG_PENDING.md
* Add codegen change
* Add codegen test results
* Support invoke
* Setup defaults for InvokeOptions
* [engine] Pipe serverURL through register resource
* Fix lint
* Thread serverURL through default provider calls
* Change tag from "serverURL" to "pluginDownloadURL"
* Update CHANGELOG_PENDING.md
* Allow provider to be null
* Fix tests
* Include server url passthrough in test
* Fix parseProviderRequest
* Add test for url pass through
* Fix lint
* Add ServerURL resource option
* Plugin to grpc
* Add integration test
* Correct small nits from @justinp
* Add test for default providers
* Use built in test infrastructure
* Fix lint
* Move special helpers to providers
* Partial conversion serverURL -> pluginDownloadURL
* Remove serverURL
* Remove more serverURL instances
* Exchange ServerURL for PluginDownloadURL
* const correctness
* Add url to ProviderRequest.Name()
I also canonicalize the url by removing any trailing '/'
* Fix typo + lint
* Add test for url canonicalization
* Dedupe pluginDownloadURL in ProviderRequest.Name