Skip to content

Recipe deletion of Azure extension and nested ARM types - #12901

Draft
sk593 wants to merge 1 commit into
mainfrom
sk593-rrt-azure-lock-delete
Draft

Recipe deletion of Azure extension and nested ARM types#12901
sk593 wants to merge 1 commit into
mainfrom
sk593-rrt-azure-lock-delete

Conversation

@sk593

@sk593 sk593 commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

📊 Application Graph Diff

Comparing mainsk593-rrt-azure-lock-delete

✅ No application graph changes detected. The application model is identical between main and sk593-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"]:::unchanged
Loading

Summary

Completes the remaining delete-path gaps from #12694 / #12712 so rad app delete can 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:

  • Nested ARM types still used only segments[0] (databaseAccounts instead of databaseAccounts/sqlDatabases)
  • Provider listings that use a fully-qualified resourceType still missed
  • A lookup miss still happened before DELETE, so 404 skip never ran and the parent resource stayed undeletable after 21 retries

How 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

File Summary of change
pkg/portableresources/processors/resourceclient.go Resolve ARM API versions from id.Type(), match short and fully-qualified provider type names, skip missing versions on delete
pkg/portableresources/processors/resourceclient_test.go Nested type, fully-qualified extension type, and skip-on-miss coverage
pkg/corerp/handlers/arm_handler.go Same lookup matching so the unused clone does not regress

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>
@github-actions

github-actions Bot commented Sep 3, 2026

Copy link
Copy Markdown

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

@github-actions

github-actions Bot commented Sep 3, 2026

Copy link
Copy Markdown

Unit Tests

    2 files  ±0    461 suites  ±0   8m 22s ⏱️ -9s
6 533 tests +2  6 531 ✅ +2  2 💤 ±0  0 ❌ ±0 
7 809 runs  +2  7 807 ✅ +2  2 💤 ±0  0 ❌ ±0 

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.
github.com/radius-project/radius/pkg/portableresources/processors ‑ Test_Delete_ARM/failure_-_lookup_API_Version_-_no_api_versions
github.com/radius-project/radius/pkg/portableresources/processors ‑ Test_Delete_ARM/failure_-_lookup_API_Version_-_resource_type_not_found
github.com/radius-project/radius/pkg/portableresources/processors ‑ Test_Delete_ARM/success_-_lookup_API_Version_-_extension_resource_fully-qualified_type
github.com/radius-project/radius/pkg/portableresources/processors ‑ Test_Delete_ARM/success_-_lookup_API_Version_-_nested_resource
github.com/radius-project/radius/pkg/portableresources/processors ‑ Test_Delete_ARM/success_-_skip_delete_when_no_api_versions
github.com/radius-project/radius/pkg/portableresources/processors ‑ Test_Delete_ARM/success_-_skip_delete_when_resource_type_is_not_found

@codecov

codecov Bot commented Sep 3, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 60.86957% with 9 lines in your changes missing coverage. Please review.
✅ Project coverage is 59.81%. Comparing base (acb15d2) to head (eadabd7).

Files with missing lines Patch % Lines
pkg/corerp/handlers/arm_handler.go 0.00% 9 Missing ⚠️
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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@radius-functional-tests

radius-functional-tests Bot commented Sep 3, 2026

Copy link
Copy Markdown

Radius functional test overview

🔍 Go to test action run

Click here to see the test run details
Name Value
Repository radius-project/radius
Commit ref eadabd7
Unique ID func3ad36ebd77
Image tag pr-func3ad36ebd77
  • Dapr: 1.14.4
  • Azure KeyVault CSI driver: 1.4.2
  • Azure Workload identity webhook: 1.3.0
  • Bicep recipe location ghcr.io/radius-project/dev/test/testrecipes/test-bicep-recipes/<name>:pr-func3ad36ebd77
  • Terraform recipe location http://tf-module-server.radius-test-tf-module-server.svc.cluster.local/<name>.zip (in cluster)
  • applications-rp test image location: ghcr.io/radius-project/dev/applications-rp:pr-func3ad36ebd77
  • dynamic-rp test image location: ghcr.io/radius-project/dev/dynamic-rp:pr-func3ad36ebd77
  • controller test image location: ghcr.io/radius-project/dev/controller:pr-func3ad36ebd77
  • ucp test image location: ghcr.io/radius-project/dev/ucpd:pr-func3ad36ebd77
  • deployment-engine test image location: ghcr.io/radius-project/deployment-engine:latest

Test Status

⌛ Building Radius and pushing container images for functional tests...
✅ Container images build succeeded
⌛ Publishing Bicep Recipes for functional tests...
✅ Recipe publishing succeeded
⌛ Starting ucp-cloud functional tests...
⌛ Starting corerp-cloud functional tests...
✅ ucp-cloud functional tests succeeded
✅ corerp-cloud functional tests succeeded

@github-actions

github-actions Bot commented Sep 3, 2026

Copy link
Copy Markdown

Functional Tests - corerp-noncloud

190 tests  ±0   186 ✅ ±0   1h 13m 50s ⏱️ + 12m 1s
  3 suites ±0     2 💤 ±0 
  1 files   ±0     2 ❌ ±0 

For more details on these failures, see this check.

Results for commit eadabd7. ± Comparison against base commit acb15d2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

1 participant