Skip to content

Restart the App Configuration sample's web app before checking its reads of the store - #160

Merged
paolosalvatori merged 1 commit into
mainfrom
smf-1297-samples-the-app-configuration-logs-check-can-miss
Dec 4, 2026
Merged

paolosalvatori merged 1 commit into
mainfrom
smf-1297-samples-the-app-configuration-logs-check-can-miss

Conversation

@paolosalvatori

@paolosalvatori paolosalvatori commented Dec 4, 2026 •

Copy link
Copy Markdown
Contributor

Motivation

While testing #159 on Azure, query-logs-and-metrics.sh of the .NET App Configuration sample failed its AACHttpRequest check: after 90 attempts (15 minutes), the workspace held no record of the web app's requests to the App Configuration store.

The web app reads its key-values from the store only when it starts, and Azure can drop for good the records of a new diagnostic setting's first minutes. All four startup reads of that run (08:26 to 08:34 UTC) fell in them; the workspace later held only the read of 08:59, made when the script restarted the app. The script already restarts the app for this reason, but only before the Key Vault check (AZKVAuditLogs), which comes after the AACHttpRequest check. The Python run of the same day passed only because its app started later. The .NET and Python scripts are identical.

Fixes SMF-1297

Changes

  • query-logs-and-metrics.sh of the .NET and Python App Configuration samples restarts the web app, and waits for it to answer, before the AACHttpRequest check instead of after it, so that both checks look for reads made after the diagnostic setting's first minutes.
  • The two READMEs list the reads of the store among the start-up records Azure can drop.

Tests

  • Samples CI on this branch, the changed samples on Linux (amd64 and arm64) and Windows: run 47320220666 passed all 12 jobs: the six deployments on Linux amd64 and on Windows (the sample has no arm64 entries).
  • Azure, the Python sample deployed with its Azure CLI scripts and tested with the commands of run-samples.sh and RETRY_COUNT=90: every step passed, the AACHttpRequest check included. The other five deployments never reached the changed script: on 2026-12-04, westeurope answered App Service plan creation with "No available instances to satisfy this request" in four rounds, northeurope has no S1 App Service quota on the test subscription, and the .NET Azure CLI deployment hung in az webapp deploy for 78 minutes. Their resource groups are deleted.

Related

🤖 Generated with Claude Code

https://claude.ai/code/session_01FvNuJJKcAASYSAqWH2cusA

…ads of the store

The web app reads its key-values from the App Configuration store only when it starts, and Azure can drop for good the records of a new diagnostic setting's first minutes. query-logs-and-metrics.sh restarted the app so that it read its secrets again, but only after the AACHttpRequest check, so that check failed whenever every start of the app had fallen in those minutes: on 2026-12-04 the .NET sample's four startup reads were missing for good, and the workspace held only the read of the restart that followed the failed check.

The script now restarts the app before both the AACHttpRequest and the AZKVAuditLogs checks, and the READMEs list the store reads among the start-up records Azure can drop.

Fixes SMF-1297

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FvNuJJKcAASYSAqWH2cusA

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

No active review issues remain to block approval.

No open issues 🎉

What changed in this PR

Updates the .NET and Python App Configuration samples to address missing startup-read logs during Azure diagnostic checks.

Changes:

  • Moves the web-app restart and readiness wait before both the App Configuration and Key Vault log checks.
  • Documents that Azure can permanently drop startup reads of the App Configuration store.
File Description
samples/​web-app-app-configuration/​python/​scripts/​query-logs-and-metrics.sh Restarts the app before both read-log checks.
samples/​web-app-app-configuration/​python/​README.md Adds store reads to the diagnostic-delivery caveat.
samples/​web-app-app-configuration/​dotnet/​scripts/​query-logs-and-metrics.sh Applies the same restart ordering to .NET.
samples/​web-app-app-configuration/​dotnet/​README.md Adds the matching diagnostic-delivery caveat.

Review effort: Balanced

@paolosalvatori
paolosalvatori merged commit 73ce9d9 into main Dec 4, 2026
22 checks passed
@paolosalvatori
paolosalvatori deleted the smf-1297-samples-the-app-configuration-logs-check-can-miss branch December 4, 2026 13:01

This branch was previously deployed

1 inactive deployment
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