Repository navigation
ci: run the Azurite storage tests in the build-and-test job - #258
mwg-bender[bot] wants to merge 1 commit into
Conversation
The two StorageQueryAzuriteTests skip unless EM_AZURITE_CONNECTION is set, and ci.yml never set it, so CI reported them as skipped on every run. The build-and-test job now sets up Node.js and installs Azurite with the same pins as the E2E workflow (setup-node v7.1.0 by sha, azurite@3.37.0), starts it on a throwaway location under $RUNNER_TEMP, waits until the Blob and the Table port answer, and sets EM_AZURITE_CONNECTION to UseDevelopmentStorage=true for the Api tests step only. Permissions and the continue-on-error behaviour of the test steps are unchanged. Refs #194
Summary
🎉 No failed tests in this run. Github Test Reporter by CTRF 💚 |
Nerd review of 89f5170 (workflow change: needs Woody's review before merge)DISPOSITION #194 item 4 (Azurite tests skip in CI): DONE in this PR. Not merged by me because it changes a workflow. Diff: CI evidence (run 45885520014, head 89f5170): Break-it, run locally on the Api test build:
No source files changed; build counts are unchanged from dev |
|
Mutation evidence (probe PR #259, head 3d4a7de, run 45886332231): with |
Worker result for card t_634baea2 (head
|
dev tip 6950275, run 45884045274 |
this PR 89f5170, run 45885520014 |
|
|---|---|---|
| Api.Tests (trx counters) | total 903, passed 901, NotExecuted 2 | total 903, passed 903, NotExecuted 0 |
StorageQueryAzuriteTests.CommentListAndActivityDeleteQueryRealStorageForThatActivityOnly |
NotExecuted: "Azurite test skipped: set EM_AZURITE_CONNECTION…" | Passed (0.247 s) |
StorageQueryAzuriteTests.LikeCountInRealStorageCountsOnlyDFormEventIds |
NotExecuted (same message) | Passed (0.025 s) |
| Web.Tests | 1245 passed | 1245 passed |
The skipped count dropped by 2, which is the number of Azurite tests. The job log shows Azurite up after 3s and Passed! - Failed: 0, Passed: 903, Skipped: 0, Total: 903. The trx test output shows that real storage answered. Examples: PASS rows storage returned to the two list queries: expected 2, 1, actual 2, 1 and PASS Like count of …: expected 2, actual 2. All seven checks on the head are green: build-and-test, e2e, CodeQL, the three Analyze jobs, and submit-nuget.
Mutation (break-it)
The probe ran on a separate throwaway draft, #259 (head 3d4a7de = 89f5170 + 1 commit), run 45886332231. Rewriting this PR's branch would have needed a force-push, so the probe commit was never pushed here. In the probe, EM_AZURITE_CONNECTION pointed at TableEndpoint=http://127.0.0.1:1/devstoreaccount1 with the Azurite well-known account. The loopback guard lets that string through, so the tests run and cannot reach storage.
- The Api tests step's
dotnet testexited 1:Failed! - Failed: 2, Passed: 901, Skipped: 0, Total: 903. BothStorageQueryAzuriteTestsfailed withConnection refused (127.0.0.1:1). Its trx shows outcome Failed, failed 2. - Because of
continue-on-error, the step's conclusion still reads success. The unchanged "Fail if any step failed" gate reads its outcome and turnedbuild-and-testred. - ci: mutation probe for #258 (throwaway, do not merge) #259 is closed unmerged, and its branch
ci/060-azurite-api-tests-mutationno longer exists (GET /branches/…returns 404). This PR is still exactly one commit,89f5170.
I also ran a local pre-check with the same string against the Api test build: Failed: 2, Passed: 0, Skipped: 0.
Counts (local, cold, --no-incremental)
Baseline on dev 6950275 and after on 89f5170 are identical, since no source changed and the variable is unset locally: 0 errors, 0 warnings; Api 901 passed + 2 skipped (903); Web 1245; E2E 18 (5 passed + 13 skipped without a stack). The change shows only in CI: Api goes from 901 + 2 skipped to 903 + 0 skipped.
Observations for Nerd
- README (
README.md:109-125) still describes the Azurite tests as opt-in only. It could add one sentence saying CI'sbuild-and-testnow runs them against Azurite. I left it unedited, as the card says. - Stale baseline in
CARD_COMMON.md: it says Api 495 + 4 skipped, but dev now has Api 903 (901 + 2 skipped) and Web 1245. chore(api): remove the one-time Activity old-text conversion #247 retired the two conversion Azurite tests, and the 0.6.0 work added tests. The issue text of chore(api): follow-ups from the review of the API, conversion tests and docs follow-ups (#191) #194.4 also still says "four" Azurite tests. - Pre-existing annotation:
actions/upload-artifact@ea165f8…(v4) targets Node.js 20 and is forced onto Node 24. This is not from this PR. - Tooling: the
gh-api.shhelper does not follow redirects, so job logs and artifact zips return nothing through it. I downloaded them with a scratchcurl -Lscript run under the same GitHub App helper, so the token stayed in the helper's environment. - Concurrent actor: another
mwg-bender[bot]session posted two comments on this PR while the worker was running, and it deleted the probe branch before my delete call (my delete got 422 "Reference does not exist"). Its first comment's local break-it usedUseDevelopmentStorage=truewith no Azurite running; mine used port 1. The two results agree.
Summary
CI now runs the Azurite storage tests (
StorageQueryAzuriteTests) instead of reporting them as skipped. This closes the last open item of #194 (item 4: "All four Azurite tests skip in CI because.githubsets noEM_AZURITE_CONNECTION"). The old-text conversion tests were retired in #247, so two Azurite tests remain, not four.This PR changes a workflow, so it needs a human review. Do not merge it without Woody's approval. Nerd has not merged it and will not.
Cause
.github/workflows/ci.ymlran the Api tests withoutEM_AZURITE_CONNECTION.AzuriteSupport.Connection()then marks both Azurite tests inconclusive, which CI counts as skipped. The dev tip run 45884045274 reports Api.Tests total 903, executed 901, passed 901 and NotExecuted 2. Both NotExecuted results areStorageQueryAzuriteTests, each with the message "Azurite test skipped: set EM_AZURITE_CONNECTION to an Azurite connection string."Change
Only
.github/workflows/ci.ymlchanges (+24 lines). In thebuild-and-testjob, after Build and before Api tests:actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0, node 22. This is the same sha pin ase2e.yml.npm install --global azurite@3.37.0, the same pinned version ase2e.yml.e2e.yml(nohup azurite --silent --skipApiVersionCheck --location "$RUNNER_TEMP/azurite"). The step then waits up to 60 s until both the Blob port (10000) and the Table port (10002) answer. If they do not, it fails and prints the Azurite log.env: EM_AZURITE_CONNECTION: UseDevelopmentStorage=true, set on this step only. Web tests do not see it.Job and workflow permissions are unchanged.
continue-on-errorand the final "Fail if any step failed" gate are unchanged. Every action is still pinned by sha.Validation
6950275: 0 errors, 0 warnings. Api 901 passed + 2 skipped (903), Web 1245, E2E 18 (5 passed + 13 skipped without a stack). This PR touches no source file, so the local numbers do not change.StorageQueryAzuriteTestsoutcomes from this PR's trx, and a break-it run (the variable pointed at an unreachable local port, which turns the Api step red) are posted as a PR comment by Nerd. The comment carries the DISPOSITION for chore(api): follow-ups from the review of the API, conversion tests and docs follow-ups (#191) #194 item 4.Notes
Refs #194. Nerd closes #194 by hand once every item has a disposition.