chore: add multi-org experiment for UI view toggling (#13260)

* chore: Add multi-org experiment

UI will use to toggle different views
This commit is contained in:
Steven Masley
2024-05-13 13:46:01 -05:00
committed by GitHub
parent ebee9288ae
commit 9ced001570
5 changed files with 25 additions and 8 deletions

9
coderd/apidoc/docs.go generated
View File

@ -9542,15 +9542,18 @@ const docTemplate = `{
"type": "string", "type": "string",
"enum": [ "enum": [
"example", "example",
"auto-fill-parameters" "auto-fill-parameters",
"multi-organization"
], ],
"x-enum-comments": { "x-enum-comments": {
"ExperimentAutoFillParameters": "This should not be taken out of experiments until we have redesigned the feature.", "ExperimentAutoFillParameters": "This should not be taken out of experiments until we have redesigned the feature.",
"ExperimentExample": "This isn't used for anything." "ExperimentExample": "This isn't used for anything.",
"ExperimentMultiOrganization": "Requires organization context for interactions, default org is assumed."
}, },
"x-enum-varnames": [ "x-enum-varnames": [
"ExperimentExample", "ExperimentExample",
"ExperimentAutoFillParameters" "ExperimentAutoFillParameters",
"ExperimentMultiOrganization"
] ]
}, },
"codersdk.ExternalAuth": { "codersdk.ExternalAuth": {

View File

@ -8541,12 +8541,17 @@
}, },
"codersdk.Experiment": { "codersdk.Experiment": {
"type": "string", "type": "string",
"enum": ["example", "auto-fill-parameters"], "enum": ["example", "auto-fill-parameters", "multi-organization"],
"x-enum-comments": { "x-enum-comments": {
"ExperimentAutoFillParameters": "This should not be taken out of experiments until we have redesigned the feature.", "ExperimentAutoFillParameters": "This should not be taken out of experiments until we have redesigned the feature.",
"ExperimentExample": "This isn't used for anything." "ExperimentExample": "This isn't used for anything.",
"ExperimentMultiOrganization": "Requires organization context for interactions, default org is assumed."
}, },
"x-enum-varnames": ["ExperimentExample", "ExperimentAutoFillParameters"] "x-enum-varnames": [
"ExperimentExample",
"ExperimentAutoFillParameters",
"ExperimentMultiOrganization"
]
}, },
"codersdk.ExternalAuth": { "codersdk.ExternalAuth": {
"type": "object", "type": "object",

View File

@ -2217,6 +2217,7 @@ const (
// Add new experiments here! // Add new experiments here!
ExperimentExample Experiment = "example" // This isn't used for anything. ExperimentExample Experiment = "example" // This isn't used for anything.
ExperimentAutoFillParameters Experiment = "auto-fill-parameters" // This should not be taken out of experiments until we have redesigned the feature. ExperimentAutoFillParameters Experiment = "auto-fill-parameters" // This should not be taken out of experiments until we have redesigned the feature.
ExperimentMultiOrganization Experiment = "multi-organization" // Requires organization context for interactions, default org is assumed.
) )
// ExperimentsAll should include all experiments that are safe for // ExperimentsAll should include all experiments that are safe for

1
docs/api/schemas.md generated
View File

@ -2693,6 +2693,7 @@ CreateWorkspaceRequest provides options for creating a new workspace. Only one o
| ---------------------- | | ---------------------- |
| `example` | | `example` |
| `auto-fill-parameters` | | `auto-fill-parameters` |
| `multi-organization` |
## codersdk.ExternalAuth ## codersdk.ExternalAuth

View File

@ -1907,8 +1907,15 @@ export const Entitlements: Entitlement[] = [
]; ];
// From codersdk/deployment.go // From codersdk/deployment.go
export type Experiment = "auto-fill-parameters" | "example"; export type Experiment =
export const Experiments: Experiment[] = ["auto-fill-parameters", "example"]; | "auto-fill-parameters"
| "example"
| "multi-organization";
export const Experiments: Experiment[] = [
"auto-fill-parameters",
"example",
"multi-organization",
];
// From codersdk/deployment.go // From codersdk/deployment.go
export type FeatureName = export type FeatureName =