mirror of https://github.com/coder/coder.git
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:
parent
b91b4533d8
commit
546a8931aa
|
@ -408,7 +408,7 @@ const docTemplate = `{
|
||||||
"schema": {
|
"schema": {
|
||||||
"type": "array",
|
"type": "array",
|
||||||
"items": {
|
"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": {
|
"codersdk.Feature": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
|
|
|
@ -346,7 +346,7 @@
|
||||||
"schema": {
|
"schema": {
|
||||||
"type": "array",
|
"type": "array",
|
||||||
"items": {
|
"items": {
|
||||||
"$ref": "#/definitions/codersdk.Experiment"
|
"type": "string"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -5464,11 +5464,6 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"codersdk.Experiment": {
|
|
||||||
"type": "string",
|
|
||||||
"enum": ["vscode_local"],
|
|
||||||
"x-enum-varnames": ["ExperimentVSCodeLocal"]
|
|
||||||
},
|
|
||||||
"codersdk.Feature": {
|
"codersdk.Feature": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
|
|
|
@ -29,7 +29,6 @@ func Test_Experiments(t *testing.T) {
|
||||||
require.NoError(t, err)
|
require.NoError(t, err)
|
||||||
require.NotNil(t, experiments)
|
require.NotNil(t, experiments)
|
||||||
require.Empty(t, experiments)
|
require.Empty(t, experiments)
|
||||||
require.False(t, experiments.Enabled(codersdk.ExperimentVSCodeLocal))
|
|
||||||
require.False(t, experiments.Enabled("foo"))
|
require.False(t, experiments.Enabled("foo"))
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
|
@ -9,9 +9,8 @@ import (
|
||||||
type Experiment string
|
type Experiment string
|
||||||
|
|
||||||
const (
|
const (
|
||||||
// ExperimentVSCodeLocal enables a workspace button to launch VSCode
|
// Add new experiments here!
|
||||||
// and connect using the local VSCode extension.
|
// ExperimentExample Experiment = "example"
|
||||||
ExperimentVSCodeLocal Experiment = "vscode_local"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
@ -19,9 +18,7 @@ var (
|
||||||
// users to opt-in to via --experimental='*'.
|
// users to opt-in to via --experimental='*'.
|
||||||
// Experiments that are not ready for consumption by all users should
|
// Experiments that are not ready for consumption by all users should
|
||||||
// not be included here and will be essentially hidden.
|
// not be included here and will be essentially hidden.
|
||||||
ExperimentsAll = Experiments{
|
ExperimentsAll = Experiments{}
|
||||||
ExperimentVSCodeLocal,
|
|
||||||
}
|
|
||||||
)
|
)
|
||||||
|
|
||||||
// Experiments is a list of experiments that are enabled for the deployment.
|
// Experiments is a list of experiments that are enabled for the deployment.
|
||||||
|
|
|
@ -1072,23 +1072,17 @@ curl -X GET http://coder-server:8080/api/v2/experiments \
|
||||||
> 200 Response
|
> 200 Response
|
||||||
|
|
||||||
```json
|
```json
|
||||||
["vscode_local"]
|
["string"]
|
||||||
```
|
```
|
||||||
|
|
||||||
### Responses
|
### Responses
|
||||||
|
|
||||||
| Status | Meaning | Description | Schema |
|
| Status | Meaning | Description | Schema |
|
||||||
| ------ | ------------------------------------------------------- | ----------- | ------------------------------------------------------------- |
|
| ------ | ------------------------------------------------------- | ----------- | --------------- |
|
||||||
| 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | OK | array of [codersdk.Experiment](schemas.md#codersdkexperiment) |
|
| 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | OK | array of string |
|
||||||
|
|
||||||
<h3 id="get-experiments-responseschema">Response Schema</h3>
|
<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).
|
To perform this operation, you must be authenticated. [Learn more](authentication.md).
|
||||||
|
|
||||||
## Update check
|
## Update check
|
||||||
|
|
|
@ -2427,20 +2427,6 @@ CreateParameterRequest is a structure used to create a new parameter value for a
|
||||||
| `trial` | boolean | false | | |
|
| `trial` | boolean | false | | |
|
||||||
| `warnings` | array of string | false | | |
|
| `warnings` | array of string | false | | |
|
||||||
|
|
||||||
## codersdk.Experiment
|
|
||||||
|
|
||||||
```json
|
|
||||||
"vscode_local"
|
|
||||||
```
|
|
||||||
|
|
||||||
### Properties
|
|
||||||
|
|
||||||
#### Enumerated Values
|
|
||||||
|
|
||||||
| Value |
|
|
||||||
| -------------- |
|
|
||||||
| `vscode_local` |
|
|
||||||
|
|
||||||
## codersdk.Feature
|
## codersdk.Feature
|
||||||
|
|
||||||
```json
|
```json
|
||||||
|
|
|
@ -223,8 +223,13 @@ func (g *Generator) generateAll() (*TypescriptTypes, error) {
|
||||||
sort.Strings(values)
|
sort.Strings(values)
|
||||||
var s strings.Builder
|
var s strings.Builder
|
||||||
_, _ = s.WriteString(g.posLine(v))
|
_, _ = 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",
|
_, _ = s.WriteString(fmt.Sprintf("export type %s = %s\n",
|
||||||
name, strings.Join(values, " | "),
|
name, joined,
|
||||||
))
|
))
|
||||||
|
|
||||||
var pluralName string
|
var pluralName string
|
||||||
|
|
|
@ -1092,8 +1092,8 @@ export const Entitlements: Entitlement[] = [
|
||||||
]
|
]
|
||||||
|
|
||||||
// From codersdk/experiments.go
|
// From codersdk/experiments.go
|
||||||
export type Experiment = "vscode_local"
|
export type Experiment = never
|
||||||
export const Experiments: Experiment[] = ["vscode_local"]
|
export const Experiments: Experiment[] = []
|
||||||
|
|
||||||
// From codersdk/features.go
|
// From codersdk/features.go
|
||||||
export type FeatureName =
|
export type FeatureName =
|
||||||
|
|
|
@ -40,7 +40,7 @@ export const WorkspaceReadyPage = ({
|
||||||
const [_, bannerSend] = useActor(
|
const [_, bannerSend] = useActor(
|
||||||
workspaceState.children["scheduleBannerMachine"],
|
workspaceState.children["scheduleBannerMachine"],
|
||||||
)
|
)
|
||||||
const { buildInfo, experiments } = useDashboard()
|
const { buildInfo } = useDashboard()
|
||||||
const featureVisibility = useFeatureVisibility()
|
const featureVisibility = useFeatureVisibility()
|
||||||
const {
|
const {
|
||||||
workspace,
|
workspace,
|
||||||
|
@ -115,10 +115,7 @@ export const WorkspaceReadyPage = ({
|
||||||
builds={builds}
|
builds={builds}
|
||||||
canUpdateWorkspace={canUpdateWorkspace}
|
canUpdateWorkspace={canUpdateWorkspace}
|
||||||
hideSSHButton={featureVisibility["browser_only"]}
|
hideSSHButton={featureVisibility["browser_only"]}
|
||||||
hideVSCodeDesktopButton={
|
hideVSCodeDesktopButton={featureVisibility["browser_only"]}
|
||||||
!experiments.includes("vscode_local") ||
|
|
||||||
featureVisibility["browser_only"]
|
|
||||||
}
|
|
||||||
workspaceErrors={{
|
workspaceErrors={{
|
||||||
[WorkspaceErrors.GET_RESOURCES_ERROR]: refreshWorkspaceWarning,
|
[WorkspaceErrors.GET_RESOURCES_ERROR]: refreshWorkspaceWarning,
|
||||||
[WorkspaceErrors.GET_BUILDS_ERROR]: getBuildsError,
|
[WorkspaceErrors.GET_BUILDS_ERROR]: getBuildsError,
|
||||||
|
|
|
@ -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 = {
|
export const MockAuditLog: TypesGen.AuditLog = {
|
||||||
id: "fbd2116a-8961-4954-87ae-e4575bd29ce0",
|
id: "fbd2116a-8961-4954-87ae-e4575bd29ce0",
|
||||||
|
|
Loading…
Reference in New Issue