Skip to content

ci: switch to self-hosted ARC runners (runs-on: dotnet) - #86

Merged
Pomdapis merged 1 commit into
mainfrom
chore/switch-to-self-hosted-runners
May 11, 2026
Merged

ci: switch to self-hosted ARC runners (runs-on: dotnet)#86
Pomdapis merged 1 commit into
mainfrom
chore/switch-to-self-hosted-runners

Conversation

@Pomdapis

Copy link
Copy Markdown
Contributor

Summary

Migre tous les workflows GH Actions de Compendium vers les runners self-hosted ARC qui tournent sur le cluster k8s sassy-solutions-main-live.

  • ci.yml : runs-on: ubuntu-latestruns-on: dotnet
  • docs-deploy.yml : 2 jobs (build + deploy) → dotnet
  • release.yml : pack-publishdotnet

Pourquoi

Minutes GitHub Actions épuisées sur l'org sassy-solutions. Les runners ARC tournent sur le cluster k8s existant via la GitHub App nxs-runner (cf. github-actions-runners).

Variante dotnet

  • Ubuntu 24.04 + .NET 8 SDK pré-installé
  • Docker CLI + Buildx + Compose
  • runner GH binaire 2.334.0
  • actions/setup-dotnet@v4 continue de marcher (override la version si besoin, e.g. 9.0.x pour docfx)
  • dind sidecar pour les jobs qui font docker build

Validation

Smoke test end-to-end (smoke-deploy + smoke-dotnet) PASS sur le cluster — le runner pull l'image privée depuis GHCR via ghcr-pull, mint un installation token via nxs-runner (App ID 3676514, installation 131410088), s'enregistre en JIT, exécute le job, le pod meurt.

Test plan

  • Merger ce PR
  • Vérifier que le 1er run du CI sur main démarre bien (Actions tab)
  • Confirmer qu'un pod éphémère spawn dans arc-runners ns du cluster
  • dotnet restore / dotnet test passent

Pour économiser les minutes GitHub Actions (limites org atteintes). Les
runners ARC tournent sur le cluster k8s sassy-solutions-main-live via la
GitHub App nxs-runner (cf. https://github.com/sassy-solutions/github-actions-runners).

Variante dotnet : Ubuntu 24.04 + .NET 8 SDK + Docker CLI + Buildx. Le
step `actions/setup-dotnet@v4` continue de fonctionner et installe la
version exacte demandée (9.0.x pour docfx).

Validé end-to-end : smoke-deploy + smoke-dotnet PASS sur le cluster.
Copilot AI review requested due to automatic review settings May 11, 2026 20:13

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.

Pull request overview

This PR migrates Compendium’s GitHub Actions workflows from GitHub-hosted runners (ubuntu-latest) to the org’s self-hosted ARC runners (label dotnet) running on the sassy-solutions-main-live Kubernetes cluster, in order to reduce GitHub Actions minutes usage.

Changes:

  • Update CI workflow to run on the dotnet self-hosted runner label.
  • Update docs build/deploy workflow jobs to run on the dotnet self-hosted runner label.
  • Update release packaging/publishing workflow to run on the dotnet self-hosted runner label.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
.github/workflows/ci.yml Switches CI build-test job from ubuntu-latest to dotnet runner label.
.github/workflows/docs-deploy.yml Switches docs build and deploy jobs from ubuntu-latest to dotnet runner label.
.github/workflows/release.yml Switches release pack-publish job from ubuntu-latest to dotnet runner label.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/ci.yml
Comment on lines 16 to 20
jobs:
build-test:
runs-on: ubuntu-latest
runs-on: dotnet
timeout-minutes: 20
steps:
@Pomdapis
Pomdapis merged commit 7e9369b into main May 11, 2026
8 of 9 checks passed
@Pomdapis
Pomdapis deleted the chore/switch-to-self-hosted-runners branch May 11, 2026 20:20
Pomdapis added a commit that referenced this pull request Jun 11, 2026
… Result.Failure (#122)

## P0-02 — Dispatcher swallows handler exceptions silently

The Compendium command/query dispatchers convert **any** exception
thrown inside a handler into
`Result.Failure(Error.Failure("*.ExecutionFailed", ex.Message))`
**without logging the exception or
stack trace**. In production this makes debugging blind: the only trace
is on OTel spans
(`exception.type` / `exception.message` activity tags), which are not
always sampled or retained.

Refs:
- Nexus bug inventory **P0-02**
- Memory note `project_compendium_dispatcher_silent`
- Nexus PR #86 added an HTTP-layer `ProblemDetailsLoggingFilter` that
only **partially** mitigated this (REST surface only — MCP, SDK,
background/process-manager dispatch paths still went dark).

## What changed

Three swallow points fixed (`CommandDispatcher.DispatchAsync<TCommand>`,
`CommandDispatcher.DispatchAsync<TCommand,TResult>`,
`QueryDispatcher.DispatchAsync<TQuery,TResult>`):

1. **Structured error logging before wrapping.** Each catch block now
calls
`_logger.LogError(ex, "...", commandOrQueryType, ...)` — logging the
full exception (with stack
   trace) at `Error` level **before** building the failure `Result`.
2. **No public API break.** Both dispatchers already receive
`IServiceProvider` only. Rather than
change the public single-argument constructor (which downstream
consumers call directly — see the
existing unit tests), the logger is **resolved from the service
provider** with a
`NullLogger<T>` fallback when no logging is configured. Binary- and
source-compatible.
3. **Non-breaking error enrichment.** `Error.Failure(...)` already
supports an optional `metadata`
dictionary, so the failure error now carries `{ exceptionType }` —
letting consumers discriminate
   the underlying cause without string-parsing `Error.Message`.
4. **Result contract preserved.** Still returns `Result.Failure`, never
rethrows.

The pre-existing `LoggingBehavior<TRequest,TResponse>` only logs when
registered as a pipeline
behavior and rethrows; the dispatcher catch sits outside the behavior
pipeline and is the final,
unconditional swallow point — which is exactly what this fixes.

## Tests

Added to `CommandDispatcherTests` / `QueryDispatcherTests` (+ a tiny
`CapturingLogger<T>` helper to
avoid a new `Microsoft.Extensions.Diagnostics.Testing` dependency):

- handler throws → `Result.Failure` returned **AND** logger received the
exception at `Error` level
**AND** `exceptionType` metadata present (command no-result,
command-with-result, and query paths)
- no `ILogger` registered → falls back to `NullLogger`, still returns
failure, does not throw
- success path → no `Error`-level log emitted

`dotnet test Compendium.Application.Tests` → **232 passed**.
Architecture tests → **37 passed**.

## Notes
- The legacy `[Obsolete]` `SagaOrchestrator` (slated for removal in
v1.0) has similar catch-and-wrap
blocks but is deprecated dead-path; intentionally **out of scope** for
this focused P0 fix. The live
choreography path (`ChoreographyRouter`) already aggregates handler
errors with messages.

Co-authored-by: sacha <sacha@scojhconsult.com>
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.

2 participants