mirror of
https://github.com/coder/coder.git
synced 2025-07-29 10:35:52 +00:00
chore: Move deployment UI and HA into experimental (#4595)
These are new, so they deserve a bit of gel-time!
This commit is contained in:
@@ -72,6 +72,7 @@ type Options struct {
|
||||
AppHostname string
|
||||
AWSCertificates awsidentity.Certificates
|
||||
Authorizer rbac.Authorizer
|
||||
Experimental bool
|
||||
AzureCertificates x509.VerifyOptions
|
||||
GithubOAuth2Config *coderd.GithubOAuth2Config
|
||||
OIDCConfig *coderd.OIDCConfig
|
||||
@@ -229,6 +230,7 @@ func NewOptions(t *testing.T, options *Options) (func(http.Handler), context.Can
|
||||
CacheDir: t.TempDir(),
|
||||
Database: options.Database,
|
||||
Pubsub: options.Pubsub,
|
||||
Experimental: options.Experimental,
|
||||
|
||||
Auditor: options.Auditor,
|
||||
AWSCertificates: options.AWSCertificates,
|
||||
|
@@ -267,7 +267,7 @@ func (api *API) updateEntitlements(ctx context.Context) error {
|
||||
|
||||
if changed, enabled := featureChanged(codersdk.FeatureHighAvailability); changed {
|
||||
coordinator := agpltailnet.NewCoordinator()
|
||||
if enabled {
|
||||
if api.Experimental && enabled {
|
||||
haCoordinator, err := tailnet.NewCoordinator(api.Logger, api.Pubsub)
|
||||
if err != nil {
|
||||
api.Logger.Error(ctx, "unable to set up high availability coordinator", slog.Error(err))
|
||||
|
@@ -24,6 +24,7 @@ func TestReplicas(t *testing.T) {
|
||||
db, pubsub := dbtestutil.NewDB(t)
|
||||
firstClient := coderdenttest.New(t, &coderdenttest.Options{
|
||||
Options: &coderdtest.Options{
|
||||
Experimental: true,
|
||||
IncludeProvisionerDaemon: true,
|
||||
Database: db,
|
||||
Pubsub: pubsub,
|
||||
@@ -54,6 +55,7 @@ func TestReplicas(t *testing.T) {
|
||||
IncludeProvisionerDaemon: true,
|
||||
Database: db,
|
||||
Pubsub: pubsub,
|
||||
Experimental: true,
|
||||
},
|
||||
})
|
||||
firstUser := coderdtest.CreateFirstUser(t, firstClient)
|
||||
@@ -63,8 +65,9 @@ func TestReplicas(t *testing.T) {
|
||||
|
||||
secondClient := coderdenttest.New(t, &coderdenttest.Options{
|
||||
Options: &coderdtest.Options{
|
||||
Database: db,
|
||||
Pubsub: pubsub,
|
||||
Experimental: true,
|
||||
Database: db,
|
||||
Pubsub: pubsub,
|
||||
},
|
||||
})
|
||||
secondClient.SessionToken = firstClient.SessionToken
|
||||
@@ -92,6 +95,7 @@ func TestReplicas(t *testing.T) {
|
||||
certificates := []tls.Certificate{testutil.GenerateTLSCertificate(t, "localhost")}
|
||||
firstClient := coderdenttest.New(t, &coderdenttest.Options{
|
||||
Options: &coderdtest.Options{
|
||||
Experimental: true,
|
||||
IncludeProvisionerDaemon: true,
|
||||
Database: db,
|
||||
Pubsub: pubsub,
|
||||
@@ -105,6 +109,7 @@ func TestReplicas(t *testing.T) {
|
||||
|
||||
secondClient := coderdenttest.New(t, &coderdenttest.Options{
|
||||
Options: &coderdtest.Options{
|
||||
Experimental: true,
|
||||
Database: db,
|
||||
Pubsub: pubsub,
|
||||
TLSCertificates: certificates,
|
||||
|
@@ -14,10 +14,15 @@ export const Navbar: React.FC = () => {
|
||||
selectFeatureVisibility,
|
||||
shallowEqual,
|
||||
)
|
||||
const experimental = useSelector(
|
||||
xServices.entitlementsXService,
|
||||
(state) => state.context.entitlements.experimental,
|
||||
)
|
||||
const canViewAuditLog =
|
||||
featureVisibility[FeatureNames.AuditLog] &&
|
||||
Boolean(permissions?.viewAuditLog)
|
||||
const canViewDeployment = Boolean(permissions?.viewDeploymentFlags)
|
||||
const canViewDeployment =
|
||||
experimental && Boolean(permissions?.viewDeploymentFlags)
|
||||
const onSignOut = () => authSend("SIGN_OUT")
|
||||
|
||||
return (
|
||||
|
Reference in New Issue
Block a user