Skip to content

Skip mono/nuget C# integration tests on Ubuntu 26.04 - #22450

Open
redsun82 wants to merge 1 commit into
mainfrom
redsun82-skip-mono-integration-tests-on-ubuntu-26-04
Open

Skip mono/nuget C# integration tests on Ubuntu 26.04#22450
redsun82 wants to merge 1 commit into
mainfrom
redsun82-skip-mono-integration-tests-on-ubuntu-26-04

Conversation

@redsun82

@redsun82 redsun82 commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

Mono is end-of-life and its apt repository only publishes packages up to Ubuntu 18.04 (vs-bionic). On Ubuntu 26.04 those packages are uninstallable, since their gtk2-era dependency chain (libgtk2.0-0, gnome-icon-theme, fsharp, ...) no longer resolves:

mono-complete : Depends: mono-runtime (= 6.12.0.200-0xamarin2+ubuntu1804b1) but it is not going to be installed
                Depends: referenceassemblies-pcl but it is not going to be installed
                ...

Four C# integration tests need mono, and without it they fail quietly rather than obviously:

  • the legacy packages.config restore needs nuget.exe under mono, so it produces no assemblies at all and Assemblies.ql returns an empty result
  • standalone_dependencies_no_framework no longer finds mono's framework assemblies, so the buildless extractor falls back to downloading microsoft.netframework.referenceassemblies.net481, turning 1 expected row into 242

What

_supports_mono_nuget() already exists precisely to exclude platforms where mono and nuget do not work, and already excludes macos-15/macos-26 for the same class of reason. This adds Ubuntu 26.04 to it, so the four tests are deselected instead of failing.

Verified by collection on both platforms (26.04 simulated by faking freedesktop_os_release):

platform collected
Ubuntu 24.04 28/28, unchanged
Ubuntu 26.04 24/28, the 4 mono tests deselected

@github-actions github-actions Bot added the C# label Aug 27, 2026
@redsun82
redsun82 marked this pull request as ready for review August 28, 2026 10:00
@redsun82
redsun82 requested a review from a team as a code owner August 28, 2026 10:00
Copilot AI balanced review requested due to automatic review settings August 28, 2026 10:00

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

Review tier: Balanced
Findings: None

What changed in this PR

Updates C# POSIX integration-test selection to skip Mono/NuGet-dependent tests on Ubuntu 26.04.

Changes:

  • Excludes Ubuntu 26.04 in _supports_mono_nuget().
  • Documents the Mono dependency limitation.
File Description
csharp/​ql/​integration-tests/​posix/​conftest.py Adds the Ubuntu 26.04 exclusion and rationale.

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

michaelnebel
michaelnebel previously approved these changes Aug 28, 2026

@michaelnebel michaelnebel left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM!

@redsun82
redsun82 marked this pull request as draft August 31, 2026 13:02
Ubuntu dropped the `mono-complete` package in 26.04, and mono's own apt
repository publishes nothing newer than `stable-focal`, so there is nothing to
fall back on. 25.04 and 25.10 still ship it, so 26.04 is the cutoff.

Without mono the legacy `packages.config` restore silently yields nothing and
the buildless extractor falls back to downloading .NET Framework reference
assemblies, so these four tests fail rather than being skipped.

Uses the new `runs_on` version comparisons, which also lets the macOS clause
collapse to `runs_on.macos < 15`.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@redsun82
redsun82 force-pushed the redsun82-skip-mono-integration-tests-on-ubuntu-26-04 branch from ec313d1 to 575df8e Compare September 1, 2026 08:59
@redsun82
redsun82 marked this pull request as ready for review September 1, 2026 08:59
@redsun82

redsun82 commented Sep 1, 2026

Copy link
Copy Markdown
Contributor Author

@michaelnebel mind reapproving, now that it works with current main of the internal repo?

@michaelnebel michaelnebel left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants