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

[NO-ISSUE] Implement database consistency checks at startup #545

Merged

Conversation

tchoutri
Copy link
Contributor

@tchoutri tchoutri commented Apr 2, 2024

This PR implements consistency checks at startup. For now they are quite rudimentary:

  • Checks if the repo update job is queued, if not it's being enqueued
  • Checks if all the expected package indexes are already provisioned in the database, if not it stops the server. You need to run make db-provision.

Example output:

SELECT "package_indexes"."repository" FROM "package_indexes"
2024-04-02 18:06:27 ATTENTION flora-server: Database validation failed: Expected package indexes: horizon.
make: *** [Makefile:5: start] Error 1

@tchoutri tchoutri force-pushed the no-issue-database-consistency-checks-at-startup branch from 40511dd to b71e554 Compare April 2, 2024 18:13
@tchoutri tchoutri merged commit db948e7 into development Apr 2, 2024
9 checks passed
@tchoutri tchoutri deleted the no-issue-database-consistency-checks-at-startup branch April 2, 2024 18:29
@tchoutri tchoutri mentioned this pull request Oct 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant