Recipe deletion of Azure extension and nested ARM types - #12901
Conversation
PR #12712 made extension-resource API version lookup use the first extension segment, but nested ARM types still missed, fully-qualified provider listings still missed, and a lookup miss still bricked rad app delete. Resolve versions from id.Type(), match short and fully-qualified names, and skip missing versions on delete. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Signed-off-by: Shruthi Kumar <shruthikumar@microsoft.com>
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
Unit Tests 2 files ±0 461 suites ±0 8m 22s ⏱️ -9s Results for commit eadabd7. ± Comparison against base commit acb15d2. This pull request removes 2 and adds 4 tests. Note that renamed tests count towards both. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #12901 +/- ##
==========================================
- Coverage 59.82% 59.81% -0.01%
==========================================
Files 779 779
Lines 46058 46066 +8
==========================================
+ Hits 27553 27556 +3
- Misses 18505 18510 +5 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Radius functional test overviewClick here to see the test run details
Test Status⌛ Building Radius and pushing container images for functional tests... |
Functional Tests - corerp-noncloud190 tests ±0 186 ✅ ±0 1h 13m 50s ⏱️ + 12m 1s For more details on these failures, see this check. Results for commit eadabd7. ± Comparison against base commit acb15d2. |
📊 Application Graph Diff
Comparing
main→sk593-rrt-azure-lock-delete✅ No application graph changes detected. The application model is identical between
mainandsk593-rrt-azure-lock-delete.graph TD classDef added fill:#dafbe1,stroke:#1a7f37,stroke-width:2px,color:#1a7f37 classDef removed fill:#ffebe9,stroke:#cf222e,stroke-width:2px,color:#cf222e classDef modified fill:#fff8c5,stroke:#bf8700,stroke-width:2px,color:#9a6700 classDef unchanged fill:#f6f8fa,stroke:#d1d9e0,stroke-width:1px,color:#656d76 repo_radius_state_container["repo-radius-state-container\ncontainers"]:::unchangedSummary
Completes the remaining delete-path gaps from #12694 / #12712 so
rad app deletecan remove recipe-backed resources whose Azure output IDs are extension resources (Microsoft.Authorization/locks) or nested ARM types.Reason for change
Fixes #12694
#12712 made API-version lookup use the first extension segment, but:
segments[0](databaseAccountsinstead ofdatabaseAccounts/sqlDatabases)resourceTypestill missedHow to test
go test ./pkg/portableresources/processors/Covered cases: extension locks (short and fully-qualified type names), nested
databaseAccounts/sqlDatabases, and skip-on-lookup-miss so delete does not brick the parent.File change summary
pkg/portableresources/processors/resourceclient.goid.Type(), match short and fully-qualified provider type names, skip missing versions on deletepkg/portableresources/processors/resourceclient_test.gopkg/corerp/handlers/arm_handler.go