Skip to content

ci: exclude the self-update version test that this fork inverts - #28

Merged
Nana Mensa-Bonsu (kombonsu) merged 2 commits into
mainfrom
ci/skip-selfupdater-version-test
Sep 23, 2026
Merged

Nana Mensa-Bonsu (kombonsu) merged 2 commits into
mainfrom
ci/skip-selfupdater-version-test

Conversation

@kombonsu

@kombonsu Nana Mensa-Bonsu (kombonsu) commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

What

Stop Runner CI failing on a test that cannot pass in this fork.

  • .github/workflows/build.yml: the L0 step gains TestFilter, excluding SelfUpdaterL0.TestSelfUpdateAsync_NoUpdateOnOldVersion.
  • src/dir.proj: the Test target passes --filter to dotnet test when TestFilter is set, and is unchanged when it is not.

Why

Runner CI has failed on every run in this repo's history, including pushes to main. The x64 job reports Runner package '.../actions-runner-linux-x64-2.337.0.tar.gz' failed after 3 download attempts, which reads like a network flake and is not one — the test dies in ~200 ms, and no HTTP request is ever made.

The test asserts that a refresh to 2.200.0 is declined for being older than the running runner. This fork pins src/runnerversion to 0.0.1, and dir.proj compiles that into BuildConstants.RunnerPackage.Version. SelfUpdater.UpdateNeeded returns serverVersion.CompareTo(runnerVersion) > 0, so 2.200.0 > 0.0.1 is true and SelfUpdate enters DownloadLatestRunner — the branch the test never expected to reach. That branch calls HostContext.CreateHttpClientHandler(), and this is the only SelfUpdaterL0 test that does not register IHttpClientHandlerFactory, so TestHostContext throws Singleton instance not registered. The retry loop swallows it three times and reports a download failure.

The filter targets the one broken test rather than the class: the other three tests in SelfUpdaterL0 pass and cover the download, retry, and hash-validation paths. Putting the exclusion in build.yml keeps it and its rationale next to the job that needs it, and leaves a plain ./dev.sh test behaving exactly as before.

Not in this PR

  • The underlying fix, which is to stop pinning src/runnerversion to 0.0.1. That also closes the image-tag drift this repo documents in AGENTS.md (0.0.1 vs 2.329.0 in images/Dockerfile), but it changes the tag publish-image.yml stamps on published images, so it needs its own change and its own gitops follow-up.
  • Any Node 24 action upgrades. Those are ci: upgrade GitHub Actions to Node 24 majors #27, which is blocked behind this failure.

Test plan

  • build.yml parses (PyYAML); the L0 step's env and run resolve as intended.
  • src/dir.proj parses (ElementTree); the Test target contains the conditional TestFilterArg and both Exec commands.
  • actionlint on build.yml reports no new findings (its only output is the pre-existing actions/checkout@v3, which ci: upgrade GitHub Actions to Node 24 majors #27 fixes).
  • Runner CI on this branch: build (linux-x64) passed in 1m57s. The L0 log echoes the filter and reports Passed! - Failed: 0, Passed: 649, Skipped: 0, Total: 649 — one test fewer than the 650 collected before, so exactly the intended test was excluded.

Refs DEVOPS-204

Runner CI has failed on every run, including pushes to main:
SelfUpdaterL0.TestSelfUpdateAsync_NoUpdateOnOldVersion dies with
"Runner package ... failed after 3 download attempts".

Nothing is actually downloaded. The test asserts that a refresh to
2.200.0 is declined for being older than the running runner. This fork
pins src/runnerversion to 0.0.1 (publish-image.yml reads it only to tag
the image; it is not a build-arg), and that value is compiled into
BuildConstants.RunnerPackage.Version. So UpdateNeeded compares
2.200.0 > 0.0.1, returns true, and SelfUpdate takes the download path
the test never expected to reach. That path calls
HostContext.CreateHttpClientHandler(), and this is the one SelfUpdater
test that does not register IHttpClientHandlerFactory, so
TestHostContext throws "Singleton instance not registered". The retry
loop swallows it three times and reports a download failure, which is
why the test dies in ~200ms rather than on the 15-minute timeout.

Filter the one broken test rather than skipping SelfUpdaterL0 wholesale
— the other three tests in the class pass and cover the download,
retry, and hash-validation paths. The Test target now honours an
optional TestFilter property so the exclusion and its reason live in
build.yml next to the job that needs it. The real fix is to stop
pinning src/runnerversion to 0.0.1, which also closes the image-tag
drift the repo documents in AGENTS.md; that moves published image tags,
so it is not bundled here.

Verified: build.yml and dir.proj parse (PyYAML, ElementTree) and
actionlint reports no new findings. No local .NET SDK, so the L0 result
comes from Runner CI on this branch.

Co-authored-by: Cursor <cursoragent@cursor.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟢 Approval recommended

The filtering is correctly scoped; only a minor documentation correction remains.

Review effort: Balanced
Findings: 1 Low severity

Open (1)
What changed in this PR

Adds targeted CI filtering for a self-update test invalidated by this fork’s pinned runner version, unblocking Runner CI and PR #27.

Changes:

  • Adds optional TestFilter forwarding to dotnet test.
  • Excludes only the incompatible self-update test in CI.
File Description
src/​dir.proj Conditionally forwards the test filter.
.github/​workflows/​build.yml Configures the targeted exclusion.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread .github/workflows/build.yml Outdated
Comment on lines +48 to +51
# This fork pins src/runnerversion to 0.0.1 (it only tags the published
# image), so 2.200.0 compares as newer and the test drives a real
# self-update download instead. Drop this filter once src/runnerversion
# tracks the RUNNER_VERSION in images/Dockerfile.
Co-authored-by: Cursor <cursoragent@cursor.com>
@kombonsu
Nana Mensa-Bonsu (kombonsu) merged commit d2af5b4 into main Sep 23, 2026
3 checks passed
@kombonsu
Nana Mensa-Bonsu (kombonsu) deleted the ci/skip-selfupdater-version-test branch September 23, 2026 13:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants