Skip to content

ci: drop Debug configuration from build and test matrices#2025

Open
tyrielv wants to merge 1 commit into
microsoft:masterfrom
tyrielv:tyrielv/drop-debug-ci
Open

ci: drop Debug configuration from build and test matrices#2025
tyrielv wants to merge 1 commit into
microsoft:masterfrom
tyrielv:tyrielv/drop-debug-ci

Conversation

@tyrielv

@tyrielv tyrielv commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

Motivation

The CI test matrix is about to get more complex: user-level install testing and arm64-native builds will each add new matrix dimensions. Before that expansion, simplify by removing the Debug configuration — which currently doubles every build and test job for minimal benefit.

What this does

Removes Debug from CI matrices in all three workflows:

  • build.yaml — build + unit test matrix: [Debug, Release][Release]
  • functional-tests.yaml — functional test matrix: [Debug, Release][Release]
  • upgrade-tests.yaml — upgrade test matrix: [Debug][Release]

Promotes Debug.Assert to runtime checks so coverage is strictly better than before:

  • GitStatusCache.cs — two lock-discipline assertions → InvalidOperationException
  • QueuedPipeStringWriter.cs — queue-drained assertion → InvalidOperationException
  • MockPhysicalGitObjects.cs — null-stream assertion → ArgumentNullException.ThrowIfNull

Why Debug CI had little value here

  • Zero #if DEBUG blocks in the codebase — no Debug-only code paths exist
  • Only 3 Debug.Assert calls total in production code (now promoted)
  • No custom DefineConstants or CheckForOverflowUnderflow in build props
  • The practical difference was: JIT/AOT optimizations on/off, and 3 assertions that are now always-on

Impact

  • ~50% reduction in CI runner usage per PR (1 fewer build, 20 fewer FT shards, 6 fewer upgrade-test jobs)
  • Debug configuration remains fully buildable locally for dev inner-loop

@tyrielv tyrielv force-pushed the tyrielv/drop-debug-ci branch 2 times, most recently from bc39a09 to 2c92b09 Compare June 15, 2026 22:15
Remove Debug from the CI matrix in build, functional-test, and
upgrade-test workflows, keeping only Release. This halves CI resource
usage and wall-clock time for PR validation.

Promote the 3 remaining Debug.Assert calls to runtime checks
(InvalidOperationException / ArgumentNullException) so they fire in
Release too — strictly stronger coverage than the Debug-only asserts
they replace, with negligible overhead (all are on I/O or shutdown
paths).

Assisted-by: Claude Opus 4.6
Signed-off-by: Tyrie Vella <tyrielv@gmail.com>
@tyrielv tyrielv force-pushed the tyrielv/drop-debug-ci branch from 2c92b09 to 19efa87 Compare June 15, 2026 22:30
@tyrielv tyrielv marked this pull request as ready for review June 15, 2026 23:04
@tyrielv tyrielv enabled auto-merge June 15, 2026 23:04

@mjcheetham mjcheetham left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This makes sense to me! The build+test against release and debug is vestigial at this point.

using System;
using System.ComponentModel;
using System.Diagnostics;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Odd to leave this as a blank line instead of just dropping. But not important.

using GVFS.Common.Http;
using GVFS.Common.Tracing;
using System.Diagnostics;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Same nit.

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