authzed / spicedb

Open Source, Google Zanzibar-inspired permissions database to enable fine-grained authorization for customer applications
https://authzed.com/docs
Apache License 2.0
4.71k stars 250 forks source link

No debug info / tracing info when maximum depth exceeded (from SpiceDB version v1.27.0) #1927

Closed idan-elgar-deel closed 2 weeks ago

idan-elgar-deel commented 3 weeks ago

What platforms are affected?

others

What architectures are affected?

others

What SpiceDB version are you using?

v1.27.0 and above - No debug info / tracing info when maximum depth exceeded v1.26.0 - Debug info / tracing info exist when maximum depth exceeded

Steps to Reproduce

  1. Use the following schema:
            definition user {
                relation resource: resource;
                permission test = resource->test;
            }
            definition resource {
                relation user: user;
                permission test = user->test;
            }
  2. Add relationships:
    zed relationship touch resource:1 user user:1
    zed relationship touch user:1 resource resource:1
  3. Check for permissions with explain flag:
    zed permission check resource:1 test user:5 --explain

Expected Result

11:06AM INF debugging requested on check
! resource:1 test (42.804084ms)
└── ! user:1 test (41.176917ms)
    └── ! resource:1 test (cycle) (38.891292ms)

11:06AM ERR terminated with errors error="rpc error: code = ResourceExhausted desc = the check request has exceeded the allowable maximum depth of 50: this usually indicates a recursive or too deep data dependency. Try running zed with --explain to see the dependency. See: https://spicedb.dev/d/debug-max-depth-check"

Actual Result

11:08AM INF debugging requested on check
11:08AM WRN No debuging information returned for the check
11:08AM ERR terminated with errors error="rpc error: code = ResourceExhausted desc = the check request has exceeded the allowable maximum depth of 50: this usually indicates a recursive or too deep data dependency. Try running zed with --explain to see the dependency. See: https://spicedb.dev/d/debug-max-depth-check"