Skip to content

Conversation

@adamsitnik
Copy link
Member

@adamsitnik adamsitnik commented Dec 31, 2025

Reverts #2924 for reasons described here: #2924 (review)

@filzrev
Copy link
Contributor

filzrev commented Dec 31, 2025

@adamsitnik
Sorry, I don't noticed usage scenarios that run benchmarks as root users.

Is it acceptable to add logics to skip setting process priority when running on running GitHub Actions Hosted runner
by using following code?

Additional code to Portablity/RuntimeInformation.cs

// GitHub Actions environment variables https://docs.github.com/en/actions/reference/workflows-and-actions/variables#default-environment-variables
public static readonly bool IsRunningOnGitHubActions = Environment.GetEnvironmentVariable("GITHUB_ACTIONS") == "true";

public static readonly bool IsRunningOnGitHubHostedRunner = IsRunningOnGitHubActions
                                                                 && Environment.GetEnvironmentVariable("RUNNER_ENVIRONMENT") == "github-hosted";

@adamsitnik
Copy link
Member Author

@adamsitnik Sorry, I don't noticed usage scenarios that run benchmarks as root users.

No problem. I have developed this skill after years of working on the .NET Team and being constantly warned about very subtle breaking changes.

Is it acceptable to add logics to skip setting process priority when running on running GitHub Actions Hosted runner by using following code?

Additional code to Portablity/RuntimeInformation.cs

I would prefer us to modify the code that creates configs for tests and disable it there in explicit way. Because our users could in theory run as sudo using GH actions.

@adamsitnik adamsitnik merged commit 7bd81aa into master Dec 31, 2025
19 of 21 checks passed
@adamsitnik adamsitnik deleted the revert-2924-chore-skip-to-set-process-priority-on-ci branch December 31, 2025 18:27
@timcassell timcassell added this to the v0.16.0 milestone Dec 31, 2025
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.

4 participants