pulumi/tests
bors[bot] 881846d9fd
Merge #11896 #11910 #11912
11896: Add support for a Teams array in the CreateStackRequest r=justinvp a=stevesloka

# Description

Add support for a Teams array in the CreateStackRequest which allows specifying Teams when a Stack is created.

Updates #10784

Signed-off-by: Steve Sloka <steve@pulumi.com>

## Checklist

- [ ] I have added tests that prove my fix is effective or that my feature works
- [ ] I have run `make changelog` and committed the `changelog/pending/<file>` documenting my change
- [ ] Yes, there are changes in this PR that warrants bumping the Pulumi Service API version


11910: Changelog and go.mod updates for v3.52.0 r=dixler a=pulumi-bot

bors merge

11912: pkg/hcl2/model: Make String methods thread-safe r=abhinav a=abhinav

ObjectType.String and a few other types
do a fair bit of computation to build a string representation.
They memoize the result in an internal `s` field.
This causes a data race if two goroutines call `String()`
on the same object at the same time.

Tests in pkg/codegen/pcl ran into the following
from ObjectType.String.

```
WARNING: DATA RACE
Write at 0x00c00055c030 by goroutine 36:
  github.com/pulumi/pulumi/pkg/v3/codegen/hcl2/model.(*ObjectType).string()
      [..]/pulumi/pkg/codegen/hcl2/model/type_object.go:300 +0x418
  [.. snip ..]
  github.com/pulumi/pulumi/pkg/v3/codegen/pcl.TestApplyRewriter.func1()
      [..]/pulumi/pkg/codegen/pcl/rewrite_apply_test.go:176 +0x68
  testing.tRunner()
      /opt/homebrew/Cellar/go/1.19.5/libexec/src/testing/testing.go:1446 +0x188
  testing.(*T).Run.func1()
      /opt/homebrew/Cellar/go/1.19.5/libexec/src/testing/testing.go:1493 +0x40

Previous read at 0x00c00055c030 by goroutine 37:
  github.com/pulumi/pulumi/pkg/v3/codegen/hcl2/model.(*ObjectType).string()
      [..]/pulumi/pkg/codegen/hcl2/model/type_object.go:276 +0x40
  github.com/pulumi/pulumi/pkg/v3/codegen/hcl2/model.(*OutputType).string()
      [..]/pulumi/pkg/codegen/hcl2/model/type_output.go:110 +0x4c
  [..]
```

To fix this, turn the memoized field into an `atomic.Value`
in all types that memoize it.

When two goroutines race to calculate this value,
one of them will do extra work that will be thrown away,
but it won't cause a data race.

Refs #10092


Co-authored-by: Steve Sloka <steve@pulumi.com>
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Abhinav Gupta <abhinav@pulumi.com>
2023-01-19 20:36:29 +00:00
..
benchmarks/go-alias-norm ci: Simplify test listing, update go dependencies to 1.18 compat 2022-09-21 09:51:59 -07:00
examples ci: Implement smoke tests for pkg/cmd, fix examples 2022-10-17 22:07:47 -07:00
integration Use plugin link and shimless for testprovider 2023-01-19 12:41:19 +00:00
testprovider [sdk/{go,nodejs,python}] Fix DeletedWith resource option 2023-01-15 16:30:26 -08:00
.gitignore ci: Use reduced smoke testing on Windows & macOS targets 2022-09-21 09:55:06 -07:00
README.md updated readme 2023-01-03 08:30:05 -08:00
about_test.go test: fix regex used to test Go version output in about command. (#10499) 2022-08-29 11:53:03 -07:00
config_test.go ci: adjust test based on new yaml library 2022-12-10 14:26:14 -08:00
go.mod chore: post-release go.mod updates 2023-01-18 22:04:00 +00:00
go.sum Merge #11665 2022-12-16 11:35:04 +00:00
history_test.go ci: gofmt 1.18+ clean 2022-09-21 09:48:39 -07:00
login_test.go ci: radical idea - what if slow tests & no stdout makes GH consider runner dead? 2022-03-06 14:52:13 -08:00
main_test.go [breaking] Changing the version of go.mod in sdk / pkg to be v3 2021-04-14 19:32:18 +01:00
remote_test.go [cli] Test remote operations 2022-11-09 05:29:20 -08:00
roundtrip_test.go sdk/go: Remove 'nolint' directives from package docs 2023-01-06 09:06:47 -08:00
stack_test.go Repair tests expecting nil slices 2023-01-11 21:53:04 -08:00

README.md

Integration Tests

This module provides integration tests for the Pulumi CLI.

The tests can be run via:

make test_all

Usage of Go build tags

In order to speed up integration tests in GitHub actions, Go build tags are used to conditionally compile the desired test cases.

// integration_nodejs_test.go
//go:build (nodejs || all) && !smoke

// integration_nodejs_smoke_test.go
//go:build nodejs || all