Skip to content

290759--Dot net 10 upgrade Changes - #542

Merged
MuhammadJawad-Mastek merged 29 commits into
mainfrom
feature/290759/main
Sep 17, 2026
Merged

MuhammadJawad-Mastek merged 29 commits into
mainfrom
feature/290759/main

Conversation

@amren1502129

Copy link
Copy Markdown
Collaborator

This pull request updates the infrastructure and deployment scripts to support newer versions of dependencies, upgrades the .NET runtime for all web apps to .NET 10.0, and improves deployment automation and configuration handling. The changes also ensure compatibility with newer Terraform and AzureRM provider versions, and streamline how storage and dashboard resources are defined.

Key changes include:

Platform and Dependency Upgrades

  • Upgraded the required Terraform version to 1.15.8 and the AzureRM provider to 4.x in all relevant azure.tf files, ensuring support for newer features and improved compatibility. [1] [2] [3]
  • Updated the dotnet_version for all Azure Windows Web Apps and slots (including fulfilment and mock API webapps) from v8.0 to v10.0, both in Terraform modules and in deployment scripts, to run on the latest .NET runtime. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11]

Infrastructure Resource Improvements

  • Changed storage resource definitions to use storage_account_id instead of storage_account_name for better alignment with Azure best practices and improved resource referencing.
  • Updated the dashboard resource from azurerm_dashboard to azurerm_portal_dashboard to use the current Azure provider resource type.
  • Set rbac_authorization_enabled = false in the Key Vault resource for explicit configuration.

Deployment Pipeline and Automation Enhancements

  • Added Azure CLI deployment steps in both continuous-deployment.yml and continuous-deployment-v2.yml to explicitly set the windows_fx_version for all webapps and their slots to .NET 10.0, ensuring runtime consistency post-deployment. [1] [2]
  • Introduced a new pipeline template fulfilment-webapp-az.yml to standardize webjob deployment and configuration through parameterized steps.

Terraform and Script Improvements

  • Added the -upgrade flag to all terraform init commands in deployment scripts to ensure modules and providers are updated during initialization. [1] [2] [3] [4]
  • Enhanced output handling in deployment scripts to export environment variables for all fulfilment webapp sizes, improving downstream script and pipeline integration. [1] [2]

Ganpat Gawde and others added 28 commits July 7, 2026 15:22
Upgraded all projects from .NET 8.0 to .NET 10.0. Updated NuGet dependencies to latest or .NET 10.0-compatible versions, including Swashbuckle.AspNetCore, Microsoft.AspNetCore.*, Serilog, FluentValidation, and Elastic.Apm. Added new dependencies: Microsoft.OpenApi, Snappier, and SharpCompress. Refactored Swagger annotations to use JsonSchemaType and Microsoft.OpenApi namespaces. Performed minor code and import cleanups for compatibility.
Upgraded azurerm provider to >=4.54.0 and Terraform to 1.15.8. Updated all web app resources to use .NET 10.0. Bumped pipeline container and .NET SDK versions to 1.15.8 and 10.0.x, respectively.
Added the -upgrade option to the terraform init command in terraform_conditional_run.ps1 to ensure modules and providers are updated during initialization. No other changes were made.
Updated terraform init commands in three PowerShell deployment scripts to include the -upgrade flag. This change ensures that Terraform modules and providers are upgraded to the latest acceptable versions during initialization. No other logic was altered.
…vopschanges

Update Terraform, .NET, and pipeline versions to latest
* using replacement azurerm_portal_dashboard module type since old one is deprecated

* AB#azurermdashbord-fixes issue

* AB# revert back azurerm changes

* AB#-changes in azurerm

* AB# Added accountId inspite of name

---------

Co-authored-by: MattWin90 <matthew.winstanley@mastek.com>
Co-authored-by: Amrendra Pandey <amren1502129@mastek.com>
Downgraded Microsoft.ApplicationInsights and Microsoft.ApplicationInsights.AspNetCore package versions in test projects from 3.1.2 to 2.23.0. Removed unused using directives from ProductBuilderController, ProductDataController, and ProductInformationController for improved code clarity.
Removed unused SharpCompress and Snappier package references from UKHO.ExchangeSetService.API.UnitTests.csproj to clean up dependencies.
…vchanges

290759 dotnet 10 upgrade devchanges
@snyk-io-eu

snyk-io-eu Bot commented Sep 11, 2026 •

Copy link
Copy Markdown
Contributor

✅ Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
✅ Open Source Security 0 0 0 0 0 issues
✅ Licenses 0 0 0 0 0 issues
✅ Code Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

Raj29-Mastek
Raj29-Mastek previously approved these changes Sep 11, 2026

@MuhammadJawad-Mastek MuhammadJawad-Mastek left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Its looking good to approve

mattwin1
mattwin1 previously approved these changes Sep 14, 2026

@mattwin1 mattwin1 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM

Copilot AI left a comment

Copy link
Copy Markdown

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 upgrades services and deployment infrastructure to .NET 10, Terraform 1.15.8, and AzureRM 4.x.

Changes:

  • Updates application projects, dependencies, and Azure runtimes.
  • Modernizes Terraform resources and storage/dashboard configuration.
  • Enhances deployment automation and log sanitization.

Reviewed changes

Copilot reviewed 29 out of 31 changed files in this pull request and generated 12 comments.

Show a summary per file
File Description
UKHO.SalesCatalogueFileShareServicesMock.API/UKHO.SalesCatalogueFileShareServicesMock.API/UKHO.SalesCatalogueFileShareServicesMock.API.csproj Updates the mock API to .NET 10.
UKHO.ExchangeSetService.API/UKHO.ExchangeSetService.Webjob.UnitTests/UKHO.ExchangeSetService.Webjob.UnitTests.csproj Updates webjob tests and dependencies.
UKHO.ExchangeSetService.API/UKHO.ExchangeSetService.FulfilmentService/UKHO.ExchangeSetService.FulfilmentService.csproj Updates fulfilment runtime and packages.
UKHO.ExchangeSetService.API/UKHO.ExchangeSetService.Common/UKHO.ExchangeSetService.Common.csproj Updates common runtime and dependencies.
UKHO.ExchangeSetService.API/UKHO.ExchangeSetService.Common/Helpers/CommonHelper.cs Adds log-input sanitization.
UKHO.ExchangeSetService.API/UKHO.ExchangeSetService.Common/HealthCheck/AzureWebJobsHealthCheck.cs Sanitizes health-check logging.
UKHO.ExchangeSetService.API/UKHO.ExchangeSetService.Common.UnitTests/UKHO.ExchangeSetService.Common.UnitTests.csproj Updates common tests to .NET 10.
UKHO.ExchangeSetService.API/UKHO.ExchangeSetService.API/UKHO.ExchangeSetService.API.csproj Updates API runtime and dependencies.
UKHO.ExchangeSetService.API/UKHO.ExchangeSetService.API/Filters/SecurityRequirementsOperationFilter.cs Formatting cleanup.
UKHO.ExchangeSetService.API/UKHO.ExchangeSetService.API/Filters/LoggingMiddleware.cs Sanitizes logged headers.
UKHO.ExchangeSetService.API/UKHO.ExchangeSetService.API/Controllers/ProductDataController.cs Import and formatting cleanup.
UKHO.ExchangeSetService.API/UKHO.ExchangeSetService.API.UnitTests/UKHO.ExchangeSetService.API.UnitTests.csproj Updates API tests.
UKHO.ExchangeSetService.API/UKHO.ExchangeSetService.API.FunctionalTests/UKHO.ExchangeSetService.API.FunctionalTests.csproj Updates functional tests and dependencies.
MockApiDeployment/src/Modules/Webapp/main.tf Configures mock web apps for .NET 10.
MockApiDeployment/src/azure.tf Upgrades Terraform and AzureRM.
Deployment/terraform_conditional_run.ps1 Updates Terraform initialization and deployment outputs.
Deployment/terraform_conditional_run_v2.ps1 Updates v2 Terraform initialization and outputs.
Deployment/terraform_conditional_run_apim.ps1 Updates APIM Terraform initialization.
Deployment/terraform_conditional_run_apim_v2.ps1 Updates v2 APIM initialization.
Deployment/templates/fulfilment-webapp-az.yml Adds a fulfilment deployment template.
Deployment/templates/continuous-deployment.yml Adds runtime configuration deployment steps.
Deployment/templates/continuous-deployment-v2.yml Adds v2 runtime configuration deployment steps.
Deployment/src/outputs.tf Maintains Terraform outputs.
Deployment/src/Modules/Webapp/main.tf Configures web apps for .NET 10.
Deployment/src/Modules/KeyVault/main.tf Explicitly configures Key Vault RBAC.
Deployment/src/Modules/FulfilmentWebapps/main.tf Configures fulfilment apps and slots for .NET 10.
Deployment/src/Modules/FulfilmentStorage/main.tf Migrates selected storage resources to account IDs.
Deployment/src/Modules/azuredashboard/main.tf Switches to the portal dashboard resource.
Deployment/src/Modules/APIM/azure.tf Updates APIM AzureRM configuration.
Deployment/src/azure.tf Upgrades Terraform and AzureRM.
azure-pipelines.yml Updates Terraform and .NET SDK versions.
Suppressed comments (4)

Deployment/templates/continuous-deployment-v2.yml:61

  • The added az webapp config set calls do not check their exit status, and AzureCLI does not fail on stderr by default. If one of the many runtime updates fails, later successful commands can leave the task green while that app remains on the old runtime. Fail immediately or explicitly check $LASTEXITCODE after each call.
        az webapp config set `
         --resource-group $rg `
         --name "$env:WEB_APP_NAME" `
         --slot "$env:WEB_APP_SLOT_NAME" `
         --windows-fx-version "DOTNET|10.0"

Deployment/templates/continuous-deployment.yml:61

  • The added az webapp config set calls do not check their exit status, and AzureCLI does not fail on stderr by default. If one of the many runtime updates fails, later successful commands can leave the task green while that app remains on the old runtime. Fail immediately or explicitly check $LASTEXITCODE after each call.
        az webapp config set `
         --resource-group $rg `
         --name "$env:WEBAPPNAME" `
         --slot "$env:WEB_APP_SLOT_NAME" `
         --windows-fx-version "DOTNET|10.0"

UKHO.ExchangeSetService.API/UKHO.ExchangeSetService.API/Filters/LoggingMiddleware.cs:171

  • Sanitizing only header names and values does not protect the other request-controlled values logged by this middleware, such as the URL, request body, and response body. Those values are still written directly in the log call, so CR/LF input can continue to forge log records. Apply the same normalization to all untrusted log fields or use a sink that escapes them.
                .ToDictionary(h => CommonHelper.SanitizeLogInput(h.Key), h => HeadersToRedact.Any(r => r.Equals(h.Key, StringComparison.InvariantCultureIgnoreCase)) ? RedactedValue : CommonHelper.SanitizeLogInput(string.Join(", ", (object[])h.Value)));

UKHO.ExchangeSetService.API/UKHO.ExchangeSetService.Common/Helpers/CommonHelper.cs:69

  • CommonHelperTest covers the other helper methods, but no test was added for this new log-sanitization boundary. Add focused cases for empty input and embedded carriage-return/newline characters so the log-forging protection cannot regress unnoticed.
        public static string SanitizeLogInput(string input)
        {
            if (string.IsNullOrEmpty(input))
                return string.Empty;

            // Remove newlines and carriage returns to prevent log forging
            return input.Replace("\r", string.Empty).Replace("\n", string.Empty);

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread Deployment/src/Modules/azuredashboard/main.tf
Comment thread Deployment/src/azure.tf
Comment thread Deployment/templates/continuous-deployment-v2.yml
Comment thread Deployment/templates/continuous-deployment.yml
Comment thread Deployment/templates/continuous-deployment.yml
Comment thread MockApiDeployment/src/azure.tf
Comment thread Deployment/src/Modules/APIM/azure.tf
Comment thread Deployment/src/Modules/FulfilmentStorage/main.tf
Comment thread Deployment/templates/fulfilment-webapp-az.yml
ganpat-tech
ganpat-tech previously approved these changes Sep 17, 2026

@ganpat-tech ganpat-tech left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Look Good to me

Comment thread Deployment/src/Modules/APIM/azure.tf Outdated

@MuhammadJawad-Mastek MuhammadJawad-Mastek left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Its looking good to approve.

@MuhammadJawad-Mastek
MuhammadJawad-Mastek merged commit cba9a06 into main Sep 17, 2026
16 checks passed
@MuhammadJawad-Mastek
MuhammadJawad-Mastek deleted the feature/290759/main branch September 17, 2026 13:30
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.

6 participants