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

Remove unsupported LangVersion from dotnet example #2003

Merged
merged 8 commits into from
Jan 21, 2025

Conversation

flostadler
Copy link
Contributor

@flostadler flostadler commented Jan 21, 2025

dotnet builds started failing, due to the upgrade of the github runners to ubuntu 24.04.
The RoleCS test was failing with issues in selecting LanguageVersion 11.

I've removed that version identifier from the csproj of the failing test to align with the other CS tests and changed it to not use features from language version 11.

Why did this work before?

Previously this worked, because the test implicitly used v8 of the dotnet runtime instead of the requested v6 (configured in ci-mgmt pulumi/ci-mgmt#1307).

The setup-dotnet action implicitly installs the latest LTS before installing other versions.
We're requesting 6.0.x and on Ubuntu 22.04 this was already pre-installed, so this happened:

  • Install latest LTS (v8)
  • Install v6.0.x -> Already present -> Noop

Because of that v8 was on the path first and used for tests.

Now on Ubuntu 24.04 v8 is pre-installed, so this happens:

  • Install latest LTS (v8) -> Already present -> Noop
  • Install v6.0.x

Now we're actually using the requested v6, but the RoleCs test is not compatible with that.

Fixes #2004

Copy link
Contributor

Does the PR have any schema changes?

Looking good! No breaking changes found.
No new resources/functions.

@flostadler flostadler changed the title Remove unsupported LangVersion from dotnet example Bump .NET 6 examples to .NET 8 (LTS) Jan 21, 2025
@flostadler flostadler requested review from t0yv0, corymhall and a team January 21, 2025 12:48
@flostadler flostadler self-assigned this Jan 21, 2025
Copy link

codecov bot commented Jan 21, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 51.07%. Comparing base (344bbf6) to head (210d36c).
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2003      +/-   ##
==========================================
+ Coverage   51.04%   51.07%   +0.02%     
==========================================
  Files          49       49              
  Lines        7052     7052              
==========================================
+ Hits         3600     3602       +2     
+ Misses       3200     3198       -2     
  Partials      252      252              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@flostadler flostadler changed the title Bump .NET 6 examples to .NET 8 (LTS) Remove unsupported LangVersion from dotnet example Jan 21, 2025
@@ -1,7 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<LangVersion>11</LangVersion>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
Copy link
Contributor

Choose a reason for hiding this comment

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

You probably want to bump this to net8.0 as well. We saw jobs fail in azure native due to the removal of 6.0 when runner images were updated.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I tried that first, but turns out there's a bigger issue with most of the native providers: pulumi/ci-mgmt#1307
The installation is rather broken right now, before github upgraded the runners it installed 8.0 and then 3.1.301, right now it's installing 8.0, 6.0 then 3.1.301.

Somehow 6.0 is on the path before 8.0 now and that does not support LangVersion 11.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We'll first need to fix pulumi/ci-mgmt#1307 before being able to upgrade the target framework

@flostadler flostadler enabled auto-merge (squash) January 21, 2025 21:42
@flostadler flostadler merged commit 9d8e627 into master Jan 21, 2025
18 checks passed
@flostadler flostadler deleted the flostadler/deactivate-dotnet-11 branch January 21, 2025 22:02
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.

Workflow failure: build
3 participants