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

Fix bug where db file is posible moved outside of docker volume #496

Merged
merged 10 commits into from
Oct 30, 2021

Conversation

6543
Copy link
Member

@6543 6543 commented Oct 30, 2021

#494 (comment) introduced a bug, where a migration function can remove the sqlite3 file outside of the mounted docker volume.
that would result in a data lose after a container recreate.

this fix it by only rename the file if in same folder else just use the old path as fallback and put warnings into the log

@6543 6543 added bug Something isn't working skip-changelog labels Oct 30, 2021
@6543 6543 added this to the 0.15.0 milestone Oct 30, 2021
cmd/server/setup.go Outdated Show resolved Hide resolved
cmd/server/setup.go Outdated Show resolved Hide resolved
cmd/server/setup.go Outdated Show resolved Hide resolved
cmd/server/setup.go Outdated Show resolved Hide resolved
cmd/server/setup.go Outdated Show resolved Hide resolved
cmd/server/setup.go Outdated Show resolved Hide resolved
6543 and others added 2 commits October 30, 2021 13:09
Co-authored-by: Anbraten <anton@ju60.de>
cmd/server/setup.go Outdated Show resolved Hide resolved
cmd/server/setup.go Outdated Show resolved Hide resolved
cmd/server/setup.go Outdated Show resolved Hide resolved
6543 and others added 2 commits October 30, 2021 14:00
Co-authored-by: Anbraten <anton@ju60.de>
Co-authored-by: Anbraten <anton@ju60.de>
anbraten
anbraten previously approved these changes Oct 30, 2021
cmd/server/setup.go Outdated Show resolved Hide resolved
@6543 6543 enabled auto-merge (squash) October 30, 2021 12:20
cmd/server/setup.go Outdated Show resolved Hide resolved
Copy link
Member

@anbraten anbraten left a comment

Choose a reason for hiding this comment

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

crazy how complex such a simple looking thing can be 😅

@6543
Copy link
Member Author

6543 commented Oct 30, 2021

well ... yes - this will be just 3 checks once we do fail hard (no fallback) in next version :)

@6543 6543 merged commit f02789c into woodpecker-ci:master Oct 30, 2021
@6543 6543 deleted the docker-fix branch October 30, 2021 13:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working skip-changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants