Skip to content

[Config] Implement configuration synchronization between file and database (fixes #3013) #3035

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

adityajha2005
Copy link

Description

  • This PR implements a configuration synchronization system that ensures consistency between the file-based configuration (db.config.json) and the database configuration.

The implementation follows these requirements:

  1. On startup, the file configuration is read and used to update the database configuration
  2. On shutdown, the database configuration is read and used to update the file configuration
  3. All configuration changes made in tasks or gunicorn processes are made to the database
  4. All configuration reads are from the config file

This ensures configuration changes made during runtime are preserved in the file for the next startup while maintaining the file as the source of truth for reading configuration values.

This PR fixes #3013

Notes for Reviewers

  • A new module augur/application/config_sync.py was created to handle the synchronization logic
  • The API, collection, and tasks CLI modules were modified to call the synchronization functions on startup and shutdown
  • The database engine and facade worker were updated to always read configuration from the file
  • Tests were added to verify the synchronization functionality

Signed commits

  • Yes, I signed my commits.

…abase (fixes chaoss#3013)

Signed-off-by: Aditya <147301021+adityajha2005@users.noreply.github.com>
@adityajha2005 adityajha2005 requested a review from sgoggins as a code owner March 3, 2025 20:54
@sgoggins sgoggins requested review from Ulincsys and ABrain7710 March 21, 2025 12:53
@sgoggins
Copy link
Member

@ABrain7710 / @Ulincsys : Let me know your thoughts on this one.

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.

Create augur config file
2 participants