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

LLT-5197: Make backup of events db in natlab before copying #702

Merged
merged 1 commit into from
Jul 19, 2024

Conversation

mathiaspeters
Copy link
Contributor

@mathiaspeters mathiaspeters commented Jul 19, 2024

Problem

For our tests, we were copying the original events db from the container to the host when checking for events. This way of doing it wouldn't take into account in-progress writes or other reasons why the db might be locked and sometimes led to the copied db being corrupted

Solution

As a way to get around it, we now let sqlite create a backup first, which does respect the db potentially being locked, and then we copy the backup

☑️ Definition of Done checklist

  • Commit history is clean (requirements)
  • README.md is updated
  • Functionality is covered by unit or integration tests

@mathiaspeters mathiaspeters requested a review from a team as a code owner July 19, 2024 10:06
For our tests, we were copying the original events db from the
container to the host when checking for events. This way of doing it
wouldn't take into account in-progress writes or other reasons why
the db might be locked. As a way to get around it, we now let sqlite
create a backup first, which does respect the db potentially being
locked, and then we copy the backup
@mathiaspeters mathiaspeters force-pushed the LLT-5197_proper_moose_events_file_backup branch from 6d11518 to 5e8c512 Compare July 19, 2024 11:25
Copy link
Contributor

@Jauler Jauler left a comment

Choose a reason for hiding this comment

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

+1.0

Copy link
Collaborator

@packgron packgron left a comment

Choose a reason for hiding this comment

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

+1.0

@mathiaspeters mathiaspeters merged commit 167b642 into main Jul 19, 2024
61 of 63 checks passed
@mathiaspeters mathiaspeters deleted the LLT-5197_proper_moose_events_file_backup branch July 19, 2024 12:40
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.

3 participants