8000 feat: make pgCoordinator generally available by spikecurtis · Pull Request #8419 · coder/coder · GitHub
[go: up one dir, main page]

Skip to content

feat: make pgCoordinator generally available #8419

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jul 12, 2023
Merged

Conversation

spikecurtis
Copy link
Contributor
@spikecurtis spikecurtis commented Jul 11, 2023

The main feature of this PR is to make pgCoord the default coordinator in Coder Enterprise when HA is enabled. The old haCoordinator can be set using an experiment flag if we run into any problems in prod. It retires the experiment flag we used to use to enable pgCoord.

Because pgCoord only works with a real Postgres DB and Pubsub, the rest of the PR is devoted to fixing up the tests.

Since when we create a test enterprise Coderd we nearly always create a user and add a license, I've made these functions part of the test routine that creates the Coderd. For tests that really need to do these things explicitly, it can be disabled in the options.

Moving license creation into the startup routine allows me to double-check that the test hasn't enabled HA with the dbfake and in-mem Pubsub.

The tests that do actually exercise HA with multiple replicas are now skipped if the DB is not postgres.

Signed-off-by: Spike Curtis <spike@coder.com>
Signed-off-by: Spike Curtis <spike@coder.com>
Signed-off-by: Spike Curtis <spike@coder.com>
@spikecurtis spikecurtis merged commit b4057bd into main Jul 12, 2023
@spikecurtis spikecurtis deleted the spike/pg-coord-ga branch July 12, 2023 09:35
@github-actions github-actions bot locked and limited conversation to collaborators Jul 12, 2023
@ammario
Copy link
Member
ammario commented Jul 18, 2023

The merging of this PR coincides with a rapid increase in CI flakes:
image

20% of the flakes are attributed to TestReplicas. I know @spikecurtis is out, but wondering if @coadler can investigate this test reliability issue some time in the next few days?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants
0