Skip to content

chore: add the --ephemeral server flag #16126

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 8 commits into from
Jan 20, 2025
Merged

Conversation

hugodutka
Copy link
Contributor

@hugodutka hugodutka commented Jan 13, 2025

Another PR to address #15109.

Changes:

  • Introduces the --ephemeral flag, which changes the Coder config directory to a temporary location. The config directory is where the built-in PostgreSQL stores its data, so using a new one results in a deployment with a fresh state.

The --ephemeral flag is set to replace the --in-memory flag once the in-memory database is removed.

@hugodutka hugodutka force-pushed the hugodutka/ephemeral-flag branch from e9ea1ef to 54a82ea Compare January 16, 2025 15:33
@hugodutka hugodutka marked this pull request as ready for review January 16, 2025 18:40
@hugodutka
Copy link
Contributor Author

It looks like the weekly docs check is failing because some external links went offline, not because of any changes I made.

@hugodutka hugodutka marked this pull request as draft January 16, 2025 18:41
@hugodutka hugodutka marked this pull request as ready for review January 16, 2025 21:43
@dannykopping
Copy link
Contributor

Why can't we just redefine what --in-memory does?

It's a hidden field already, and I can't think of a use-case for customers, so changing the behaviour here seems fine to me (provided we note this in the release notes).

@hugodutka
Copy link
Contributor Author

@dannykopping, many of the CLI tests currently use --in-memory (see here). We'd need to modify them, as the new approach would spawn a new Postgres process for every test, which is too heavy-weight. I was planning to make --in-memory a deprecated alias for --ephemeral once the in-memory DB is fully removed. This way, we can split the migration into smaller PRs that are easier to review.

Copy link
Contributor

@dannykopping dannykopping left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@hugodutka hugodutka force-pushed the hugodutka/ephemeral-flag branch from 075e524 to 068b594 Compare January 20, 2025 13:09
@hugodutka hugodutka merged commit 23cf61a into main Jan 20, 2025
34 of 36 checks passed
@hugodutka hugodutka deleted the hugodutka/ephemeral-flag branch January 20, 2025 13:31
@github-actions github-actions bot locked and limited conversation to collaborators Jan 20, 2025
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.

2 participants