Skip to content

Commit 8548304

Browse files
authored
feat: enable expiration support by default in MCP server (#618)
Signed-off-by: ivanauth <ivan@authzed.com>
1 parent ec981d0 commit 8548304

2 files changed

Lines changed: 20 additions & 13 deletions

File tree

.github/workflows/build-test.yaml

Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -74,16 +74,21 @@ jobs:
7474
- name: "Run WASM Tests"
7575
# There's a whole bunch of vars in the environment that aren't needed for running this test, so we clear them out.
7676
# NOTE: if you need to do this in the future, I recommend bashing into the container and running `env | sort | less`
77-
run: |-
78-
GOOS=js \
79-
GOARCH=wasm \
80-
cleanenv \
81-
-remove-prefix GITHUB_ \
82-
-remove-prefix ANDROID_ \
83-
-remove-prefix JAVA_ \
84-
-remove-prefix DOTNET_ \
85-
-remove-prefix RUNNER_ \
86-
-remove-prefix HOMEBREW_ \
87-
-remove-prefix runner_ \
88-
-- \
89-
go test ./pkg/wasm/... -exec $(go env GOPATH)/bin/wasmbrowsertest
77+
# NOTE: wasmbrowsertest can have flaky websocket timeouts, so we retry up to 3 times
78+
uses: "nick-fields/retry@v3"
79+
with:
80+
max_attempts: 3
81+
timeout_minutes: 5
82+
command: |-
83+
GOOS=js \
84+
GOARCH=wasm \
85+
cleanenv \
86+
-remove-prefix GITHUB_ \
87+
-remove-prefix ANDROID_ \
88+
-remove-prefix JAVA_ \
89+
-remove-prefix DOTNET_ \
90+
-remove-prefix RUNNER_ \
91+
-remove-prefix HOMEBREW_ \
92+
-remove-prefix runner_ \
93+
-- \
94+
go test ./pkg/wasm/... -exec $(go env GOPATH)/bin/wasmbrowsertest

internal/mcp/mcp.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1129,6 +1129,8 @@ func newSpiceDBServer(ctx context.Context) (server.RunnableServer, error) {
11291129
server.WithNamespaceCacheConfig(server.CacheConfig{Enabled: false, Metrics: false}),
11301130
server.WithClusterDispatchCacheConfig(server.CacheConfig{Enabled: false, Metrics: false}),
11311131
server.WithDatastore(ds),
1132+
// enable expiration support for relationships
1133+
server.WithEnableRelationshipExpiration(true),
11321134
}
11331135

11341136
return server.NewConfigWithOptionsAndDefaults(configOpts...).Complete(ctx)

0 commit comments

Comments
 (0)