- Notifications
You must be signed in to change notification settings - Fork1k
chore: add enterprise feature for aibridge#19976
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Changes fromall commits
File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -16,6 +16,7 @@ import ( | ||
"github.com/coder/coder/v2/coderd/database/dbtime" | ||
"github.com/coder/coder/v2/codersdk" | ||
"github.com/coder/coder/v2/enterprise/coderd/coderdenttest" | ||
"github.com/coder/coder/v2/enterprise/coderd/license" | ||
"github.com/coder/coder/v2/testutil" | ||
) | ||
@@ -31,6 +32,11 @@ func TestAIBridgeListInterceptions(t *testing.T) { | ||
Options:&coderdtest.Options{ | ||
DeploymentValues:dv, | ||
}, | ||
LicenseOptions:&coderdenttest.LicenseOptions{ | ||
Features: license.Features{ | ||
codersdk.FeatureAIBridge:1, | ||
}, | ||
}, | ||
}) | ||
memberClient,member:=coderdtest.CreateAnotherUser(t,client,owner.OrganizationID) | ||
now:=dbtime.Now() | ||
@@ -77,6 +83,11 @@ func TestAIBridgeListInterceptions(t *testing.T) { | ||
Options:&coderdtest.Options{ | ||
DeploymentValues:dv, | ||
}, | ||
LicenseOptions:&coderdenttest.LicenseOptions{ | ||
deansheather marked this conversation as resolved. Show resolvedHide resolvedUh oh!There was an error while loading.Please reload this page. | ||
Features: license.Features{ | ||
codersdk.FeatureAIBridge:1, | ||
}, | ||
}, | ||
}) | ||
memberClient,member:=coderdtest.CreateAnotherUser(t,client,owner.OrganizationID) | ||
@@ -158,6 +169,11 @@ func TestAIBridgeListInterceptions(t *testing.T) { | ||
Options:&coderdtest.Options{ | ||
DeploymentValues:dv, | ||
}, | ||
LicenseOptions:&coderdenttest.LicenseOptions{ | ||
Features: license.Features{ | ||
codersdk.FeatureAIBridge:1, | ||
}, | ||
}, | ||
}) | ||
memberClient,member:=coderdtest.CreateAnotherUser(t,client,owner.OrganizationID) | ||
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -148,8 +148,12 @@ func (r *RootCmd) Server(_ func()) *serpent.Command { | ||
experiments:=agplcoderd.ReadExperiments(options.Logger,options.DeploymentValues.Experiments.Value()) | ||
// In-memory aibridge daemon. | ||
// TODO(@deansheather): the lifecycle of the aibridged server is | ||
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. Can you add an issue for this rather, please? 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. | ||
// probably better managed by the enterprise API type itself. Managing | ||
// it in the API type means we can avoid starting it up when the license | ||
// is not entitled to the feature. | ||
varaibridgeDaemon*aibridged.Server | ||
ifoptions.DeploymentValues.AI.BridgeConfig.Enabled { | ||
ifexperiments.Enabled(codersdk.ExperimentAIBridge) { | ||
aibridgeDaemon,err=newAIBridgeDaemon(api) | ||
Some generated files are not rendered by default. Learn more abouthow customized files appear on GitHub.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.