pulumi/pkg
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
..
authhelpers Add support for authentication via GOOGLE_CREDENTIALS (#6379) 2022-06-07 16:02:08 +01:00
backend pkg: Drop unnecessary printfs 2023-01-13 12:41:56 -08:00
cmd/pulumi Move cloud methods to pkg/secrets 2023-01-13 10:39:16 +00:00
codegen pkg/hcl2/model: Make String methods thread-safe 2023-01-18 16:18:17 -08:00
engine Merge #11819 #11834 #11842 #11845 2023-01-12 20:11:42 +00:00
graph Update error handling (#8406) 2021-11-12 18:37:17 -08:00
operations Merge #11819 #11834 #11842 #11845 2023-01-12 20:11:42 +00:00
resource golangci-lint: Enable staticcheck 2023-01-14 16:59:46 -08:00
secrets Move cloud methods to pkg/secrets 2023-01-13 10:39:16 +00:00
testing/integration Use plugin link and shimless for testprovider 2023-01-19 12:41:19 +00:00
util all: Drop ioutil 2023-01-06 16:35:14 -08:00
version duplicate version to ensure linking is properly handled 2020-03-19 12:49:34 -07:00
README.md export codegen tests for internal use (#8928) 2022-02-07 12:10:04 +01:00
go.mod chore: post-release go.mod updates 2023-01-18 22:04:00 +00:00
go.sum Update Go gRPC, require impl to embed UnimplementedXServer 2023-01-05 18:00:16 -08:00

README.md

pulumi/pkg

While pulumi/sdk maintains strict backwards compatibility guarantees, code under pkg/ is handled more informally: while breaking changes are still discouraged they may happen when they make sense.