Register the SQL Database Bicep samples so CI actually runs them - #125
Merged
paolosalvatori merged 2 commits intoSep 23, 2026
Merged
Conversation
Both web-app-sql-database Bicep templates ship to users while no CI job has ever deployed them. The python entry has been commented out since BICEP_SAMPLES was introduced in 046fd2e (2026-02-25) and the dotnet entry was never added at all, so a broken Bicep template in this sample would reach users green. Both deploy cleanly against the emulator today, so whatever prompted the original comment no longer applies. Verified locally on a fresh emulator: DOCKER_FLAGS="-e MSSQL_ACCEPT_EULA=Y" bash run-samples.sh 50 67 # python DOCKER_FLAGS="-e MSSQL_ACCEPT_EULA=Y" bash run-samples.sh 51 67 # dotnet Each provisions the SQL server, both databases, the app service plan, the web app and the Key Vault with its secret, then passes the sample's shared validate.sh. Registered with `bash ../scripts/validate.sh` rather than deploy alone, matching the eventhubs Bicep entries. validate.sh is deliberately shared across all three provisioning methods, so a Bicep deployment that cannot satisfy it is a finding rather than a reason to skip the check. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01REQogJXRdeGF1rZm5edNTE
Contributor
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Validation failures may not reliably propagate to CI.
Get a fresh assessment by requesting another Copilot review.
Review effort: Lite
Findings: 1
Open (1)
What changed in this PR
Registers the Python and .NET SQL Database Bicep samples so CI deploys and validates them.
Changes:
- Adds both Bicep samples to the CI matrix.
- Runs each sample’s shared validation script.
| File | Description |
|---|---|
run-samples.sh |
Registers both SQL Database Bicep samples in CI. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
This branch was successfully deployed
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.

Problem
Both
web-app-sql-databaseBicep templates ship to users, and no CI job has ever deployed either of them:samples/web-app-sql-database/python/bicep— commented out inBICEP_SAMPLESsince the array was introduced in046fd2ed(2026-02-25)samples/web-app-sql-database/dotnet/bicep— never registered at allThe folders exist, the READMEs tell users to run them, and a broken template there would reach users with CI green. This is invisible rather than red, which is the part worth fixing.
Fixes SMF-909
Change
Register both, with the sample's shared
validate.shas the test command, matching the existingeventhubsBicep entries.validate.shis deliberately shared across scripts, Bicep and Terraform — whichever way the resources were provisioned, the same assertions should hold. Registering Bicep with deploy-only would have been weaker than the check the sample already ships.Verification
Run locally on a fresh emulator for each, since these are new shards:
Both pass. Each deploys and then validates:
local-sqlserver-testMicrosoft.Sql/serverslocal-sqlserver-test/master,/PlannerDBMicrosoft.Sql/servers/databaseslocal-app-service-plan-testMicrosoft.Web/serverfarmslocal-webapp-testMicrosoft.Web/siteslocal-kv-test+local-secret-testMicrosoft.KeyVault/vaults(+ secret)The .NET run additionally creates the
testuserSQL login, grants it permissions, connects as that user, and deploys the app zip.Whatever prompted the original comment no longer applies.
One pre-existing caveat, not introduced here
All four SQL flavours use the same Key Vault name,
${PREFIX}-kv-${SUFFIX}=local-kv-test. Running two of them back-to-back against the same emulator fails the second with:because Key Vault soft-delete outlives the resource-group cleanup between samples. This already applies to the registered
scriptsshards 13 and 14 — it is not something this PR creates. CI runs one shard per job against a fresh emulator, so it is unaffected; only a local full-suite run on one emulator hits it.Worth fixing separately, either by giving each flavour a distinct vault name or by purging soft-deleted vaults in the harness cleanup. Happy to open a follow-up issue if useful.
🤖 Generated with Claude Code
https://claude.ai/code/session_01REQogJXRdeGF1rZm5edNTE