Skip to content

Commit 3e44582

Browse files
committed
feat: move shared ports out of experiment
1 parent 845407f commit 3e44582

File tree

10 files changed

+169
-209
lines changed

10 files changed

+169
-209
lines changed

coderd/apidoc/docs.go

Lines changed: 0 additions & 2 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: 2 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

coderd/coderd.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1055,9 +1055,6 @@ func New(options *Options) *API {
10551055
r.Put("/autoupdates", api.putWorkspaceAutoupdates)
10561056
r.Get("/resolve-autostart", api.resolveAutostart)
10571057
r.Route("/port-share", func(r chi.Router) {
1058-
r.Use(
1059-
httpmw.RequireExperiment(api.Experiments, codersdk.ExperimentSharedPorts),
1060-
)
10611058
r.Get("/", api.workspaceAgentPortShares)
10621059
r.Post("/", api.postWorkspaceAgentPortShare)
10631060
r.Delete("/", api.deleteWorkspaceAgentPortShare)

coderd/workspaceagentportshare_test.go

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,7 @@ func TestPostWorkspaceAgentPortShare(t *testing.T) {
1919
t.Parallel()
2020
ctx, cancel := context.WithTimeout(context.Background(), testutil.WaitLong)
2121
defer cancel()
22-
dep := coderdtest.DeploymentValues(t)
23-
dep.Experiments = append(dep.Experiments, string(codersdk.ExperimentSharedPorts))
24-
ownerClient, db := coderdtest.NewWithDatabase(t, &coderdtest.Options{
25-
DeploymentValues: dep,
26-
})
22+
ownerClient, db := coderdtest.NewWithDatabase(t, nil)
2723
owner := coderdtest.CreateFirstUser(t, ownerClient)
2824
client, user := coderdtest.CreateAnotherUser(t, ownerClient, owner.OrganizationID)
2925

@@ -140,11 +136,7 @@ func TestGetWorkspaceAgentPortShares(t *testing.T) {
140136
ctx, cancel := context.WithTimeout(context.Background(), testutil.WaitLong)
141137
defer cancel()
142138

143-
dep := coderdtest.DeploymentValues(t)
144-
dep.Experiments = append(dep.Experiments, string(codersdk.ExperimentSharedPorts))
145-
ownerClient, db := coderdtest.NewWithDatabase(t, &coderdtest.Options{
146-
DeploymentValues: dep,
147-
})
139+
ownerClient, db := coderdtest.NewWithDatabase(t, nil)
148140
owner := coderdtest.CreateFirstUser(t, ownerClient)
149141
client, user := coderdtest.CreateAnotherUser(t, ownerClient, owner.OrganizationID)
150142

@@ -180,11 +172,7 @@ func TestDeleteWorkspaceAgentPortShare(t *testing.T) {
180172
ctx, cancel := context.WithTimeout(context.Background(), testutil.WaitLong)
181173
defer cancel()
182174

183-
dep := coderdtest.DeploymentValues(t)
184-
dep.Experiments = append(dep.Experiments, string(codersdk.ExperimentSharedPorts))
185-
ownerClient, db := coderdtest.NewWithDatabase(t, &coderdtest.Options{
186-
DeploymentValues: dep,
187-
})
175+
ownerClient, db := coderdtest.NewWithDatabase(t, nil)
188176
owner := coderdtest.CreateFirstUser(t, ownerClient)
189177
client, user := coderdtest.CreateAnotherUser(t, ownerClient, owner.OrganizationID)
190178

coderd/workspaceapps_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,6 @@ func TestWorkspaceApps(t *testing.T) {
257257
deploymentValues.DisablePathApps = serpent.Bool(opts.DisablePathApps)
258258
deploymentValues.Dangerous.AllowPathAppSharing = serpent.Bool(opts.DangerousAllowPathAppSharing)
259259
deploymentValues.Dangerous.AllowPathAppSiteOwnerAccess = serpent.Bool(opts.DangerousAllowPathAppSiteOwnerAccess)
260-
deploymentValues.Experiments = append(deploymentValues.Experiments, string(codersdk.ExperimentSharedPorts))
261260

262261
if opts.DisableSubdomainApps {
263262
opts.AppHost = ""

codersdk/deployment.go

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2192,18 +2192,15 @@ type Experiment string
21922192

21932193
const (
21942194
// Add new experiments here!
2195-
ExperimentExample Experiment = "example" // This isn't used for anything.
2196-
ExperimentSharedPorts Experiment = "shared-ports"
2195+
ExperimentExample Experiment = "example" // This isn't used for anything.
21972196
ExperimentAutoFillParameters Experiment = "auto-fill-parameters" // This should not be taken out of experiments until we have redesigned the feature.
21982197
)
21992198

22002199
// ExperimentsAll should include all experiments that are safe for
22012200
// users to opt-in to via --experimental='*'.
22022201
// Experiments that are not ready for consumption by all users should
22032202
// not be included here and will be essentially hidden.
2204-
var ExperimentsAll = Experiments{
2205-
ExperimentSharedPorts,
2206-
}
2203+
var ExperimentsAll = Experiments{}
22072204

22082205
// Experiments is a list of experiments.
22092206
// Multiple experiments may be enabled at the same time.

docs/api/schemas.md

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

enterprise/coderd/workspaceportshare_test.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,9 @@ import (
1717
func TestWorkspacePortShare(t *testing.T) {
1818
t.Parallel()
1919

20-
dep := coderdtest.DeploymentValues(t)
21-
dep.Experiments = append(dep.Experiments, string(codersdk.ExperimentSharedPorts))
2220
ownerClient, owner := coderdenttest.New(t, &coderdenttest.Options{
2321
Options: &coderdtest.Options{
2422
IncludeProvisionerDaemon: true,
25-
DeploymentValues: dep,
2623
},
2724
LicenseOptions: &coderdenttest.LicenseOptions{
2825
Features: license.Features{

site/src/api/typesGenerated.ts

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

0 commit comments

Comments
 (0)