chore: move vscode local out of experiments (#5773)

We've been dogfooding the VS Code extension for a while,
and it seems stable enough that it's overall positive
to release!
This commit is contained in:
Kyle Carberry
2023-01-20 04:32:59 +00:00
committed by GitHub
parent b91b4533d8
commit 546a8931aa
10 changed files with 20 additions and 56 deletions
+1 -10
View File
@@ -408,7 +408,7 @@ const docTemplate = `{
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/codersdk.Experiment"
"type": "string"
}
}
}
@@ -6119,15 +6119,6 @@ const docTemplate = `{
}
}
},
"codersdk.Experiment": {
"type": "string",
"enum": [
"vscode_local"
],
"x-enum-varnames": [
"ExperimentVSCodeLocal"
]
},
"codersdk.Feature": {
"type": "object",
"properties": {
+1 -6
View File
@@ -346,7 +346,7 @@
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/codersdk.Experiment"
"type": "string"
}
}
}
@@ -5464,11 +5464,6 @@
}
}
},
"codersdk.Experiment": {
"type": "string",
"enum": ["vscode_local"],
"x-enum-varnames": ["ExperimentVSCodeLocal"]
},
"codersdk.Feature": {
"type": "object",
"properties": {
-1
View File
@@ -29,7 +29,6 @@ func Test_Experiments(t *testing.T) {
require.NoError(t, err)
require.NotNil(t, experiments)
require.Empty(t, experiments)
require.False(t, experiments.Enabled(codersdk.ExperimentVSCodeLocal))
require.False(t, experiments.Enabled("foo"))
})
+3 -6
View File
@@ -9,9 +9,8 @@ import (
type Experiment string
const (
// ExperimentVSCodeLocal enables a workspace button to launch VSCode
// and connect using the local VSCode extension.
ExperimentVSCodeLocal Experiment = "vscode_local"
// Add new experiments here!
// ExperimentExample Experiment = "example"
)
var (
@@ -19,9 +18,7 @@ var (
// users to opt-in to via --experimental='*'.
// Experiments that are not ready for consumption by all users should
// not be included here and will be essentially hidden.
ExperimentsAll = Experiments{
ExperimentVSCodeLocal,
}
ExperimentsAll = Experiments{}
)
// Experiments is a list of experiments that are enabled for the deployment.
+4 -10
View File
@@ -1072,23 +1072,17 @@ curl -X GET http://coder-server:8080/api/v2/experiments \
> 200 Response
```json
["vscode_local"]
["string"]
```
### Responses
| Status | Meaning | Description | Schema |
| ------ | ------------------------------------------------------- | ----------- | ------------------------------------------------------------- |
| 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | OK | array of [codersdk.Experiment](schemas.md#codersdkexperiment) |
| Status | Meaning | Description | Schema |
| ------ | ------------------------------------------------------- | ----------- | --------------- |
| 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | OK | array of string |
<h3 id="get-experiments-responseschema">Response Schema</h3>
Status Code **200**
| Name | Type | Required | Restrictions | Description |
| -------------- | ----- | -------- | ------------ | ----------- |
| `[array item]` | array | false | | |
To perform this operation, you must be authenticated. [Learn more](authentication.md).
## Update check
-14
View File
@@ -2427,20 +2427,6 @@ CreateParameterRequest is a structure used to create a new parameter value for a
| `trial` | boolean | false | | |
| `warnings` | array of string | false | | |
## codersdk.Experiment
```json
"vscode_local"
```
### Properties
#### Enumerated Values
| Value |
| -------------- |
| `vscode_local` |
## codersdk.Feature
```json
+6 -1
View File
@@ -223,8 +223,13 @@ func (g *Generator) generateAll() (*TypescriptTypes, error) {
sort.Strings(values)
var s strings.Builder
_, _ = s.WriteString(g.posLine(v))
joined := strings.Join(values, " | ")
if joined == "" {
// It's possible an enum has no values.
joined = "never"
}
_, _ = s.WriteString(fmt.Sprintf("export type %s = %s\n",
name, strings.Join(values, " | "),
name, joined,
))
var pluralName string
+2 -2
View File
@@ -1092,8 +1092,8 @@ export const Entitlements: Entitlement[] = [
]
// From codersdk/experiments.go
export type Experiment = "vscode_local"
export const Experiments: Experiment[] = ["vscode_local"]
export type Experiment = never
export const Experiments: Experiment[] = []
// From codersdk/features.go
export type FeatureName =
@@ -40,7 +40,7 @@ export const WorkspaceReadyPage = ({
const [_, bannerSend] = useActor(
workspaceState.children["scheduleBannerMachine"],
)
const { buildInfo, experiments } = useDashboard()
const { buildInfo } = useDashboard()
const featureVisibility = useFeatureVisibility()
const {
workspace,
@@ -115,10 +115,7 @@ export const WorkspaceReadyPage = ({
builds={builds}
canUpdateWorkspace={canUpdateWorkspace}
hideSSHButton={featureVisibility["browser_only"]}
hideVSCodeDesktopButton={
!experiments.includes("vscode_local") ||
featureVisibility["browser_only"]
}
hideVSCodeDesktopButton={featureVisibility["browser_only"]}
workspaceErrors={{
[WorkspaceErrors.GET_RESOURCES_ERROR]: refreshWorkspaceWarning,
[WorkspaceErrors.GET_BUILDS_ERROR]: getBuildsError,
+1 -1
View File
@@ -982,7 +982,7 @@ export const MockEntitlementsWithAuditLog: TypesGen.Entitlements = {
}),
}
export const MockExperiments: TypesGen.Experiment[] = ["vscode_local"]
export const MockExperiments: TypesGen.Experiment[] = []
export const MockAuditLog: TypesGen.AuditLog = {
id: "fbd2116a-8961-4954-87ae-e4575bd29ce0",