Upgrade to .NET 8 LTS (out-of-support runtime and base image) - #69
Open
devin-ai-integration[bot] wants to merge 1 commit into
Open
devin-ai-integration[bot] wants to merge 1 commit into
devin-ai-integration[bot] wants to merge 1 commit into
Conversation
Co-Authored-By: shayan <shayan@cognition.ai>
Author
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Moves the solution from .NET 7 (out of support since May 2024) to .NET 8 LTS. This is the fix for the container base image:
mcr.microsoft.com/dotnet/aspnet:7.0no longer receives security patches and Snyk reports 184 vulnerabilities / 6 critical against it. No application code changes were needed — only TFMs, package majors, the Dockerfile, and the CI SDK version.TargetFramework:net7.0->net8.0in all 6 projectsaspnet:7.0/sdk:7.0->aspnet:8.0/sdk:8.0Core,Design,SqlServer,Tools): 7.0.10 -> 8.0.30Npgsql7.0.4 -> 8.0.9;Npgsql.EntityFrameworkCore.PostgreSQL(+.NodaTime) 7.0.4 -> 8.0.11AspNetCore.HealthChecks.NpgSql7.0.0 -> 8.0.1;Microsoft.AspNetCore.OpenApi7.0.9 -> 8.0.30System.Text.Jsonpinned to 8.0.6 (transitive 7.0.0 viaMicrosoft.Extensions.DependencyModelwas vulnerable and never patched on the 7.0.x line).github/workflows/dotnet.yml):dotnet-version6.0.x -> 8.0.x. The workflow was pinned to 6.0.x while the projects targeted net7.0, sodotnet testaborted on the runner with "You must install or update .NET" — that failure predates this PR.Relationship to the other PR: #68 is the minimal, stay-on-.NET-7 patch upgrade that clears the same 5 high findings. This PR supersedes it. Merge either one; if #68 lands first this branch rebases cleanly (same files, higher versions).
Snyk results
snyk test --all-projects --detection-depth=4(Snyk CLI 1.1306.4), before -> after on this branch:Every dependency finding is cleared — the 5 highs plus the mediums, which were mostly .NET 7 runtime-package transitives that disappear on net8:
The base-image findings (184 vulns / 6 critical on
aspnet:7.0) are addressed by moving to the supportedaspnet:8.0tag; that image is not scanned in this repo'ssnyk testrun, so verify withsnyk container test mcr.microsoft.com/dotnet/aspnet:8.0if you want a fresh count.Behavior risk to review
The build is clean (same 3 pre-existing nullable warnings) and all 20 tests pass on net8.0, but a major-version bump carries runtime risk that unit tests do not cover:
SqlQueryRaw/raw SQL andExecuteUpdatesemantics, and stricter handling ofDateTime/DateOnlyand enum-to-string conversions. This repo usesNodaTimetypes for audit timestamps, so theNpgsql8 + NodaTime plugin pairing should be smoke-tested against a real Postgres.dotnet ef migrations addmay emit no-op alterations. No migrations were regenerated in this PR.Timestamp with time zonemapping tightened in 6, retained in 8) — validate the health check and a create/read round trip viadocker-compose up.Microsoft.EntityFrameworkCore.SqlServerremains referenced (it is unused in code but was left in place deliberately).Link to Devin session: https://app.devin.ai/sessions/515d976343dd48cd8c94e0ffe96bc259
Requested by: @shayanshafii
Devin Review