Skip to content

Adding design for automatically registering core RRTs - #11610

Merged
kachawla merged 11 commits into
radius-project:mainfrom
kachawla:rrt-auto-registration
May 18, 2026
Merged

kachawla merged 11 commits into
radius-project:mainfrom
kachawla:rrt-auto-registration

Conversation

@kachawla

@kachawla kachawla commented Apr 8, 2026 •

Copy link
Copy Markdown
Member

Description

Certain resource types defined in the resource-types-contrib repo are expected to be registered with Radius by default for every installation. The way we enable it today is by manually copying over the manifests into Radius repo and maintaining duplicate files. This design automates propagating the changes to the Radius repo.

Type of change

Fixes: #11108

Contributor checklist

Please verify that the PR meets the following requirements, where applicable:

  • An overview of proposed schema changes is included in a linked GitHub issue.
    • Yes
    • Not applicable
  • A design document PR is created in the design-notes repository, if new APIs are being introduced.
    • Yes
    • Not applicable
  • The design document has been reviewed and approved by Radius maintainers/approvers.
    • Yes
    • Not applicable
  • A PR for the samples repository is created, if existing samples are affected by the changes in this PR.
    • Yes
    • Not applicable
  • A PR for the documentation repository is created, if the changes in this PR affect the documentation or any user facing updates are made.
    • Yes
    • Not applicable
  • A PR for the recipes repository is created, if existing recipes are affected by the changes in this PR.
    • Yes
    • Not applicable

Copilot AI review requested due to automatic review settings April 8, 2026 18:33
@kachawla
kachawla requested review from a team as code owners April 8, 2026 18:33
@kachawla
kachawla force-pushed the rrt-auto-registration branch from f165ae2 to 4177f2d Compare April 8, 2026 18:34

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.

Pull request overview

Adds a design note proposing automated default registration of Radius resource types by embedding selected manifests from resource-types-contrib into the Radius binary and registering them during UCP initialization.

Changes:

  • Introduces a design for using resource-types-contrib as a Go module dependency and embedding default manifests via go:embed.
  • Proposes a centralized defaults.yaml + go generate workflow to control which manifests ship as defaults.
  • Describes initializer/runtime behavior, error handling, and a test/CI validation plan for generated embed lists.

@kachawla
kachawla marked this pull request as draft April 8, 2026 18:42
@codecov

codecov Bot commented Apr 8, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 51.38%. Comparing base (9b812b3) to head (4177f2d).

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #11610   +/-   ##
=======================================
  Coverage   51.38%   51.38%           
=======================================
  Files         699      699           
  Lines       44114    44114           
=======================================
  Hits        22666    22666           
  Misses      19279    19279           
  Partials     2169     2169           

☔ View full report in Codecov by Sentry.
📢 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.

@kachawla
kachawla force-pushed the rrt-auto-registration branch 2 times, most recently from 06da8d4 to 369e713 Compare April 30, 2026 18:02
@kachawla
kachawla requested a review from Copilot April 30, 2026 18:04
@kachawla
kachawla force-pushed the rrt-auto-registration branch from 369e713 to 9262bfb Compare April 30, 2026 18:07

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.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 2 comments.

@kachawla
kachawla marked this pull request as ready for review April 30, 2026 18:08

@brooke-hamilton brooke-hamilton left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

🚀 I really like how this proposal sets up resource-types-contrib as a clear dependency of Radius via a Golang module dependecy.

@kachawla kachawla added the pr:standard Ongoing maintenance, minor improvements, documentation updates, and routine development work label May 4, 2026
kachawla added 3 commits May 13, 2026 18:15
Signed-off-by: Karishma Chawla <kachawla@microsoft.com>
Signed-off-by: Karishma Chawla <kachawla@microsoft.com>
Signed-off-by: Karishma Chawla <kachawla@microsoft.com>
@kachawla
kachawla force-pushed the rrt-auto-registration branch from c834f40 to 735706a Compare May 14, 2026 01:16
Signed-off-by: Karishma Chawla <kachawla@microsoft.com>
kachawla added 5 commits May 14, 2026 23:28
Signed-off-by: Karishma Chawla <kachawla@microsoft.com>
- Add doc.go and pkg/resourcetypescontrib/import.go to implementation details
- Remove postgreSqlDatabases from defaults.yaml examples
- Add radius_data.yaml to removed files list
- Update file paths to show {dev,self-hosted}/ subdirectories
- Replace go get -u with go get MODULE@latest
- Fix Security section to describe copy-based approach (not embedded/compiled)
- Update sync-resource-types example to show stale file cleanup
- Update Test plan with actual test name and mark upgrade test as follow-up
- Update Development plan with all implementation details

Signed-off-by: Karishma Chawla <kachawla@microsoft.com>
Signed-off-by: Karishma Chawla <kachawla@microsoft.com>
@kachawla

kachawla commented May 18, 2026 •

Copy link
Copy Markdown
Member Author

After speaking with @ryanwaite, we have decided to go with the alternative approach 1 from the design. defaults.yaml will be in the Radius repo instead of the proposed approach of keeping defaults.yaml in resource-types-contrib.

What this means:

  • defaults.yaml will live in the radius repo under manifest
  • A Makefile target reads defaults.yaml, downloads the pinned version of resource-types-contrib from the Go module cache, and copies the listed files into built-in-providers
  • The copied YAML files are committed to the radius repo after PR review and registered at startup by the existing RegisterDirectory function
  • resource-types-contrib remains a plain Go module with manifest YAML files

Why we chose Alternative approach 1 over the proposed approach:

  • Radius maintainers have direct control over which resource types ship as defaults
  • Full content visibility in Radius PRs (the actual YAML files are in the diff, not hidden behind a go.mod version bump)

Tradeoffs we're accepting:

  • Adding a new default requires changes in both repos
  • Risk of drift if the copy script is not re-run after dependency updates (mitigated by CI validation)

@kachawla

Copy link
Copy Markdown
Member Author

@kachawla
kachawla requested a review from brooke-hamilton May 18, 2026 16:40
@kachawla
kachawla merged commit 72a582d into radius-project:main May 18, 2026
43 checks passed
Reshrahim pushed a commit to Reshrahim/radius that referenced this pull request Jun 15, 2026
…#11610)

# Description

Certain resource types defined in the resource-types-contrib repo are
expected to be registered with Radius by default for every installation.
The way we enable it today is by manually copying over the manifests
into Radius repo and maintaining duplicate files. This design automates
propagating the changes to the Radius repo.

## Type of change

Fixes: radius-project#11108

## Contributor checklist
Please verify that the PR meets the following requirements, where
applicable:

<!--
This checklist uses "TaskRadio" comments to make certain options
mutually exclusive.
See:
https://github.com/mheap/require-checklist-action?tab=readme-ov-file#radio-groups
For details on how this works and why it's required.
-->

- An overview of proposed schema changes is included in a linked GitHub
issue.
    - [ ] Yes <!-- TaskRadio schema -->
    - [x] Not applicable <!-- TaskRadio schema -->
- A design document PR is created in the [design-notes
repository](https://github.com/radius-project/design-notes/), if new
APIs are being introduced.
    - [x] Yes <!-- TaskRadio design-pr -->
    - [ ] Not applicable <!-- TaskRadio design-pr -->
- The design document has been reviewed and approved by Radius
maintainers/approvers.
    - [ ] Yes <!-- TaskRadio design-review -->
    - [x] Not applicable <!-- TaskRadio design-review -->
- A PR for the [samples
repository](https://github.com/radius-project/samples) is created, if
existing samples are affected by the changes in this PR.
    - [ ] Yes <!-- TaskRadio samples-pr -->
    - [x] Not applicable <!-- TaskRadio samples-pr -->
- A PR for the [documentation
repository](https://github.com/radius-project/docs) is created, if the
changes in this PR affect the documentation or any user facing updates
are made.
    - [ ] Yes <!-- TaskRadio docs-pr -->
    - [x] Not applicable <!-- TaskRadio docs-pr -->
- A PR for the [recipes
repository](https://github.com/radius-project/recipes) is created, if
existing recipes are affected by the changes in this PR.
    - [ ] Yes <!-- TaskRadio recipes-pr -->
    - [x] Not applicable <!-- TaskRadio recipes-pr -->

---------

Signed-off-by: Karishma Chawla <kachawla@microsoft.com>
Co-authored-by: Nicole James <101607760+nicolejms@users.noreply.github.com>
Co-authored-by: Dariusz Porowski <3431813+DariuszPorowski@users.noreply.github.com>
Signed-off-by: Reshma Abdul Rahim <reshmarahim.abdul@microsoft.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr:standard Ongoing maintenance, minor improvements, documentation updates, and routine development work

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Design] Automatically sync default resource manifests from resoure-type-contrib repo