Design: Unified Bicep extension publishing for default resource types#11892
Design: Unified Bicep extension publishing for default resource types#11892kachawla wants to merge 3 commits into
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds a design note proposing how Radius should consolidate and automate publishing of Bicep extensions for default resource types from resource-types-contrib.
Changes:
- Documents the current per-namespace Bicep extension publishing model.
- Compares separate
radiusResourcespublishing versus merging into the existingradiusextension. - Proposes Option 1 and outlines publishing automation for versioned and latest artifacts.
716e105 to
da5ffd7
Compare
|
|
||
| Today, Bicep extensions for resource types from `resource-types-contrib` are published as separate per-namespace extensions (`radiusCompute`, `radiusData`, `radiusSecurity`), each at its own OCI registry path. This requires users to configure multiple extension entries in `bicepconfig.json` and authors to use different `extension` directives depending on the namespace. Meanwhile, the core Radius extension (`radius`) already bundles multiple namespaces (`Applications.Core`, `Applications.Dapr`, `Applications.Datastores`, `Applications.Messaging`, `Radius.Core`) in a single published artifact. | ||
|
|
||
| This design proposes consolidating the contrib-sourced Bicep extensions into fewer (ideally one) published artifacts, and automating the publishing process so it stays in sync with the default resource type registration introduced in the [default registration design](2026-04-automated-default-resource-type-registration.md). |
There was a problem hiding this comment.
this link doesn't work right now since the PR is pending merge. You can use https://github.com/kachawla/radius/blob/63e928eaf9e326ab1048a0d5650b8efdb93c747a/eng/design-notes/extensibility/2026-04-automated-default-resource-type-registration.md in the meantime.
da5ffd7 to
8731505
Compare
|
|
||
| ### Proposed option | ||
|
|
||
| **Option 1: Separate `radiusResources` extension.** This is simpler to implement, keeps the build pipelines independent, and makes automation for both versioned and latest publishing straightforward. The extra `extension radiusResources` directive is a minor user-facing cost compared to the build and operational complexity of merging two generation pipelines. Option 2 (merging into `radius`) can be a future enhancement if the user experience benefit justifies aligning the pipelines. |
There was a problem hiding this comment.
What is the cost of renaming radiusResources to radius after we have deprecated the Application.* types?
There was a problem hiding this comment.
Deprecation of Application.* won't impact this because radius also includes new Radius.core namespace
There was a problem hiding this comment.
I meant after removing Application.containers and Aaplications.Data/* we move back to extension radius
There was a problem hiding this comment.
sorry I still don't follow how removal of those resource types will help.. could you share more?
| } | ||
| ``` | ||
|
|
||
| The `radius` extension is generated by a **TypeScript autorest pipeline** from Swagger/OpenAPI specs and bundles 5 namespaces. The contrib extensions (`radiusCompute`, `radiusData`, `radiusSecurity`) are each published separately using `rad bicep publish-extension` from individual YAML manifests via the **Go-based `bicep-tools` converter**. |
There was a problem hiding this comment.
note: autorest is deprecated, we should plan migration to typespec soon
| - If the contrib types have issues, it could block the core `radius` extension from being published | ||
| - More complex build pipeline with two generation steps feeding into one output | ||
|
|
||
| ### Proposed option |
There was a problem hiding this comment.
I would rather have Option 2 as I think the simplified user experience outweighs the cons of the build pipeline.
There was a problem hiding this comment.
we have them as one extension or have them split out like it is today and users can select what extensions/they want to include. having two extensions is not entirely intuitive but that's just one input
There was a problem hiding this comment.
Discussed and decided to go ahead with option 2. Updated the doc https://github.com/kachawla/radius/blob/bed122aa133d914f8f7c3055ab561eb9c0e16d60/eng/design-notes/extensibility/2026-05-unified-bicep-extension-publishing.md#decision
| { | ||
| "extensions": { | ||
| "radius": "br:biceptypes.azurecr.io/radius:latest", | ||
| "radiusResources": "br:biceptypes.azurecr.io/radiusresources:latest", |
There was a problem hiding this comment.
would it be possible to contribute upstream to Bicep CLI and ask if we can special-case the "resource not found" error for radius resources? I imagine this will be a common failure case
There was a problem hiding this comment.
could you remind me what error does it return today?
brooke-hamilton
left a comment
There was a problem hiding this comment.
How is the consolidated extension versioned when one of the types has a version update?
|
|
||
| **Disadvantages:** | ||
| - Users need two Radius-related extensions (`radius` and `radiusResources`). Not that bad as we can automatically generate the `radiusResources` entry in `bicepconfig.json` and document it as the extension for all non-core resource types. | ||
|
|
There was a problem hiding this comment.
keeping rrts seperate from core radius schema feels like a better choice to me.
| - **Breaking change for existing users:** Users currently using `extension radiusCompute` / `extension radiusData` / `extension radiusSecurity` in their Bicep files will need to update to `extension radiusResources` for Option 1. This should be communicated in release notes. However, since these types were recently made available as defaults, the user base is likely small. | ||
| - **bicepconfig.json update:** Users will need to update `bicepconfig.json` to remove the old entries. A migration guide or `rad init` update should handle this. | ||
|
|
||
| ## Development plan |
There was a problem hiding this comment.
Note: Assess if publishing types for cloud/non-cloud/lrt functional tests is affected/needs to be updated.
There was a problem hiding this comment.
@lakshmimsft could you say more on this? Do we publish a separate extension for core types instead of using radius extension for tests currently?
There was a problem hiding this comment.
ah I see, good point. It looks like it will need to be updated but not immediately because we don't use any of the default Radius types in our functional tests yet. I'll see if it is possible to include it in the implementation, else we'll have to track it as a follow up when we are adding tests.
There was a problem hiding this comment.
Investigated this and here's the impact:
The both the functional test workflows call make generate-bicep-types, which now includes the contrib types. Two things needed:
yq install -- the contrib types requires yq to parse defaults.yaml. Added an explicit install step to both workflows in #11915, same pattern as verify-resource-types.yaml
No functional test changes are needed once we start using contrib types in the tests since bicepconfig already covers radius extension.
This is the tradeoff of bundling multiple types in one extension :/, we don't have versions tied to one type. Bumping any single type would result into publishing latest tag of the whole extension (in case of radiusResource extension, will have to see how realistic it is to publish combined latest for single radius extension), or we bump the extension version whenever next Radius release happens. |
Signed-off-by: Karishma Chawla <kachawla@microsoft.com>
8731505 to
bed122a
Compare
Signed-off-by: Karishma Chawla <kachawla@microsoft.com>
Radius functional test overviewClick here to see the test run details
Test Status⌛ Building Radius and pushing container images for functional tests... |
…11914) ## Overview Update the existing `generate` subcommand of `manifest-to-bicep` to accept multiple manifest files. When given multiple YAML manifests with the same namespace, their `Types` maps are merged into a single output (`types.json`, `index.json`, `index.md`). This supports per-type manifest files (e.g. `containers.yaml`, `routes.yaml`) as introduced by the [automated resource type registration design](#11911), where each file defines a single resource type within a namespace. Backward compatible: single-file usage works exactly as before. ## Changes - `bicep-tools/cmd/manifest-to-bicep/main.go`: Updated `generate` to accept `<manifest1> [manifest2...] <output>` (last arg is always output dir). Added `mergeManifestFiles()` that validates same namespace and rejects duplicate types. - `bicep-tools/cmd/manifest-to-bicep/main_test.go`: Added tests for single-file, multi-file merge, namespace mismatch, nonexistent file, empty manifest list, and duplicate type detection. - `bicep-tools/cmd/manifest-to-bicep/testdata/`: Added test manifest files for `Radius.Compute` (containers, routes) and `Radius.Security` (secrets). ## Usage Single file (backward compatible): ```bash go run ./bicep-tools/cmd/manifest-to-bicep generate containers.yaml /tmp/out ``` Multiple files (merge into one output): ```bash go run ./bicep-tools/cmd/manifest-to-bicep generate containers.yaml routes.yaml persistentVolumes.yaml /tmp/out ``` ## Test plan - `go test ./bicep-tools/cmd/manifest-to-bicep/` - 6 tests covering single-file generation, multi-file merge, namespace mismatch rejection, nonexistent file handling, empty input, and duplicate type detection. ## Part of Unified Bicep extension publishing (PR 1/4). See [design doc](#11892). ## Dependencies - [Automated default resource type registration](#11911) (provides `defaults.yaml` and per-type manifest files that this command consumes) --------- Signed-off-by: Karishma Chawla <kachawla@microsoft.com>
Description
This design proposes consolidating the per-namespace Bicep extensions for default resource types (radiusCompute, radiusData, radiusSecurity) into a single published extension, and automating the publishing process to stay in sync with the default resource type registration list (defaults.yaml).
Options
Option 1 (proposed): Separate radiusResources extension - Merges contrib namespaces into one extension at br:biceptypes.azurecr.io/radiusresources. Go-only changes, independent pipeline, straightforward automation for both versioned and latest publishing.
Option 2: Merge into existing radius extension - Single extension for everything. Best UX but couples two generation pipelines (TypeScript + Go) and complicates latest publishing from contrib CI.
Key decisions to review
Type of change
Fixes: #issue_number
Contributor checklist
Please verify that the PR meets the following requirements, where applicable:
eng/design-notes/in this repository, if new APIs are being introduced.