chore(smoke-test): Arm "test installers" GHA workflow #6718
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Here's a link for a successful run of the workflow: https://github.com/mongodb-js/compass/actions/runs/13292993666
Description
Merging this PR will:
Add the e2e-tests as a dependency of smoke-tests
72b40f2 adds the e2e-tests as a dependency of the smoke-tests package
compass/packages/compass-smoke-tests/package.json
Line 37 in 42d8eb8
I'm doing this to leverage Lerna to run "bootstrap" only for the packages that we actually need to run the test:
compass/.github/workflows/test-installers.yml
Lines 142 to 145 in 42d8eb8
Arm the "test installers" workflow
Running the smoke tests (time-to-first-query, auto-update-from and auto-update-to) with various package formats, platforms (MacOS x86 + arm64, Ubuntu Linux x86 and Windows x86) and variants / distributions (regular, read-only and isolated).
For now, I'm disabling a few of these combinations to get a successful run that I can extend to trigger from Evergreen (or some other event) in a future PR:
compass/.github/workflows/test-installers.yml
Lines 92 to 124 in 42d8eb8
Refactor the auto-update-to tests
The is introducerd in refactors the auto-update-to tests. The main issue was that the installer for the "subject" of the test was being used to install the existing "latest" package. This was an issue for example on MacOS where we use a "latest" .dmg to test the "subject" .zip release. I didn't notice this before adding assertions on the
kind
passed to the installer.Running cleanup on exit, warning on failures
If for some reason some process is keeping files alive in a sandbox directory, Windows was failing the test job even when the actual test succeeded.
5d1188a introduce a warning instead of throwing, as we consider the disks on CI ephemeral anyway. It also registers a listener on the process exiting or getting interrupted to run the clean-up, to make it more gentle on outstanding async work and interruptions while running.
Waiting for auto-update server to close
I had a small suspicion that there that not awaiting the shutdown of the auto-updater server was causing a race condition, but I don't think that's the case. I left in the code to await it closing anyway, in 42d8eb8
Checklist
Motivation and Context
Open Questions
Dependents
Types of changes