rm check_permission and check_relation - #730
Merged
Merged
Conversation
Coverage Report for CI Build 27824820047Coverage increased (+0.1%) to 7.183%Details
Uncovered Changes
Coverage Regressions2 previously-covered lines in 1 file lost coverage.
Coverage Stats
💛 - Coveralls |
There was a problem hiding this comment.
Pull request overview
This PR removes the legacy CheckPermission / CheckRelation surfaces across Topaz (OPA builtins, runtime registration, and CLI test runner) and makes the corresponding Directory v3 Reader RPCs explicitly return Unimplemented, guiding callers to use Check instead.
Changes:
- Removed
ds.check_permission/ds.check_relationOPA builtins and their associated help tests. - Updated Topaz runtime builtin registration and CLI test runner to drop the removed check types.
- Modified Directory v3 Reader
CheckPermission/CheckRelationto returncodes.Unimplementederrors.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| topazd/tests/builtin/builtin_test.go | Removes help/format tests for the deleted ds.check_permission and ds.check_relation builtins. |
| topazd/authorizer/builtins/names.go | Removes builtin name constants for check_permission / check_relation. |
| topazd/authorizer/builtins/ds/check_relation.go | Deletes the obsolete ds.check_relation builtin implementation. |
| topazd/authorizer/builtins/ds/check_permission.go | Deletes the obsolete ds.check_permission builtin implementation. |
| topazd/app/topaz/runtime_resolver.go | Stops registering the removed builtins in the OPA runtime. |
| topaz/cmd/common/testrunner.go | Removes CLI test-runner execution paths for legacy check types. |
| topaz/cmd/common/test.go | Removes check-type enum/string mappings for check_permission / check_relation. |
| internal/eds/pkg/ds/check_relation.go | Removes internal request wrapper/validation for CheckRelation. |
| internal/eds/pkg/ds/check_permission.go | Removes internal request wrapper/validation for CheckPermission. |
| internal/eds/pkg/directory/v3/reader.go | Makes CheckPermission / CheckRelation return Unimplemented; updates grpc metadata usage. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
aserto-bot
approved these changes
Jun 19, 2026
aserto-bot
approved these changes
Jun 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Removing the
CheckPermissionandCheckRelationgRPC and REST implementations, returning unimplemented errors, use theCheckfunction instead.Removing the
ds.check_permissionandds.check_relationbuiltins, use theds.checkbuiltin instead.When converting from
check_relationsimply change to use thecheckfunction, no futher changes are required!!When converting from converting from
check_permission, update to use thecheckfunction and update thepermissionparameter name intorelation.