pulumi/pkg
bors[bot] dd1c7150e3
Merge #11918
11918: pcl/codegen: Fix typeNameID data race r=abhinav a=abhinav

generator.argumentTypeName increments a typeNameID global variable.
This causes a data race when tests run in parallel:

```
WARNING: DATA RACE
Read at 0x000005d9dd28 by goroutine 20:
  github.com/pulumi/pulumi/pkg/v3/codegen/go.(*generator).argumentTypeName()
      /home/runner/work/pulumi/pulumi/pkg/codegen/go/gen_program_expressions.go:775 +0x84
  github.com/pulumi/pulumi/pkg/v3/codegen/go.(*generator).genObjectConsExpression()
  ...

Previous write at 0x000005d9dd28 by goroutine 19:
  github.com/pulumi/pulumi/pkg/v3/codegen/go.(*generator).argumentTypeName()
      /home/runner/work/pulumi/pulumi/pkg/codegen/go/gen_program_expressions.go:775 +0xa4
  github.com/pulumi/pulumi/pkg/v3/codegen/go.(*generator).genTemplateExpression()
      /home/runner/work/pulumi/pulumi/pkg/codegen/go/gen_program_expressions.go:672 +0xbe
```

This variable is not used anywhere else in the system.
Fix the data race by deleting the variable.

Refs #10092


Co-authored-by: Abhinav Gupta <abhinav@pulumi.com>
2023-01-19 22:17:33 +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 Merge #11918 2023-01-19 22:17:33 +00: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.