Skip to content

Commit

Permalink
[chore] Fix "Device or resource busy" error on Windows CI (open-telem…
Browse files Browse the repository at this point in the history
…etry#35192)

**Description:**
The error "Device or resource busy" happens intermittently when running
the `build-and-test-windows` workflow on CI. Examining a few instances
of the error it becomes clear that the concurrent run of component tests
trigger concurrent builds of `gotestsum`. This can cause one of the runs
to clash with the other and fail to build the `gotestsum` target.

The fix is to add a explicit step to build `gotestsum` in the CI
workflow. This way the local dev modus operandi is not altered (they can
still rely on `make test` to build any tool necessary for the test). If
any other tools are added to the `test` target they should also be added
to the workflow on Windows.

**Link to tracking Issue:**
Fix open-telemetry#34691

**Testing:**
Validated on repository fork.

**Documentation:**
N/A
  • Loading branch information
pjanotti authored and jriguera committed Oct 4, 2024
1 parent 1304083 commit 4a47dcb
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/build-and-test-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,11 @@ jobs:
- name: Ensure required ports in the dynamic range are available
run: |
& ${{ github.workspace }}\.github\workflows\scripts\win-required-ports.ps1
- name: Build shared test tools
# If component tests share Makefile targets they need to be added here to avoid
# concurrent component tests clashing when building such targets. This applies
# specifically to Windows, see https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/34691
run: make "$(${PWD} -replace '\\', '/')/.tools/gotestsum"
- name: Run Unit tests
run: make -j2 gotest GROUP=${{ matrix.group }}
windows-unittest:
Expand Down

0 comments on commit 4a47dcb

Please sign in to comment.