feat: Offline licensing support#1436
Conversation
⏱️ Benchmark resultsComparing with 1fdf892
|
| } | ||
|
|
||
| func NewUsageClient(pluginTeam cqapi.PluginTeam, pluginKind cqapi.PluginKind, pluginName cqapi.PluginName, ops ...UsageClientOptions) (*BatchUpdater, error) { | ||
| func NewUsageClient(meta plugin.Meta, ops ...UsageClientOptions) (UsageClient, error) { |
There was a problem hiding this comment.
I agree this signature change is an improvement, but it's technically a breaking change, and we'll have to update all plugins using the premium package. Maybe we should do a v5 release for this?
There was a problem hiding this comment.
NewUsageClient is used only in CQ-authored, effectively private plugins.
There was a problem hiding this comment.
That might be true but we have community plugins that are premium as well. And if they're not using it, they should be
There was a problem hiding this comment.
Specifically the Azure AD, Box and IPInfo plugins are premium community plugins written in Go, and might also need updates. If we want to reach out to those authors I suppose that's also fine
There was a problem hiding this comment.
I don't think that warrants an upgrade of ~7000 lines in the public cq/cq repo.
There was a problem hiding this comment.
Can't we just avoid this by keeping the signature the same? It looks like we can adopt UsageClientOptions for the additional option we need
There was a problem hiding this comment.
Oh I guess the *BatchUpdater return might still be an issue. Well let's at least make a clear note in the changelog that this is a breaking change to the premium package interface, and explain what plugin authors need to do to handle it.
There was a problem hiding this comment.
There are ways to avoid this by shifting the burden to the plugin side, which is not favourable.
There was a problem hiding this comment.
Yeah we don't need to go that far; let's just add an explanation to the changelog
There was a problem hiding this comment.
I've updated the PR desc. Adding a BREAKING-CHANGE there might bump the version, but further edits or suggestions are welcome.
BEGIN_COMMIT_OVERRIDE
feat: Offline licensing support
Includes breaking changes to the
premium.NewUsageClientinterface. Save value ofopts.PluginMetafromConfigure()and pass it topremium.NewUsageClientas the first argument.END_COMMIT_OVERRIDE