mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
feat: promote PG Coordinator out of experimental (#11398)
Promotes PG Coordinator out of experimental to GA
This commit is contained in:
@@ -613,12 +613,7 @@ func (api *API) updateEntitlements(ctx context.Context) error {
|
||||
if initial, changed, enabled := featureChanged(codersdk.FeatureHighAvailability); shouldUpdate(initial, changed, enabled) {
|
||||
var coordinator agpltailnet.Coordinator
|
||||
if enabled {
|
||||
var haCoordinator agpltailnet.Coordinator
|
||||
if api.AGPL.Experiments.Enabled(codersdk.ExperimentTailnetPGCoordinator) {
|
||||
haCoordinator, err = tailnet.NewPGCoord(api.ctx, api.Logger, api.Pubsub, api.Database)
|
||||
} else {
|
||||
haCoordinator, err = tailnet.NewCoordinator(api.Logger, api.Pubsub)
|
||||
}
|
||||
haCoordinator, err := tailnet.NewPGCoord(api.ctx, api.Logger, api.Pubsub, api.Database)
|
||||
if err != nil {
|
||||
api.Logger.Error(ctx, "unable to set up high availability coordinator", slog.Error(err))
|
||||
// If we try to setup the HA coordinator and it fails, nothing
|
||||
|
||||
@@ -48,6 +48,10 @@ func TestEntitlements(t *testing.T) {
|
||||
require.Empty(t, res.Warnings)
|
||||
})
|
||||
t.Run("FullLicense", func(t *testing.T) {
|
||||
// PGCoordinator requires a real postgres
|
||||
if !dbtestutil.WillUsePostgres() {
|
||||
t.Skip("test only with postgres")
|
||||
}
|
||||
t.Parallel()
|
||||
adminClient, _ := coderdenttest.New(t, &coderdenttest.Options{
|
||||
AuditLogging: true,
|
||||
|
||||
Reference in New Issue
Block a user