Skip to content

Commit 9280eef

Browse files
committed
chore: move vscode local out of experiments
We've been dogfooding the VS Code extension for a while, and it seems stable enough that it's overall positive to release!
1 parent 56b9965 commit 9280eef

File tree

9 files changed

+16
-61
lines changed

9 files changed

+16
-61
lines changed

coderd/apidoc/docs.go

Lines changed: 1 addition & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

coderd/apidoc/swagger.json

Lines changed: 1 addition & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

coderd/experiments_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ func Test_Experiments(t *testing.T) {
2929
require.NoError(t, err)
3030
require.NotNil(t, experiments)
3131
require.Empty(t, experiments)
32-
require.False(t, experiments.Enabled(codersdk.ExperimentVSCodeLocal))
3332
require.False(t, experiments.Enabled("foo"))
3433
})
3534

codersdk/experiments.go

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,20 +8,12 @@ import (
88

99
type Experiment string
1010

11-
const (
12-
// ExperimentVSCodeLocal enables a workspace button to launch VSCode
13-
// and connect using the local VSCode extension.
14-
ExperimentVSCodeLocal Experiment = "vscode_local"
15-
)
16-
1711
var (
1812
// ExperimentsAll should include all experiments that are safe for
1913
// users to opt-in to via --experimental='*'.
2014
// Experiments that are not ready for consumption by all users should
2115
// not be included here and will be essentially hidden.
22-
ExperimentsAll = Experiments{
23-
ExperimentVSCodeLocal,
24-
}
16+
ExperimentsAll = Experiments{}
2517
)
2618

2719
// Experiments is a list of experiments that are enabled for the deployment.

docs/api/general.md

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1037,23 +1037,17 @@ curl -X GET http://coder-server:8080/api/v2/experiments \
10371037
> 200 Response
10381038
10391039
```json
1040-
["vscode_local"]
1040+
["string"]
10411041
```
10421042

10431043
### Responses
10441044

1045-
| Status | Meaning | Description | Schema |
1046-
| ------ | ------------------------------------------------------- | ----------- | ------------------------------------------------------------- |
1047-
| 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | OK | array of [codersdk.Experiment](schemas.md#codersdkexperiment) |
1045+
| Status | Meaning | Description | Schema |
1046+
| ------ | ------------------------------------------------------- | ----------- | --------------- |
1047+
| 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | OK | array of string |
10481048

10491049
<h3 id="get-experiments-responseschema">Response Schema</h3>
10501050

1051-
Status Code **200**
1052-
1053-
| Name | Type | Required | Restrictions | Description |
1054-
| -------------- | ----- | -------- | ------------ | ----------- |
1055-
| `[array item]` | array | false | | |
1056-
10571051
To perform this operation, you must be authenticated. [Learn more](authentication.md).
10581052

10591053
## Update check

docs/api/schemas.md

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2354,20 +2354,6 @@ CreateParameterRequest is a structure used to create a new parameter value for a
23542354
| `trial` | boolean | false | | |
23552355
| `warnings` | array of string | false | | |
23562356

2357-
## codersdk.Experiment
2358-
2359-
```json
2360-
"vscode_local"
2361-
```
2362-
2363-
### Properties
2364-
2365-
#### Enumerated Values
2366-
2367-
| Value |
2368-
| -------------- |
2369-
| `vscode_local` |
2370-
23712357
## codersdk.Feature
23722358

23732359
```json

scripts/apitypings/main.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,8 +223,13 @@ func (g *Generator) generateAll() (*TypescriptTypes, error) {
223223
sort.Strings(values)
224224
var s strings.Builder
225225
_, _ = s.WriteString(g.posLine(v))
226+
joined := strings.Join(values, " | ")
227+
if joined == "" {
228+
// It's possible an enum has no values.
229+
joined = "never"
230+
}
226231
_, _ = s.WriteString(fmt.Sprintf("export type %s = %s\n",
227-
name, strings.Join(values, " | "),
232+
name, joined,
228233
))
229234

230235
var pluralName string

site/src/api/typesGenerated.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1084,8 +1084,8 @@ export const Entitlements: Entitlement[] = [
10841084
]
10851085

10861086
// From codersdk/experiments.go
1087-
export type Experiment = "vscode_local"
1088-
export const Experiments: Experiment[] = ["vscode_local"]
1087+
export type Experiment = never
1088+
export const Experiments: Experiment[] = []
10891089

10901090
// From codersdk/features.go
10911091
export type FeatureName =

site/src/pages/WorkspacePage/WorkspaceReadyPage.tsx

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,6 @@ export const WorkspaceReadyPage = ({
4141
workspaceState.children["scheduleBannerMachine"],
4242
)
4343
const xServices = useContext(XServiceContext)
44-
const experiments = useSelector(
45-
xServices.experimentsXService,
46-
(state) => state.context.experiments || [],
47-
)
4844
const featureVisibility = useSelector(
4945
xServices.entitlementsXService,
5046
selectFeatureVisibility,
@@ -123,10 +119,7 @@ export const WorkspaceReadyPage = ({
123119
builds={builds}
124120
canUpdateWorkspace={canUpdateWorkspace}
125121
hideSSHButton={featureVisibility["browser_only"]}
126-
hideVSCodeDesktopButton={
127-
!experiments.includes("vscode_local") ||
128-
featureVisibility["browser_only"]
129-
}
122+
hideVSCodeDesktopButton={featureVisibility["browser_only"]}
130123
workspaceErrors={{
131124
[WorkspaceErrors.GET_RESOURCES_ERROR]: refreshWorkspaceWarning,
132125
[WorkspaceErrors.GET_BUILDS_ERROR]: getBuildsError,

0 commit comments

Comments
 (0)