Skip to content

refactor(api)!: drop the removed permission namespace and name fields - #1897

Merged
whoAbhishekSah merged 2 commits into
mainfrom
refactor/remove-deprecated-permission-proto-fields
Aug 25, 2026
Merged

refactor(api)!: drop the removed permission namespace and name fields#1897
whoAbhishekSah merged 2 commits into
mainfrom
refactor/remove-deprecated-permission-proto-fields

Conversation

@whoAbhishekSah

Copy link
Copy Markdown
Member

Summary

Final step of #1782 for the permission APIs. The deprecated namespace/name fields are deleted from the Permission message and PermissionRequestBody in proton (raystack/proton#500, numbers and names reserved), so key (service.resource.verb) is the only way a permission's identity travels on the wire in either direction. This lands the regenerated protos and stops populating the two response fields.

Depends on raystack/proton#500. The PROTON_COMMIT pin currently points at that PR's head commit; I'll move it to the proton main commit once it merges.

Why this is safe for clients

Changes

  • Makefile: bump PROTON_COMMIT; the regen also picks up the CheckOrganizationDelete RPC definition recently added on proton main — the handler embeds the generated unimplemented fallback, so that endpoint answers unimplemented until its implementation (feat(deleter): clear or report org delete blockers up front #1857) lands.
  • proto/: regenerated.
  • internal/api/v1beta1connect/permission.go: transformPermissionToPB no longer sets Name/Namespace; the key round-trip guard stays.
  • internal/api/v1beta1connect/permission_test.go: expectations are key-only; the two "deprecated fields sent without key" cases are gone since the fields no longer exist.

Test Plan

  • go build ./... and go vet ./... (including regression,e2e tags) pass
  • go test ./internal/api/v1beta1connect/... passes
  • golangci-lint run internal/api/v1beta1connect/... — 0 issues
  • Full go test ./... — only the Docker-backed postgres/e2e suites fail locally (Docker not running); CI runs them
  • CI regression + smoke green

🤖 Generated with Claude Code

@vercel

vercel Bot commented Aug 20, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
frontier Ready Ready Preview Aug 25, 2026 6:59am

@coderabbitai

coderabbitai Bot commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Summary by CodeRabbit

  • Bug Fixes

    • Permission API responses now use validated permission keys consistently.
    • Create, update, list, and get responses no longer rely on deprecated name and namespace fields.
  • Chores

    • Updated an internal dependency version to support ongoing compatibility and maintenance.

Walkthrough

Permission API tests no longer expect deprecated Name and Namespace fields. The permission key validation comment is clearer, with no executable change. The Makefile pins Proton to a different commit.

Changes

Permission response cleanup

Layer / File(s) Summary
Permission API response expectations
internal/api/v1beta1connect/permission.go, internal/api/v1beta1connect/permission_test.go
Tests for create, update, list, and get now validate Id, Key, and timestamps without deprecated fields. Invalid requests using deprecated fields without a key are no longer tested. The key validation comment is more explicit.

Proton dependency pin

Layer / File(s) Summary
Proton commit pin
Makefile
PROTON_COMMIT is updated to a different Proton commit.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: 🔵 Low · up to 8321f

This change removes deprecated permission fields from the API contract, so it should be published with a minor version bump and release-note entry. The code is otherwise mergeable, with explicit owner follow-up needed for release handling.

Suggested reviewers: amangit07

🚥 Pre-merge checks | ✅ 2
✅ Passed checks (2 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches 💡 1
⚔️ Resolve merge conflicts 💡
  • Resolve merge conflict in branch refactor/remove-deprecated-permission-proto-fields

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coveralls

coveralls commented Aug 20, 2026

Copy link
Copy Markdown

Coverage Report for CI Build 32819377341

Coverage decreased (-0.002%) to 49.129%

Details

  • Coverage decreased (-0.002%) from the base build.
  • Patch coverage: No coverable lines changed in this PR.
  • No coverage regressions found.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

No coverage regressions found.


Coverage Stats

Coverage Status
Relevant Lines: 40520
Covered Lines: 19907
Line Coverage: 49.13%
Coverage Strength: 15.7 hits per line

💛 - Coveralls

@coderabbitai coderabbitai Bot 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.

Actionable comments posted: 1


ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: f9c61842-ace1-4a8a-8307-91188d5cc6ba

📥 Commits

Reviewing files that changed from the base of the PR and between db2730d and 8321fdf.

📒 Files selected for processing (2)
  • Makefile
  • internal/api/v1beta1connect/permission.go
🚧 Files skipped from review as they are similar to previous changes (1)
  • internal/api/v1beta1connect/permission.go

Included review availability: Your plan provides up to 2 included reviews per hour; 1 remains after this review.

Comment thread Makefile
whoAbhishekSah and others added 2 commits August 25, 2026 12:27
Bump the proton pin to pull in the proto change that deletes the
deprecated namespace and name fields from the Permission message and
PermissionRequestBody (their numbers and names are now reserved), and
regenerate the vendored protos. Responses carry the permission identity
only in key, so transformPermissionToPB no longer populates the two
fields and the handler tests assert key-only payloads.

The pin bump also picks up the CheckOrganizationDelete RPC definition
added on proton main; the handler embeds the generated unimplemented
fallback, so that endpoint answers unimplemented until its
implementation lands.

Part of #1782.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@whoAbhishekSah
whoAbhishekSah force-pushed the refactor/remove-deprecated-permission-proto-fields branch from 8321fdf to 3913ddd Compare August 25, 2026 06:58
@whoAbhishekSah
whoAbhishekSah merged commit c6c57cf into main Aug 25, 2026
8 checks passed
@whoAbhishekSah
whoAbhishekSah deleted the refactor/remove-deprecated-permission-proto-fields branch August 25, 2026 07:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants