Skip to content

Keep environment variables above App Configuration - #45

Merged
paulcustance-al merged 1 commit into
mainfrom
task/env-vars-beat-app-config
Sep 21, 2026
Merged

paulcustance-al merged 1 commit into
mainfrom
task/env-vars-beat-app-config

Conversation

@paulcustance-al

@paulcustance-al paulcustance-al commented Sep 21, 2026 •

Copy link
Copy Markdown
Contributor

Configuration is last one wins, and AddAzureAppConfiguration appends itself after the environment variables the host was started with, so App Configuration was quietly overriding them.

Re-adding environment variables afterwards puts them back on top. App Configuration still wins over appsettings.json everywhere the environment does not set a value.

SAB-159

Config is last one wins and App Configuration was being appended after
the environment variables, so it quietly overrode them.
@github-actions

Copy link
Copy Markdown

Test Results

77 tests  ±0   77 ✅ ±0   4s ⏱️ -1s
 5 suites ±0    0 💤 ±0 
 5 files   ±0    0 ❌ ±0 

Results for commit 7bfb8da. ± Comparison against base commit ab431fa.

@github-actions

Copy link
Copy Markdown

Summary

Summary
Generated on: 09/21/2026 - 15:12:15
Parser: MultiReport (5x Cobertura)
Assemblies: 4
Classes: 48
Files: 42
Line coverage: 72% (453 of 629)
Covered lines: 453
Uncovered lines: 176
Coverable lines: 629
Total lines: 1412
Branch coverage: 63.1% (96 of 152)
Covered branches: 96
Total branches: 152
Method coverage: Feature is only available for sponsors
Tag: 184_35617197259

Coverage

SchoolAccount.Collect.Api - 71.1%
Name Line Branch
SchoolAccount.Collect.Api 71.1% 58.5%
Program 90.9% 83.3%
SchoolAccount.Collect.Api.DependencyInjection 100% 100%
SchoolAccount.Collect.Api.Endpoints.Census.GetCensusActions.GetCensusAction
sEndpoint
100% 100%
SchoolAccount.Collect.Api.Endpoints.Census.GetCensusActions.GetCensusAction
sRequest
100%
SchoolAccount.Collect.Api.Endpoints.Organisations.GetByLaestab.GetByLaestab
Endpoint
100% 100%
SchoolAccount.Collect.Api.Endpoints.Shared.User 100% 75%
SchoolAccount.Collect.Api.Endpoints.Status.GetStatuses.GetStatusesEndpoint 100% 100%
SchoolAccount.Collect.Api.Endpoints.Status.GetStatuses.GetStatusesRequest 100% 100%
SchoolAccount.Collect.Api.Extensions.ConfigurationExtensions 0% 0%
SchoolAccount.Collect.Api.Extensions.EndpointExtensions 100% 92.8%
SchoolAccount.Collect.Api.Extensions.MiddlewareExtensions 100%
SchoolAccount.Collect.Api.Extensions.ResultExtensions 50% 25%
SchoolAccount.Collect.Api.Infrastructure.CustomResults 0% 0%
SchoolAccount.Collect.Api.Infrastructure.GlobalExceptionHandler 8.3%
SchoolAccount.Collect.Api.Middleware.RequestContextLoggingMiddleware 100% 100%
SchoolAccount.Collect.Application - 85.2%
Name Line Branch
SchoolAccount.Collect.Application 85.2% 87.5%
SchoolAccount.Collect.Application.Abstractions.Behaviors.LoggingDecorator.C
ommandBaseHandler
0% 0%
SchoolAccount.Collect.Application.Abstractions.Behaviors.LoggingDecorator.C
ommandBaseHandler
0%
SchoolAccount.Collect.Application.Abstractions.Behaviors.LoggingDecorator.C
ommandHandler<TCommand, TResponse>
0% 0%
SchoolAccount.Collect.Application.Abstractions.Behaviors.LoggingDecorator.C
ommandHandler<TCommand, TResponse>
0%
SchoolAccount.Collect.Application.Abstractions.Behaviors.LoggingDecorator.Q
ueryHandler<TQuery, TResponse>
0% 0%
SchoolAccount.Collect.Application.Abstractions.Behaviors.LoggingDecorator.Q
ueryHandler<TQuery, TResponse>
0%
SchoolAccount.Collect.Application.Census.GetCensusActions.CensusActionsResp
onse
100%
SchoolAccount.Collect.Application.Census.GetCensusActions.CensusReturn 100%
SchoolAccount.Collect.Application.Census.GetCensusActions.GetCensusActionsH
andler
100% 100%
SchoolAccount.Collect.Application.Census.GetCensusActions.GetCensusActionsQ
uery
100%
SchoolAccount.Collect.Application.Census.GetCensusActions.StubbedCensusResp
onse
100% 100%
SchoolAccount.Collect.Application.Configuration.CensusSettingsValidator 100% 100%
SchoolAccount.Collect.Application.DependencyInjection 100% 100%
SchoolAccount.Collect.Application.Organisations.GetByLaestab.GetOrganisatio
nByLaestabQuery
100%
SchoolAccount.Collect.Application.Organisations.GetByLaestab.GetOrganisatio
nByLaestabQueryHandler
100%
SchoolAccount.Collect.Application.Organisations.GetByLaestab.LaestabValue 100% 100%
SchoolAccount.Collect.Application.Organisations.GetByLaestab.StatusCalculat
or
100% 100%
SchoolAccount.Collect.Application.Shared.UserDetails 100%
SchoolAccount.Collect.Application.Status.GetStatuses.GetStatusesQuery 100%
SchoolAccount.Collect.Application.Status.GetStatuses.GetStatusesQueryHandle
r
100% 100%
SchoolAccount.Collect.Application.Status.GetStatuses.GetStatusesRequestMode
l
100%
SchoolAccount.Collect.Application.Status.GetStatuses.OrganisationResponse 100%
SchoolAccount.Collect.Application.Status.GetStatuses.OrgDetails 100% 100%
SchoolAccount.Collect.Application.Status.GetStatuses.ReturnStatusMapper 100% 100%
SchoolAccount.Collect.Application.Status.GetStatuses.StatusResponse 100%
SchoolAccount.Collect.Application.Status.GetStatuses.StatusResponseBuilder 100% 100%
SchoolAccount.Collect.Infrastructure - 20.3%
Name Line Branch
SchoolAccount.Collect.Infrastructure 20.3% 16.6%
SchoolAccount.Collect.Infrastructure.Census.CensusReturnStatusReader 13.7% 16.6%
SchoolAccount.Collect.Infrastructure.DependencyInjection 100%
SchoolAccount.Collect.Infrastructure.Time.DateTimeProvider 0%
SchoolAccount.Collect.SharedKernel - 65.7%
Name Line Branch
SchoolAccount.Collect.SharedKernel 65.7% 31.2%
SchoolAccount.Collect.SharedKernel.Error 73.3%
SchoolAccount.Collect.SharedKernel.Result 54.5% 50%
SchoolAccount.Collect.SharedKernel.Result 80% 25%
SchoolAccount.Collect.SharedKernel.ValidationError 0% 0%

@KianW-DfE KianW-DfE 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

@paulcustance-al
paulcustance-al merged commit 831cb09 into main Sep 21, 2026
2 checks passed
@paulcustance-al
paulcustance-al deleted the task/env-vars-beat-app-config branch September 21, 2026 15:17
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.

2 participants