mirror of https://github.com/coder/coder.git
chore: disable pgcoord (HA) when --in-memory (#12919)
* chore: disable pgcoord (HA) when --in-memory HA does not make any sense while using in-memory database
This commit is contained in:
parent
838e8df5be
commit
a607d5610e
|
@ -630,7 +630,13 @@ 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 {
|
||||
// If HA is enabled, but the database is in-memory, we can't actually
|
||||
// run HA and the PG coordinator. So throw a log line, and continue to use
|
||||
// the in memory AGPL coordinator.
|
||||
if enabled && api.DeploymentValues.InMemoryDatabase.Value() {
|
||||
api.Logger.Warn(ctx, "high availability is enabled, but cannot be configured due to the database being set to in-memory")
|
||||
}
|
||||
if enabled && !api.DeploymentValues.InMemoryDatabase.Value() {
|
||||
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))
|
||||
|
|
|
@ -1,12 +1,6 @@
|
|||
import { defineConfig } from "@playwright/test";
|
||||
import * as path from "path";
|
||||
import {
|
||||
coderMain,
|
||||
coderPort,
|
||||
coderdPProfPort,
|
||||
enterpriseLicense,
|
||||
gitAuth,
|
||||
} from "./constants";
|
||||
import { coderMain, coderPort, coderdPProfPort, gitAuth } from "./constants";
|
||||
|
||||
export const wsEndpoint = process.env.CODER_E2E_WS_ENDPOINT;
|
||||
|
||||
|
@ -54,8 +48,7 @@ export default defineConfig({
|
|||
"--global-config $(mktemp -d -t e2e-XXXXXXXXXX)",
|
||||
`--access-url=http://localhost:${coderPort}`,
|
||||
`--http-address=localhost:${coderPort}`,
|
||||
// Adding an enterprise license causes issues with pgcoord when running with `--in-memory`.
|
||||
!enterpriseLicense && "--in-memory",
|
||||
"--in-memory",
|
||||
"--telemetry=false",
|
||||
"--dangerous-disable-rate-limits",
|
||||
"--provisioner-daemons 10",
|
||||
|
|
Loading…
Reference in New Issue