Commit graph

210 commits

Author SHA1 Message Date
Ian Wahbe b9f57bc6b9
Move /opt/pulumi to $HOME/.pulumi (#8437)
* Move `/opt/pulumi` to `$HOME/.pulumi`

* Don't suggest adding $HOME/.pulumi to PATH
2021-11-17 10:37:38 -08:00
Ian Wahbe 272c4643b2
Update error handling (#8406)
This is the result of a change applied via `go-rewrap-errors`.
2021-11-12 18:37:17 -08:00
Komal 2f433d64b7
[cli] Emit JSON events for updates via --json flag (#8275) 2021-10-26 16:21:27 -07:00
Anton Tayanovskyy 6766e53574
Pin Python versions for tests running on GHA Windows workers (#8225)
* Pin Python versions for tests running on GHA Windows workers

* Fix interpolation syntax
2021-10-14 15:08:49 -07:00
Ian Wahbe 2e5fedff54
Switch from golint to revive (#8010) 2021-09-21 10:00:44 -07:00
Anton Tayanovskyy 79931744b6
Fix order of go mod tidy (#7799) 2021-08-19 15:03:52 -04:00
Anton Tayanovskyy 30e999ff1a
Tracing enhancements for CLI perf metrics capture (#7279)
* Allow ProgramTest Tracing flag to expand {command}

* Fix comment typos

* Memory stats collection
2021-06-15 13:25:03 -04:00
Anton Tayanovskyy 7ff1491397
Add trace proxying to fix sub-process trace collection into files (#7248)
* Add trace proxying to fix sub-process trace collection when tracing to files

* Better func naming in test

* Avoid dealing with Windows path nightmare

* On Windows it is go.exe of course

* Rename operation to component to better align with existing trace output
2021-06-10 22:57:18 -04:00
pulumi-bot 73a66f48ea [breaking] Changing the version of go.mod in sdk / pkg to be v3 2021-04-14 19:32:18 +01:00
Paul Stack 0d5b3d375d
Ensuring dotnet package sources are correct for local packages (#6476)
When passing a package source as part of a `dotnet add package` in
our acceptance testing framework, dotnet was then trying to use that
package source for the restoration of other packages in the csproj
file.

We have removed passing the source to dotnet add package add
and replaced it with adding a machine level package source via
dotnet nuget add source command

this is the more correct way to work and will allow us to be able
to search multiple locations as part of the dotnet restore command
2021-03-09 14:57:24 +00:00
Justin Van Patten d02c0b1152
Default to UseAutomaticVirtualEnv in integration tests (#6318)
This way, the tests use the built-in virtual environment support by
default, which is what most customers will be using. A new `UsePipenv`
option is available to go back to using pipenv for tests.
2021-02-11 18:16:07 -08:00
Justin Van Patten f111a53337
Look for python binary first on Windows (#6317)
We previously looked for `python3` and fallback to `python` on all systems. However, our Windows CI images include a `python3.exe` symlink to `python.exe` which does not work with `venv`. So on Windows, just look for `python` first, falling back to `python3`. (The default python.org Windows installation only includes `python.exe`).
2021-02-11 11:34:07 -08:00
Justin Van Patten 066507cd00
Do not specify a specific version of Python on Windows (#6316)
We install the version of Python we need in the CI environment (e.g. 3.9.x).
2021-02-11 08:22:04 -08:00
Paul Stack 3b8c3f7e61
Add an option to be able to stack export showing secrets for use in ExtraRuntimeValidation (#6094)
Fixes: #2993

```
func TestAccMyExample(t *testing.T) {
	test := getBaseOptions().
		With(integration.ProgramTestOptions{
			Dir: filepath.Join(getCwd(t), "test-dir"),
			DecryptSecretsInOutput: true,
			ExtraRuntimeValidation: func(t *testing.T, stackInfo integration.RuntimeValidationStackInfo) {
			  // manipulate the output of the stack here
			}),
		})

	integration.ProgramTest(t, &test)
}
```
2021-01-19 19:18:45 +00:00
Levi Blackstone 709fcbad51
Document Go packages (#6009)
Co-authored-by: Pat Gavlin <pat@pulumi.com>
2021-01-11 11:07:59 -07:00
Vivek Lakshmanan 302f869dc5 Drop unnecessary prefix in test output since we rely on go's testing to do the right thing 2020-11-17 23:24:08 -08:00
Justin Van Patten 9bcf02e7ed
Support remote components in Python (#5375) 2020-09-30 14:09:20 -07:00
Lee Briggs f5a54cf6bb
add more tests 2020-08-31 19:01:23 -07:00
Lee Briggs ed94132080
make function name clearer 2020-08-31 18:57:05 -07:00
Lee Briggs 0459767ceb
handle cases with no subpackages 2020-08-31 18:54:14 -07:00
Lee Briggs 6c2f7994fa
refactor and add tests 2020-08-31 16:08:15 -07:00
Lee Briggs 759019a7ad
use string index to calc package name 2020-08-31 15:36:02 -07:00
Lee Briggs 40745c126c
improve go mod replace logic
this commit updates the way we do the go mod replace during tests
2020-08-31 13:45:10 -07:00
Lee Briggs bad67d3242
switch os/user with luser
We make several calls to `os/user`, which uses CGO and means
cross-compilation is not possible. This replaces `os/user` with the
`luser` package, which is a drop-in replacement which does not use `CGO`
2020-07-27 14:44:08 -07:00
Justin Van Patten b77ec919d4
Install and use dependencies automatically for new Python projects (#4775)
Automatically create a virtual environment and install dependencies in it with `pulumi new` and `pulumi policy new` for Python templates.

This will save a new `virtualenv` runtime option in `Pulumi.yaml` (`PulumiPolicy.yaml` for policy packs):

```yaml
runtime:
  name: python
  options:
    virtualenv: venv
```

`virtualenv` is the path to a virtual environment that Pulumi will use when running `python` commands.

Existing projects are unaffected and can opt-in to using this by setting `virtualenv`, otherwise, they'll continue to work as-is.
2020-06-09 16:42:53 -07:00
stack72 e701e24151 Ensure Go build is an optional step in integration testing framework
Fixes: #4585

This was happening by default in the test framework and then again
in the go language runtime

Also we were replacing a module and then running go mod tidy - this
is unnecessary - go mod download is sufficient here to ensure we
have the correct dependency we need. The tidy may have been removing
the replacements added
2020-05-07 09:23:05 +01:00
CyrusNajmabadi 66bd3f4aa8
Breaking changes due to Feature 2.0 work
* 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)
2020-04-14 09:30:25 +01:00
Evan Boyle 80f1989600
Removing the need for vendoring (#4167) 2020-03-25 15:57:46 -07:00
evanboyle ec686bbaf6 Merge branch 'master' of https://github.com/pulumi/pulumi into evan/gomod 2020-03-18 17:57:58 -07:00
evanboyle d3f5bbce48 go fmt 2020-03-18 17:27:02 -07:00
Levi Blackstone 5a730d6ebc
Use Go's file handling libs for integration test framework (#4107)
Rather than shelling out to the `rm` and `cp` commands,
use Go's os utils to perform these operations. This will
work on any platform rather than just Linux.
2020-03-18 17:57:50 -06:00
evanboyle 6933745342 move pkg/tools -> sdk/go/common/tools 2020-03-18 15:56:58 -07:00
evanboyle a4ec3ec81b move pkg/testing -> sdk/go/common/testing, leave behind pkg/testing/integration 2020-03-18 15:55:41 -07:00
evanboyle 30e1a5917e move pkg/util/fsutil -> sdk/go/common/util/fsutil 2020-03-18 15:48:38 -07:00
evanboyle 33e23bdf0c move pkg/util/retry -> sdk/go/common/util/retry 2020-03-18 15:47:01 -07:00
evanboyle fa348ceb1b move pkg/util/ciutil -> sdk/go/common/util/ciutil 2020-03-18 15:43:31 -07:00
evanboyle f754b486b8 move pkg/resource/config -> sdk/go/common/resource/config 2020-03-18 15:03:37 -07:00
evanboyle 67cb405c93 move pkg/apitype -> sdk/common/apitype 2020-03-18 15:00:30 -07:00
evanboyle 70f386a967 move pkg/tokens -> sdk/go/common/tokens 2020-03-18 14:49:56 -07:00
evanboyle fccf301d14 move pkg/util/contract -> sdk/go/common/util/contract 2020-03-18 14:40:07 -07:00
evanboyle 8fb3f428b0 move pkg/workspace -> sdk/go/common/workspace 2020-03-18 14:35:53 -07:00
evanboyle fba783caf9 move pkg/resource -> sdk/go/common/resource, but leave nested resource packages 2020-03-18 13:36:19 -07:00
Luke Hoban 2050f64322
Support "link" style dependencies in Go tests (#4063)
The integration test framework currently supports using `dep` for dependency management.

However, `dep` has no native ability to manage "yarn link"-style dependencies on locally available packages.

This is a necessary scenario for testing in most repos though, as (e.g.) examples in the Kubernetes repo need to test against the locally available version of `pulumi-kubernetes`.

The best we can do is a trick of (a) deleting the vendored copy of the locally available dependency (b) copying the locally available dependency into the vendor folder (c) deleting the nested vendor folder in the new copy of the locally available dependency.
2020-03-12 08:49:52 -07:00
stack72 f11b7129a0 Run Dep Ensure when testing Go integration projects
Fixes: #3939
2020-03-10 03:11:44 +02:00
Lee Zen f6402882c2
Regression tests for StackReference in the Python SDK (#3913)
* Make Python StackReference test similar to others (with two steps)
* Include new Python StackReference integration test that uses multiple stacks
* Expose various life cycle methods for ProgramTester
2020-02-17 10:40:46 -08:00
CyrusNajmabadi 060450395c
Breaking out individual testing knobs. (#3894) 2020-02-07 12:36:23 -08:00
Luke Hoban 5bf490228a
Use \n for provider protocol even on Windows (#3855)
The provider plugin protocol is to write a port number followed by `\n`.  We must guarantee we do that even on Windows, so must avoid Python `print` statements which implicitly rewrite newlines to platform specific character sequences.

Fixes #3807.
2020-02-06 11:34:05 -08:00
CyrusNajmabadi 2d117e6acf
Fix integration test harness. (#3831) 2020-01-29 11:57:45 -08:00
stack72 81d271d9ed Changing build.proj to run all languages and tests on windows 2020-01-27 21:16:37 +02:00
Mikhail Shilkov ed6060e0c9
Relax the pattern to search for local NuGet packages (#3595) 2019-12-03 08:22:32 +01:00