Skip to content

Commit 18c4368

Browse files
authored
chore: Move deployment UI and HA into experimental (#4595)
These are new, so they deserve a bit of gel-time!
1 parent 5325bec commit 18c4368

File tree

4 files changed

+16
-4
lines changed

4 files changed

+16
-4
lines changed

coderd/coderdtest/coderdtest.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ type Options struct {
7272
AppHostname string
7373
AWSCertificates awsidentity.Certificates
7474
Authorizer rbac.Authorizer
75+
Experimental bool
7576
AzureCertificates x509.VerifyOptions
7677
GithubOAuth2Config *coderd.GithubOAuth2Config
7778
OIDCConfig *coderd.OIDCConfig
@@ -229,6 +230,7 @@ func NewOptions(t *testing.T, options *Options) (func(http.Handler), context.Can
229230
CacheDir: t.TempDir(),
230231
Database: options.Database,
231232
Pubsub: options.Pubsub,
233+
Experimental: options.Experimental,
232234

233235
Auditor: options.Auditor,
234236
AWSCertificates: options.AWSCertificates,

enterprise/coderd/coderd.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ func (api *API) updateEntitlements(ctx context.Context) error {
267267

268268
if changed, enabled := featureChanged(codersdk.FeatureHighAvailability); changed {
269269
coordinator := agpltailnet.NewCoordinator()
270-
if enabled {
270+
if api.Experimental && enabled {
271271
haCoordinator, err := tailnet.NewCoordinator(api.Logger, api.Pubsub)
272272
if err != nil {
273273
api.Logger.Error(ctx, "unable to set up high availability coordinator", slog.Error(err))

enterprise/coderd/replicas_test.go

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ func TestReplicas(t *testing.T) {
2424
db, pubsub := dbtestutil.NewDB(t)
2525
firstClient := coderdenttest.New(t, &coderdenttest.Options{
2626
Options: &coderdtest.Options{
27+
Experimental: true,
2728
IncludeProvisionerDaemon: true,
2829
Database: db,
2930
Pubsub: pubsub,
@@ -54,6 +55,7 @@ func TestReplicas(t *testing.T) {
5455
IncludeProvisionerDaemon: true,
5556
Database: db,
5657
Pubsub: pubsub,
58+
Experimental: true,
5759
},
5860
})
5961
firstUser := coderdtest.CreateFirstUser(t, firstClient)
@@ -63,8 +65,9 @@ func TestReplicas(t *testing.T) {
6365

6466
secondClient := coderdenttest.New(t, &coderdenttest.Options{
6567
Options: &coderdtest.Options{
66-
Database: db,
67-
Pubsub: pubsub,
68+
Experimental: true,
69+
Database: db,
70+
Pubsub: pubsub,
6871
},
6972
})
7073
secondClient.SessionToken = firstClient.SessionToken
@@ -92,6 +95,7 @@ func TestReplicas(t *testing.T) {
9295
certificates := []tls.Certificate{testutil.GenerateTLSCertificate(t, "localhost")}
9396
firstClient := coderdenttest.New(t, &coderdenttest.Options{
9497
Options: &coderdtest.Options{
98+
Experimental: true,
9599
IncludeProvisionerDaemon: true,
96100
Database: db,
97101
Pubsub: pubsub,
@@ -105,6 +109,7 @@ func TestReplicas(t *testing.T) {
105109

106110
secondClient := coderdenttest.New(t, &coderdenttest.Options{
107111
Options: &coderdtest.Options{
112+
Experimental: true,
108113
Database: db,
109114
Pubsub: pubsub,
110115
TLSCertificates: certificates,

site/src/components/Navbar/Navbar.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,15 @@ export const Navbar: React.FC = () => {
1414
selectFeatureVisibility,
1515
shallowEqual,
1616
)
17+
const experimental = useSelector(
18+
xServices.entitlementsXService,
19+
(state) => state.context.entitlements.experimental,
20+
)
1721
const canViewAuditLog =
1822
featureVisibility[FeatureNames.AuditLog] &&
1923
Boolean(permissions?.viewAuditLog)
20-
const canViewDeployment = Boolean(permissions?.viewDeploymentFlags)
24+
const canViewDeployment =
25+
experimental && Boolean(permissions?.viewDeploymentFlags)
2126
const onSignOut = () => authSend("SIGN_OUT")
2227

2328
return (

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy