pulumi/sdk
Dan Lorenc cc7ab7e22b
Fix race condition in go/generate function.
We were building pulumi and hit an error in this function when running the makefile, but only in certain environments.
I read the code, and it looks like there's a race condition here where the gofmt command finishes
before the io.Copy starts, giving us this error:

⚠️  x86_64    | + make build
ℹ️  x86_64    | BUILD:
ℹ️  x86_64    | go generate ./pulumi/...
⚠️  x86_64    | panic: unexpected error running gofmt: read |0: file already closed

The go async function is unnecessary here, and the Go exec docs explain that StderrPipe should not be used
with Run: https://pkg.go.dev/os/exec#Cmd.StderrPipe

CombinedOutput is a simpler way to accomplish the same thing, and fixes the race condition.

Signed-off-by: Dan Lorenc <dlorenc@chainguard.dev>
2023-05-04 07:42:08 -04:00
..
go Fix race condition in go/generate function. 2023-05-04 07:42:08 -04:00
nodejs Fix brittle test case. 2023-04-28 18:53:02 -04:00
proto/go proto/ConstructRequest: Add resource options fields 2023-04-21 10:57:19 -07:00
python proto/ConstructRequest: Add resource options fields 2023-04-21 10:57:19 -07:00
README.md Cleanup sdk/README.md 2023-01-03 17:12:12 -05:00
go.mod feat(go/host): Support vendored dependencies 2023-04-24 09:49:16 -07:00
go.sum feat(go/host): Support vendored dependencies 2023-04-24 09:49:16 -07:00

README.md

Pulumi Language SDKs

This directory contains Pulumi SDKs for the following languages:

See the respective READMEs for information about installing and using these libraries.

The language providers work by implementing gRPC interfaces defined in the top level directory proto.