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

Add backup functionality #190

Merged
merged 8 commits into from
Sep 30, 2024
Merged

Add backup functionality #190

merged 8 commits into from
Sep 30, 2024

Conversation

gpetretto
Copy link
Contributor

Initial implementation of a backup feature to create and restore a dump of the queue store. Closes #165.
Two options either based on the presence of the mongodump/mongorestore executable in the system, or a simple python dump to BSON files.
This may be important to have once we put in place the automatic update procedure (see #150). It might be convenient to suggest the users to perform a backup before proceeding with the update of the DB.

@codecov-commenter
Copy link

codecov-commenter commented Sep 23, 2024

Codecov Report

Attention: Patch coverage is 19.33333% with 121 lines in your changes missing coverage. Please review.

Project coverage is 47.17%. Comparing base (00b7f22) to head (0d86cae).

Files with missing lines Patch % Lines
src/jobflow_remote/utils/db.py 20.58% 53 Missing and 1 partial ⚠️
src/jobflow_remote/jobs/jobcontroller.py 5.66% 50 Missing ⚠️
src/jobflow_remote/cli/backup.py 39.28% 17 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #190      +/-   ##
===========================================
- Coverage    47.99%   47.17%   -0.82%     
===========================================
  Files           43       44       +1     
  Lines         5165     5314     +149     
  Branches      1121     1164      +43     
===========================================
+ Hits          2479     2507      +28     
- Misses        2429     2549     +120     
- Partials       257      258       +1     
Files with missing lines Coverage Δ
src/jobflow_remote/cli/__init__.py 100.00% <100.00%> (ø)
src/jobflow_remote/cli/backup.py 39.28% <39.28%> (ø)
src/jobflow_remote/jobs/jobcontroller.py 33.91% <5.66%> (-1.69%) ⬇️
src/jobflow_remote/utils/db.py 50.00% <20.58%> (-14.50%) ⬇️

Copy link
Member

@davidwaroquiers davidwaroquiers left a comment

Choose a reason for hiding this comment

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

Great addition! A few comments/questions/suggestions here and there

src/jobflow_remote/utils/db.py Outdated Show resolved Hide resolved
src/jobflow_remote/utils/db.py Show resolved Hide resolved
src/jobflow_remote/utils/db.py Show resolved Hide resolved
src/jobflow_remote/utils/db.py Show resolved Hide resolved
src/jobflow_remote/utils/db.py Outdated Show resolved Hide resolved
src/jobflow_remote/jobs/jobcontroller.py Show resolved Hide resolved
src/jobflow_remote/jobs/jobcontroller.py Outdated Show resolved Hide resolved
src/jobflow_remote/cli/backup.py Outdated Show resolved Hide resolved
src/jobflow_remote/cli/backup.py Outdated Show resolved Hide resolved
src/jobflow_remote/cli/backup.py Show resolved Hide resolved
@gpetretto
Copy link
Contributor Author

I addressed the comments above. I still need to prepare the documentation of the feature

Copy link
Member

@davidwaroquiers davidwaroquiers left a comment

Choose a reason for hiding this comment

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

All good to me! Great doc.

doc/source/user/backup.rst Outdated Show resolved Hide resolved
src/jobflow_remote/jobs/jobcontroller.py Show resolved Hide resolved
@gpetretto gpetretto merged commit 29eb2dc into develop Sep 30, 2024
5 checks passed
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.

Add a backup feature
3 participants