Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable csharp tests that use nuget on macos-15 #19234

Merged
merged 2 commits into from
Apr 8, 2025

Conversation

oscarsj
Copy link
Contributor

@oscarsj oscarsj commented Apr 7, 2025

csharp tests that use nuget don't seem to be working, possibly due to issues with provisioning of Mono and nuget on those runners: https://github.com/actions/runner-images/blob/macos-15/20250120.591/images/macos/macos-15-Readme.md

Disabling the tests on that platform for now.

@github-actions github-actions bot added the C# label Apr 7, 2025
@oscarsj oscarsj marked this pull request as ready for review April 7, 2025 14:06
@Copilot Copilot bot review requested due to automatic review settings April 7, 2025 14:06
@oscarsj oscarsj requested a review from a team as a code owner April 7, 2025 14:06
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 disables a set of csharp tests that use nuget on macos-15 runners due to issues with Mono and nuget provisioning. The changes update the test decorators and comments in multiple test files to indicate that tests should be skipped on macos-15.

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.

File Description
csharp/ql/integration-tests/posix/standalone_dependencies_nuget_no_sources/test.py Updated test decorator to include macos-15 exclusion
csharp/ql/integration-tests/posix/standalone_dependencies_nuget/test.py Updated test decorator to include macos-15 exclusion
csharp/ql/integration-tests/posix/standalone_dependencies_nuget with_space/test.py Updated test decorator to include macos-15 exclusion
csharp/ql/integration-tests/posix/standalone_dependencies_no_framework/test.py Updated test decorator to include macos-15 exclusion

Tip: Leave feedback on Copilot's review comments with the 👎 and 👍 buttons to help improve review quality. Learn more

# Skipping the test on the ARM runners, as we're running into trouble with Mono and nuget.
@pytest.mark.only_if(runs_on.linux or (runs_on.macos and runs_on.x86_64))
# Skipping the test on the ARM runners and macos-15, as we're running into trouble with Mono and nuget.
@pytest.mark.only_if(runs_on.linux or (runs_on.macos and runs_on.x86_64) or (runs_on.macos and not runs_on.macos_15))
Copy link
Preview

Copilot AI Apr 7, 2025

Choose a reason for hiding this comment

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

The updated decorator does not guarantee that tests will be skipped on macos-15 if the platform qualifies as x86_64. It is recommended to refactor the condition to 'runs_on.linux or (runs_on.macos and runs_on.x86_64 and not runs_on.macos_15)' for clarity and correctness.

Suggested change
@pytest.mark.only_if(runs_on.linux or (runs_on.macos and runs_on.x86_64) or (runs_on.macos and not runs_on.macos_15))
@pytest.mark.only_if(runs_on.linux or (runs_on.macos and runs_on.x86_64 and not runs_on.macos_15))

Copilot is powered by AI, so mistakes are possible. Review output carefully before use.

@oscarsj oscarsj force-pushed the oscarsj/csharp-disable-nuget-tests branch 2 times, most recently from 81c91c4 to 38ba202 Compare April 7, 2025 16:16
@oscarsj oscarsj force-pushed the oscarsj/csharp-disable-nuget-tests branch from 38ba202 to 5e74bdc Compare April 7, 2025 16:16


# Skipping the test on macos-15, as we're running into trouble.
@pytest.mark.only_if(not runs_on.macos_15)
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we should investigate a bit more what is happening with this test. The other failing tests are all related to build-mode: none, while this one is an autobuild problem. We have some logic to prefer dotnet msbuild on Apple Silicon, this doesn't seem to match mac os 15, but I think it should.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Issue filed: https://github.com/github/codeql-csharp-team/issues/475
Could I get an approval while that one is addressed, to move forward with the rest of the macos-15 migration?

@oscarsj oscarsj requested a review from tamasvajk April 8, 2025 10:29
@oscarsj oscarsj merged commit a7943d8 into main Apr 8, 2025
18 checks passed
@oscarsj oscarsj deleted the oscarsj/csharp-disable-nuget-tests branch April 8, 2025 10:38
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.

2 participants