pulumi/sdk/go/common
Fraser Waters 959fc6c8b4
Run integration tests with race detection ()
<!--- 
Thanks so much for your contribution! If this is your first time
contributing, please ensure that you have read the
[CONTRIBUTING](https://github.com/pulumi/pulumi/blob/master/CONTRIBUTING.md)
documentation.
-->

# Description

<!--- Please include a summary of the change and which issue is fixed.
Please also include relevant motivation and context. -->
Combining  and  and including fixes to allow tests to pass.

Enable race detection in the binary we're using for integration tests.
This will allow us to catch more data races before they get into any
release. This does mean the binary we're using for integration tests is
slightly different from the binary we're releasing, however that's
already the case as we're running a binary with coverage enabled for
them. Later we rebuild the binary we're actually releasing.

This requires us to fix the race between snapshot code, display code,
and the step executor. I've done that by adding a lock to the State
struct. This does not feel great, but it's a quick way to fix this and
get race detection running (and unblocks  which was also hitting
the race detector because it started pulling snapshot code into unit
tests as well). There's probably a more principled overhaul that doesn't
require locking at this level.

## Checklist

- [x] I have run `make tidy` to update any new dependencies
- [x] I have run `make lint` to verify my code passes the lint check
  - [x] I have formatted my code using `gofumpt`

<!--- Please provide details if the checkbox below is to be left
unchecked. -->
- [x] I have added tests that prove my fix is effective or that my
feature works
<!--- 
User-facing changes require a CHANGELOG entry.
-->
- [x] I have run `make changelog` and committed the
`changelog/pending/<file>` documenting my change
<!--
If the change(s) in this PR is a modification of an existing call to the
Pulumi Cloud,
then the service should honor older versions of the CLI where this
change would not exist.
You must then bump the API version in
/pkg/backend/httpstate/client/api.go, as well as add
it to the service.
-->
- [ ] Yes, there are changes in this PR that warrants bumping the Pulumi
Cloud API version
<!-- @Pulumi employees: If yes, you must submit corresponding changes in
the service repo. -->
2024-04-11 15:58:42 +00:00
..
apitype [auto/go] Support for remote deployment executor image () 2024-03-15 06:43:06 +00:00
channel Send all events to the engine event stream () 2023-11-20 21:55:59 +00:00
constant Send update metadata about update plans 2022-10-12 22:55:59 +01:00
diag turn on the golangci-lint exhaustive linter () 2024-01-17 16:50:41 +00:00
encoding all: Reformat with gofumpt 2023-03-03 09:00:24 -08:00
env Revert "Warn about non-project mode ()" () 2024-02-23 07:52:44 +00:00
promise Use promise rather than `atomic.Value` to record step errors. () 2023-11-18 19:03:35 +00:00
resource Run integration tests with race detection () 2024-04-11 15:58:42 +00:00
slice Engine support for remote transforms () 2024-02-21 16:30:46 +00:00
testing Use a new PULUMI_HOME for every test environment () 2024-03-01 21:32:49 +00:00
tokens Move resource.URN to urn.URN () 2024-03-14 15:28:32 +00:00
tools all: Reformat with gofumpt 2023-03-03 09:00:24 -08:00
util Support always qualifying stack names () () 2024-04-04 10:11:46 +00:00
version move pkg/version -> sdk/go/common/version 2020-03-18 15:25:25 -07:00
workspace Fix panic when looking up home () 2024-04-09 04:10:55 +00:00