-
Notifications
You must be signed in to change notification settings - Fork 278
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
Remove LookupResources v1 implementation #2099
Changes from all commits
14f9fcc
1e4e2fa
2a3fd5d
c1be764
357741b
83e0448
ada2c56
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -637,11 +637,10 @@ func TestLookupResources(t *testing.T) { | |
memdb.DisableGC, | ||
true, | ||
testserver.ServerConfig{ | ||
MaxUpdatesPerWrite: 1000, | ||
MaxPreconditionsCount: 1000, | ||
StreamingAPITimeout: 30 * time.Second, | ||
MaxRelationshipContextSize: 25000, | ||
UseExperimentalLookupResources2: useV2, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There's a bunch of changes like this that are just propagating the option removal. |
||
MaxUpdatesPerWrite: 1000, | ||
MaxPreconditionsCount: 1000, | ||
StreamingAPITimeout: 30 * time.Second, | ||
MaxRelationshipContextSize: 25000, | ||
}, | ||
tf.StandardDatastoreWithData, | ||
) | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,6 +8,7 @@ import ( | |
"github.com/fatih/color" | ||
"github.com/jzelinskie/cobrautil/v2" | ||
"github.com/jzelinskie/cobrautil/v2/cobraotel" | ||
"github.com/rs/zerolog/log" | ||
"github.com/spf13/cobra" | ||
|
||
"github.com/authzed/spicedb/internal/telemetry" | ||
|
@@ -159,6 +160,15 @@ func RegisterServeFlags(cmd *cobra.Command, config *server.Config) error { | |
experimentalFlags := nfs.FlagSet(BoldBlue("Experimental")) | ||
// Flags for experimental features | ||
experimentalFlags.BoolVar(&config.EnableExperimentalLookupResources, "enable-experimental-lookup-resources", true, "enables the experimental version of the lookup resources API") | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. don't remove, as it will break callers. Instead, deprecate it and if someone gives a value of |
||
if err := experimentalFlags.MarkDeprecated("enable-experimental-lookup-resources", "The old implementation of LookupResources has been removed and this flag is a no-op. This flag will be removed in the future."); err != nil { | ||
return fmt.Errorf("failed to mark flag as deprecated: %w", err) | ||
} | ||
if !config.EnableExperimentalLookupResources { | ||
log.Warn(). | ||
Bool("value", false). | ||
Msg("The old implementation of LookupResources is no longer available, and a `false` value is no longer valid. Please remove this flag.") | ||
} | ||
|
||
experimentalFlags.BoolVar(&config.EnableExperimentalWatchableSchemaCache, "enable-experimental-watchable-schema-cache", false, "enables the experimental schema cache which makes use of the Watch API for automatic updates") | ||
// TODO: these two could reasonably be put in either the Dispatch group or the Experimental group. Is there a preference? | ||
experimentalFlags.StringToStringVar(&config.DispatchSecondaryUpstreamAddrs, "experimental-dispatch-secondary-upstream-addrs", nil, "secondary upstream addresses for dispatches, each with a name") | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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.
keep the cursor flag; we might need it again in the future and we don't want to break existing cursors. we should just return an error if the cursor does not have it
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 see this change reverted