Skip to content

Conversation

KeterSCP
Copy link

@KeterSCP KeterSCP commented Oct 1, 2025

Fixes #6832

I cannot run tests locally because of #6463

Microsoft Reviewers: Open in CodeFlow

@Copilot Copilot AI review requested due to automatic review settings October 1, 2025 19:43
@KeterSCP KeterSCP requested a review from a team as a code owner October 1, 2025 19:43
Copy link
Contributor

@Copilot Copilot AI left a comment

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 adjusts the cgroup v2 drive format check to account for a change in .NET 10 where the drive format string for cgroup2 filesystems changed from "cgroup2fs" to "cgroup2". The change uses conditional compilation directives to maintain backward compatibility.

Key changes:

  • Updates the CgroupVersion constant to use different values based on .NET version
  • Uses conditional compilation to target .NET 10+ vs earlier versions

var injectParserV2 = false;
const string CgroupVersion = "cgroup2fs";
const string CgroupVersion =
#if NET10_0_OR_GREATER
Copy link
Author

Choose a reason for hiding this comment

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

Note: this will start working once the repository starts targeting .NET 10.

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

Successfully merging this pull request may close these issues.

Microsoft.Extensions.Diagnostics.ResourceMonitoring can not work in .net 10 cgroups v2
1 participant