-
Notifications
You must be signed in to change notification settings - Fork 39
feat: enable expiration support by default in MCP server #618
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
feat: enable expiration support by default in MCP server #618
Conversation
Signed-off-by: ivanauth <ivan@authzed.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #618 +/- ##
=======================================
Coverage 42.48% 42.48%
=======================================
Files 38 38
Lines 5030 5030
=======================================
Hits 2137 2137
Misses 2638 2638
Partials 255 255 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Signed-off-by: ivanauth <ivan@authzed.com>
The test TestConcurrentBatchWhenOneBatchFailsAndWorkersIsOne was flaky because there was a race between the semaphore release and errgroup's context cancellation. When a batch failed, it would release the semaphore (via defer) before errgroup cancelled the context, allowing the next iteration's sem.Acquire to succeed and execute an additional batch. Fix this by using an atomic.Bool flag that is set immediately when a batch returns an error. The main loop checks this flag after acquiring the semaphore, ensuring no new batches are launched after a failure.
c038a45 to
14cb05f
Compare
tstirrat15
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
| # NOTE: wasmbrowsertest can have flaky websocket timeouts, so we retry up to 3 times | ||
| uses: "nick-fields/retry@v3" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't like that we need this but this seems like a sane approach.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, agreed - not ideal. The wasmbrowsertest websocket connections just time out randomly in CI, and we've had a few runs fail because of it. Figured a retry with a timeout cap was the least invasive way to stop it from blocking PRs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why was this refactor necessary?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good call - dropped it from this PR. I think it's a real race but low impact, I'll submit it separately if we want it.
…workers=1" This reverts commit 14cb05f.
Description
Fixes #578. The built-in SpiceDB server in the MCP server did not have expiration support enabled by default, preventing users from using expirations in their schemas.
Changes
server.WithEnableRelationshipExpiration(true)to the MCP server configurationTesting