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