Skip to content

Commit c9df668

Browse files
DanOwenUKHOJiviteshT
authored andcommitted
Dev/update to net8 (#246)
* .net 8 Upgrade, package upgrades * Remove Fluent assertions
1 parent cd3ef90 commit c9df668

File tree

73 files changed

+925
-940
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

73 files changed

+925
-940
lines changed

.github/workflows/auto-patch-sdk.yml

Lines changed: 0 additions & 16 deletions
This file was deleted.

Deployment/src/Modules/AppInsights/outputs.tf

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
output "instrumentation_key" {
2-
value = azurerm_application_insights.app_insights.instrumentation_key
3-
}
4-
51
output "connection_string" {
62
value = azurerm_application_insights.app_insights.connection_string
73
sensitive = true

Deployment/src/Modules/MockWebApp/main.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ resource "azurerm_windows_web_app" "mock_webapp_service" {
88
site_config {
99
application_stack {
1010
current_stack = "dotnet"
11-
dotnet_version = "v6.0"
11+
dotnet_version = "v8.0"
1212
}
1313
always_on = true
1414
ftps_state = "Disabled"
@@ -57,7 +57,7 @@ resource "azurerm_windows_web_app" "pks_mock_webapp_service" {
5757
site_config {
5858
application_stack {
5959
current_stack = "dotnet"
60-
dotnet_version = "v6.0"
60+
dotnet_version = "v8.0"
6161
}
6262
always_on = true
6363
ftps_state = "Disabled"

Deployment/src/Modules/WebApp/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ resource "azurerm_windows_web_app" "webapp_service" {
88
site_config {
99
application_stack {
1010
current_stack = "dotnet"
11-
dotnet_version = "v6.0"
11+
dotnet_version = "v8.0"
1212
}
1313
always_on = true
1414
ftps_state = "Disabled"

Deployment/src/main.tf

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ module "mock_webapp_service" {
5454
"ASPNETCORE_ENVIRONMENT" = local.env_name
5555
"WEBSITE_RUN_FROM_PACKAGE" = "1"
5656
"WEBSITE_ENABLE_SYNC_UPDATE_SITE" = "true"
57-
"APPINSIGHTS_INSTRUMENTATIONKEY" = "NOT_CONFIGURED"
5857
}
5958
tags = local.tags
6059
allowed_ips = var.allowed_ips
@@ -74,7 +73,6 @@ module "webapp_service" {
7473
"EventHubLoggingConfiguration:Environment" = local.env_name
7574
"EventHubLoggingConfiguration:MinimumLoggingLevel" = "Warning"
7675
"EventHubLoggingConfiguration:UkhoMinimumLoggingLevel" = "Information"
77-
"APPINSIGHTS_INSTRUMENTATIONKEY" = module.app_insights.instrumentation_key
7876
"ASPNETCORE_ENVIRONMENT" = local.env_name
7977
"WEBSITE_RUN_FROM_PACKAGE" = "1"
8078
"WEBSITE_ENABLE_SYNC_UPDATE_SITE" = "true"

Deployment/templates/app-deploy.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ jobs:
149149
displayName: 'Use .NET SDK'
150150
inputs:
151151
packageType: sdk
152-
version: 6.0.x
152+
version: 8.0.x
153153

154154
- task: DotNetCoreCLI@2
155155
displayName: "Run POS Functional tests"
@@ -226,7 +226,7 @@ jobs:
226226
displayName: 'Use .NET SDK'
227227
inputs:
228228
packageType: sdk
229-
version: 6.0.x
229+
version: 8.0.x
230230

231231
- task: DotNetCoreCLI@2
232232
displayName: "Run BESS Functional tests"

Deployment/templates/build-test-publish.yml

Lines changed: 11 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ parameters:
66

77
- name: DotNetVersion
88
type: string
9-
default: '6.0.x'
9+
default: '8.0.x'
1010

1111
jobs:
1212
- job: Dependencychecker
@@ -48,9 +48,8 @@ jobs:
4848
- task: UseDotNet@2
4949
displayName: 'Use .NET SDK'
5050
inputs:
51-
packageType: sdk
52-
useGlobalJson: true
53-
workingDirectory: '$(Build.SourcesDirectory)'
51+
packageType: sdk
52+
version: $(SdkVersion)
5453

5554
- task: DotNetCoreCLI@2
5655
displayName: ".Net Core - NuGet restore test projects only"
@@ -100,9 +99,8 @@ jobs:
10099
- task: UseDotNet@2
101100
displayName: 'Use .NET SDK'
102101
inputs:
103-
packageType: sdk
104-
useGlobalJson: true
105-
workingDirectory: '$(Build.SourcesDirectory)'
102+
packageType: sdk
103+
version: $(SdkVersion)
106104

107105
- task: DotNetCoreCLI@2
108106
displayName: ".Net Core - NuGet restore"
@@ -219,9 +217,8 @@ jobs:
219217
- task: UseDotNet@2
220218
displayName: 'Use .NET SDK'
221219
inputs:
222-
packageType: sdk
223-
useGlobalJson: true
224-
workingDirectory: '$(Build.SourcesDirectory)'
220+
packageType: sdk
221+
version: $(SdkVersion)
225222

226223
- task: DotNetCoreCLI@2
227224
displayName: ".Net Core - NuGet restore"
@@ -279,9 +276,8 @@ jobs:
279276
- task: UseDotNet@2
280277
displayName: 'Use .NET SDK'
281278
inputs:
282-
packageType: sdk
283-
useGlobalJson: true
284-
workingDirectory: '$(Build.SourcesDirectory)'
279+
packageType: sdk
280+
version: $(SdkVersion)
285281

286282
- task: DotNetCoreCLI@2
287283
displayName: ".Net Core - NuGet restore"
@@ -333,9 +329,8 @@ jobs:
333329
- task: UseDotNet@2
334330
displayName: 'Use .NET SDK'
335331
inputs:
336-
packageType: sdk
337-
useGlobalJson: true
338-
workingDirectory: '$(Build.SourcesDirectory)'
332+
packageType: sdk
333+
version: $(SdkVersion)
339334

340335
- task: DotNetCoreCLI@2
341336
displayName: ".Net Core - NuGet restore"

NVDSuppressions.xml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -473,4 +473,16 @@
473473
</notes>
474474
<vulnerabilityName>CVE-2024-43485</vulnerabilityName>
475475
</suppress>
476+
<suppress>
477+
<notes><![CDATA[
478+
file name: YamlDotNet.dll
479+
]]></notes>
480+
<cve>CVE-2018-1000210</cve>
481+
</suppress>
482+
<suppress>
483+
<notes><![CDATA[
484+
file name: Azure.Identity:1.10.3
485+
]]></notes>
486+
<vulnerabilityName>CVE-2024-29992</vulnerabilityName>
487+
</suppress>
476488
</suppressions>

UKHO.FmEssFssMock.API/UKHO.FmEssFssMock.API/Filters/CorrelationIdMiddleware.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ public static IApplicationBuilder UseCorrelationIdMiddleware(this IApplicationBu
1313
if (string.IsNullOrEmpty(correlationId))
1414
{
1515
correlationId = Guid.NewGuid().ToString();
16-
context.Request.Headers.Add(XCorrelationIdHeaderKey, correlationId);
16+
context.Request.Headers.Append(XCorrelationIdHeaderKey, correlationId);
1717
}
1818

19-
context.Response.Headers.Add(XCorrelationIdHeaderKey, correlationId);
19+
context.Response.Headers.Append(XCorrelationIdHeaderKey, correlationId);
2020

2121
await func();
2222
});

UKHO.FmEssFssMock.API/UKHO.FmEssFssMock.API/UKHO.FmEssFssMock.API.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<Project Sdk="Microsoft.NET.Sdk.Web">
22
<PropertyGroup>
3-
<TargetFramework>net6.0</TargetFramework>
3+
<TargetFramework>net8.0</TargetFramework>
44
<Nullable>enable</Nullable>
55
<ImplicitUsings>enable</ImplicitUsings>
66
</PropertyGroup>
@@ -13,9 +13,9 @@
1313
<ItemGroup>
1414
<PackageReference Include="Azure.Storage.Blobs" Version="12.23.0" />
1515
<PackageReference Include="FluentValidation" Version="11.11.0" />
16-
<PackageReference Include="Microsoft.AspNetCore.HeaderPropagation" Version="6.0.36" />
16+
<PackageReference Include="Microsoft.AspNetCore.HeaderPropagation" Version="8.0.12" />
1717
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
18-
<PackageReference Include="Swashbuckle.AspNetCore.Annotations" Version="6.9.0" />
18+
<PackageReference Include="Swashbuckle.AspNetCore.Annotations" Version="7.2.0" />
1919
</ItemGroup>
2020
<ItemGroup>
2121
<Content Update="appsettings.json">

0 commit comments

Comments
 (0)