mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
fix: do not warn on valid known experiments (#18514)
Fixes https://github.com/coder/coder/issues/18024 * drive-by: renames `handleExperimentsSafe` to `handleExperimentsAvailable` to better match semantics * defines list of `codersdk.ExperimentsKnown` and updates `ReadExperiments` to log on invalid experiments * typescript-ignores `codersdk.Experiments` so apitypings generates a valid enum list of possible values of experiment * updates OverviewPageView to distinguish between known 'hidden' experiments and unknown 'invalid' experiments
This commit is contained in:
@@ -3372,6 +3372,18 @@ const (
|
||||
ExperimentAITasks Experiment = "ai-tasks" // Enables the new AI tasks feature.
|
||||
)
|
||||
|
||||
// ExperimentsKnown should include all experiments defined above.
|
||||
var ExperimentsKnown = Experiments{
|
||||
ExperimentExample,
|
||||
ExperimentAutoFillParameters,
|
||||
ExperimentNotifications,
|
||||
ExperimentWorkspaceUsage,
|
||||
ExperimentWebPush,
|
||||
ExperimentWorkspacePrebuilds,
|
||||
ExperimentAgenticChat,
|
||||
ExperimentAITasks,
|
||||
}
|
||||
|
||||
// ExperimentsSafe should include all experiments that are safe for
|
||||
// users to opt-in to via --experimental='*'.
|
||||
// Experiments that are not ready for consumption by all users should
|
||||
@@ -3384,6 +3396,9 @@ var ExperimentsSafe = Experiments{
|
||||
// Multiple experiments may be enabled at the same time.
|
||||
// Experiments are not safe for production use, and are not guaranteed to
|
||||
// be backwards compatible. They may be removed or renamed at any time.
|
||||
// The below typescript-ignore annotation allows our typescript generator
|
||||
// to generate an enum list, which is used in the frontend.
|
||||
// @typescript-ignore Experiments
|
||||
type Experiments []Experiment
|
||||
|
||||
// Returns a list of experiments that are enabled for the deployment.
|
||||
|
||||
Reference in New Issue
Block a user