-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Snapshot storage on S3 via SnapshotManager abstraction #3430
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
Conversation
alright, everything is working on local! i have confidence i can build this now. onto S3 |
I'm opening this as ready for review, but take it more as "request for comments". Everything seems to work after messing around a bit, and all the tests run, but I haven't tested yet for any accidental breaking API or backwards compatibility issues. Concerns/notes to self:
|
Hey @mogery, thanks for the PR! |
Hey, it's sort of hard to split, since it's an architectural change, and I can't really break it down without breaking build. I could break it down into two: one that just switches everything to use SnapshotManager, and another one which adds S3 support to it, but I'm not sure how much that would help. |
Gonna take a look at the failing tests soon and fix 'em up. |
sorry, sent that message right before realizing that i was running the tests in the wrong directory... anyways, i've fixed everything up now. all tests run for me on local both with the local backend and with S3. hopefully this time it all passes on your side too |
i've also verified that nothing is present in the local snapshot folder (at idle, temp files are still created now and then) when using S3 |
I'm very confused. All the integration tests run successfully on my local machine. Here's a log. Exit code is reliably 0 for me. EDIT: seems like i'm running the wrong test actually... |
Another round of fixes done. Ran even more tests on local, everything is coming back green. |
Heh, I didn't see that that one failed, because I couldn't see the exit code. Anyways, should be fixed. Thanks for bearing with me. |
I'll also be running the whole test suite while mounted to S3 tomorrow. |
hi there @generall, any updates on reviewing this? |
hey @mogery, review of that big pr requires about 4 hours uninterrupted timeframe. If possible, could you please split it into smaller pieces? |
@generall Closing this PR and splitting it into two. |
Superseded by #3520 and [TBD] |
Fixes #3324
/claim #3324
This PR adds a new package,
snapshot_manager
, which houses theSnapshotManager
struct. TheSnapshotManager
abstracts (SnapshotFile
) the filesystem-dependent parts of snapshots away from the rest of the codebase, which allows us to write two "backends" for snapshot storage: local and S3.The local backend is 99% ported over from the existing code. Most of the trouble is with adjusting the existing code to use this new interface.
The S3 backend is built with the
rust-s3
crate, which I've found to be the most reliable. It's battle-tested by having a million all-time downloads, it supports non-AWS S3-compatible file storage services, etc.This is a biiiig PR which changes a considerable amount of code structure. Let me know if you like it or not. I'll be doing a larger sweep of all my changes to catch structure mistakes once the todo's finished.
To-do
Checklist
All Submissions:
dev
branch. Did you create your branch fromdev
?New Feature Submissions:
cargo +nightly fmt --all
command prior to submission?cargo clippy --all --all-features
command?Changes to Core Features: