mirror of https://github.com/pulumi/pulumi.git
dd1c7150e3
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> |
||
---|---|---|
.. | ||
authhelpers | ||
backend | ||
cmd/pulumi | ||
codegen | ||
engine | ||
graph | ||
operations | ||
resource | ||
secrets | ||
testing/integration | ||
util | ||
version | ||
README.md | ||
go.mod | ||
go.sum |
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.