feat!: hide Coder Tasks behind the enable-ai-tasks flag (#28008)

This commit is contained in:
david-fraley
2026-08-19 14:46:10 -05:00
committed by GitHub
parent a3eb1ee930
commit 8203b2ebaf
85 changed files with 307 additions and 6030 deletions
+4
View File
@@ -1866,6 +1866,10 @@ func DeploymentValues(t testing.TB, mut ...func(*codersdk.DeploymentValues)) *co
opts := cfg.Options()
err := opts.SetDefaults()
require.NoError(t, err)
// Tasks ship disabled. Tests exercise the enabled behavior by default so
// the Tasks suite keeps running; tests for the disabled path opt out
// explicitly via the mutators.
cfg.EnableAITasks = true
for _, fn := range mut {
fn(cfg)
}
+7 -1
View File
@@ -20,7 +20,13 @@ func TestEndpointsDocumented(t *testing.T) {
require.NoError(t, err, "can't parse swagger comments")
require.NotEmpty(t, swaggerComments, "swagger comments must be present")
_, _, api := coderdtest.NewWithAPI(t, nil)
// Coder Tasks has no swagger annotations because it is withdrawn from the
// product, so verify against a deployment where its routes are not
// registered.
values := coderdtest.DeploymentValues(t)
values.EnableAITasks = false
_, _, api := coderdtest.NewWithAPI(t, &coderdtest.Options{DeploymentValues: values})
coderdtest.VerifySwaggerDefinitions(t, api.APIHandler, swaggerComments, coderdtest.WithSwaggerRoutePrefix("/api/v2"))
}