pulumi/scripts
Fraser Waters 959fc6c8b4
Run integration tests with race detection (#15895)
<!--- 
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 #15120 and #15124 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 #15871 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
..
brew.sh ci: Enable goreleaser prep script to build for local os & arch 2022-09-16 09:50:10 -07:00
get-job-matrix.py Vendor TypeScript and ts-node (#15622) 2024-04-10 15:26:37 +00:00
get-language-providers.sh Update dotnet language host to 3.60 (#15609) 2024-03-06 21:16:47 +00:00
get-pulumi-watch.sh ci: Enable goreleaser prep script to build for local os & arch 2022-09-16 09:50:10 -07:00
get-version ci: ensure trunk is always green 2022-09-13 13:38:14 -07:00
go-test.py Revert "Revert "Disable `--rerun-fails` in tests"" (#15643) 2024-03-26 16:26:21 +00:00
go-update.sh ci: Remove -compat=1.18 flags to validate that tests pass on current and minimum supported Go versions 2022-09-27 10:41:25 -07:00
go-wrapper.sh Run integration tests with race detection (#15895) 2024-04-11 15:58:42 +00:00
integration_test_subsets.py Start policy packs in parallel (#14495) 2023-11-20 14:08:32 +00:00
normpath Toward replacing MSBuild with make+bash on Windows (#8617) 2022-01-07 22:27:14 -05:00
prep-for-goreleaser.sh ci: Enable goreleaser prep script to build for local os & arch 2022-09-16 09:50:10 -07:00
publish_npm.sh Publish dev versions of the python and node SDKs (#15299) 2024-02-15 16:25:57 +00:00
pulumi-version.sh Publish dev versions of the python and node SDKs (#15299) 2024-02-15 16:25:57 +00:00
retry [ci] improve test logging on retries (#14706) 2023-12-01 23:05:04 +00:00
reversion.js Fix version scripts (#15759) 2024-03-22 14:31:57 +00:00
set-version.py Fix version scripts (#15759) 2024-03-22 14:31:57 +00:00
tidy.sh Support returning plain values from methods (#13592) 2023-11-18 06:02:06 +00:00
versions.sh ci: ensure trunk is always green 2022-09-13 13:38:14 -07:00