Skip to content
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

feat(prefect-server): support sqlite database #418

Merged
merged 9 commits into from
Dec 5, 2024
Merged

Conversation

mitchnielsen
Copy link
Contributor

@mitchnielsen mitchnielsen commented Dec 5, 2024

Summary

Supports using SQLite for the database in place of PostgreSQL.

Closes https://linear.app/prefect/issue/PLA-139/support-sqlite-database

Closes #345

Testing

First, check out the the unit tests added for confirming general functionality.

For a functional test:

  1. Provide the documented values to enable SQLite, and deploy the prefect-server chart (confirming that no PostgreSQL Pod is deployed)
  2. Access the application (port forward if not using an Ingress)
  3. Create some data (such as a variable)
  4. Delete the Server Pod
  5. Reload the application and confirm data created earlier is still present

- HPA is not desired given that sqlite requires 1 replica
- secret is postgresql-specific
This test, separate from my changes, failed because it was looking for a
volumeMount at a specific index. This change allows it to just confirm
the entry is present without worrying about a specific location in the
list.
@mitchnielsen mitchnielsen added the feature A new feature label Dec 5, 2024
@mitchnielsen mitchnielsen self-assigned this Dec 5, 2024
The application was failing to start, saying it couldn't access the
database file.

This change mounts a directory without a subPath setting, allowing the
application to create the file instead.
Uses a template to calculate the PVC name, matching the pattern used for
other objects like the Deployment.
@mitchnielsen mitchnielsen marked this pull request as ready for review December 5, 2024 17:13
@mitchnielsen mitchnielsen requested a review from a team as a code owner December 5, 2024 17:13
Copy link
Contributor

@jamiezieziula jamiezieziula left a comment

Choose a reason for hiding this comment

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

nice!!

@mitchnielsen mitchnielsen merged commit f1e9d3a into main Dec 5, 2024
13 checks passed
@mitchnielsen mitchnielsen deleted the support-sqlite branch December 5, 2024 19:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature A new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support SQLite database
2 participants