fix(core): make namespacing registered resources optional#785
fix(core): make namespacing registered resources optional#785alkalescent merged 2 commits intomainfrom
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughMake the Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Code Review
This pull request makes the namespace flag optional for registered resources and updates the CLI to display the namespace FQN in the output for create, get, list, update, and delete commands. It also includes corresponding documentation updates, new E2E tests for un-namespaced resources, and a dependency update for the platform protocol. The review feedback highlights several critical instances where the code lacks nil-checks for the namespace object, which will lead to application panics when processing resources that do not have a namespace assigned.
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@e2e/registered-resources.bats`:
- Around line 83-94: The current test uses refute_line --regexp
"Namespace.*https://$NS_NAME" which only ensures the namespace isn't that URL;
update the assertion after run_otdfctl_reg_res create (the block with
assert_output/assert_line checks and before extracting created_id) to explicitly
assert that the "Namespace" field is empty (e.g., replace the existing
refute_line with an assertion that matches a blank/empty Namespace value),
keeping the rest of the flow (run_otdfctl_reg_res create, created_id extraction,
and run_otdfctl_reg_res delete) unchanged.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: b054ad25-7c5d-4da4-a5cc-2b2b067b2948
⛔ Files ignored due to path filters (1)
go.sumis excluded by!**/*.sum
📒 Files selected for processing (4)
cmd/policy/registeredResources.godocs/man/policy/registered-resources/create.mde2e/registered-resources.batsgo.mod
💤 Files with no reviewable changes (1)
- docs/man/policy/registered-resources/create.md
X-Test Failure Report✅ go-v0.9.0 |
🤖 I have created a release *beep* *boop* --- ## [0.30.0](v0.29.0...v0.30.0) (2026-03-31) ### Features * **core:** Add optional namespace flag for subject mappings and condtion sets ([#779](#779)) ([9e849c4](9e849c4)) * **core:** add scope support for client creds ([#752](#752)) ([9ca9e43](9ca9e43)) * **core:** migrate registered resources ([#772](#772)) ([2b49a7d](2b49a7d)) * **core:** optional namespace in actions commands and re-enable actions/RR tests ([#775](#775)) ([29a2eb1](29a2eb1)) * **core:** support namespaced registered resources ([#767](#767)) ([4d786b5](4d786b5)) ### Bug Fixes * **ci:** Temporarily skip namespaced-actions impacted BATS cases ([#773](#773)) ([633728a](633728a)) * **core:** bump toolchain to go 1.24.13 ([#747](#747)) ([6804b93](6804b93)) * **core:** disable RR E2E tests ([#768](#768)) ([0821b8c](0821b8c)) * **core:** make namespacing registered resources optional ([#785](#785)) ([8e6eb31](8e6eb31)) * **core:** refactor `ListAttributesValues` to use `Get` ([#769](#769)) ([a82f7b7](a82f7b7)) * **core:** unsafe update result output values order ([#759](#759)) ([baeba0f](baeba0f)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: opentdf-automation[bot] <149537512+opentdf-automation[bot]@users.noreply.github.com>
We made namespacing registered resources required. These were breaking changes, and now namespacing registered resources is optional.
Summary by CodeRabbit
New Features
Documentation
--namespacefor resource creation is documented as optional.Tests
Chores