10720: ci: Enable programtests against local backend, improve isolation r=AaronFriel a=AaronFriel
These changes make integration tests run much more quickly on a local dev loop, for easily parallelized program tests like in the `integration_go_test.go` file the improvement was on the order of minutes across all tests.
The changes rely on setting `PULUMI_BACKEND_URL` to override the backend during particular tests. The backend is set to a temporary directory which is cleaned up on exit.
A helper function `NewBackendUrl(t *testing.T)` is added to enable
When `PULUMI_TEST_USE_SERVICE=true`, the `RequireService` option is set to true.
When `RequireService == true`, the test is skipped if an access token is not present, improving local dev experience by skipping tests which would error very loudly.
When `RequireService == false and CloudURL == ""`, then we use the helper function to create a temporary directory and point the filestate backend to it.
The CloudURL check allows tests which, even in the presence of `PULUMI_TEST_USE_SERVICE=true`, to still run against a local backend. E.g.:
```go
localTestOptions := testOptions.With(integration.ProgramTestOptions{
CloudURL: integration.NewBackendURL(t),
})
```
10734: prepare for next release (v3.41.0) r=AaronFriel a=pulumi-bot
Co-authored-by: Aaron Friel <mayreply@aaronfriel.com>
Co-authored-by: github-actions <github-actions@github.com>
We can use the new `provider.MainWithOptions` to reduce boilerplate in some of our testcomponent providers.
Also, while cleaning up here, I took this as an opportunity to replace use of `github.com/pkg/errors` in the `tests` dir to use the built-in functionality of the Go standard library.
Resources are serialized as their URN, ID, and package version. Each
Pulumi package is expected to register itself with the SDK. The package
will be invoked to construct appropriate instances of rehydrated
resources. Packages are distinguished by their name and their version.
This is the foundation of cross-process resources.
Related to #2430.
Co-authored-by: Mikhail Shilkov <github@mikhail.io>
Co-authored-by: Luke Hoban <luke@pulumi.com>
Co-authored-by: Levi Blackstone <levi@pulumi.com>
* Make `async:true` the default for `invoke` calls (#3750)
* Switch away from native grpc impl. (#3728)
* Remove usage of the 'deasync' library from @pulumi/pulumi. (#3752)
* Only retry as long as we get unavailable back. Anything else continues. (#3769)
* Handle all errors for now. (#3781)
* Do not assume --yes was present when using pulumi in non-interactive mode (#3793)
* Upgrade all paths for sdk and pkg to v2
* Backport C# invoke classes and other recent gen changes (#4288)
Adjust C# generation
* Replace IDeployment with a sealed class (#4318)
Replace IDeployment with a sealed class
* .NET: default to args subtype rather than Args.Empty (#4320)
* Adding system namespace for Dotnet code gen
This is required for using Obsolute attributes for deprecations
```
Iam/InstanceProfile.cs(142,10): error CS0246: The type or namespace name 'ObsoleteAttribute' could not be found (are you missing a using directive or an assembly reference?) [/Users/stack72/code/go/src/github.com/pulumi/pulumi-aws/sdk/dotnet/Pulumi.Aws.csproj]
Iam/InstanceProfile.cs(142,10): error CS0246: The type or namespace name 'Obsolete' could not be found (are you missing a using directive or an assembly reference?) [/Users/stack72/code/go/src/github.com/pulumi/pulumi-aws/sdk/dotnet/Pulumi.Aws.csproj]
```
* Fix the nullability of config type properties in C# codegen (#4379)