-
Notifications
You must be signed in to change notification settings - Fork 11
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
Cache bucket locations #15
Cache bucket locations #15
Conversation
b591851
to
f636e90
Compare
f636e90
to
d34ebb4
Compare
Marked as draft as this is not something that is ready to merge. |
Thank you for addressing this! At this stage, I believe implementing the bare minimum is sufficient.
|
I removed the moka dep and created the cache manually instead
I added the location check to the
Hmm I'm now reading in the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for addressing this 🙂
- I don't think the update to
Cargo.lock
is necessary, so could you please remove it? - Could you fix the compiler warnings that are causing the CI to fail?
Thanks for the review. Knowing when to panick and when to propagate errors is a bit tricky I think. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, I have a few more comments 🙂
- You need to address the lint errors. The CI runs
cargo clippy --all-targets --all-features -- -D warnings
.
Knowing when to panick and when to propagate errors is a bit tricky I think.
- While I haven't strictly defined rules, at least
get_bucket_region
returnsAppError
, so I thought it would be good to handle that consistently.
Looks good, thanks! |
Fixes #14
Run with
RUST_BACKTRACE=1 cargo test test_load_all_buckets -- --nocapture
. This requires that you have an account authenticated with some s3 buckets though. I'll remove the tests if this gets approved. It's just the easiest way I have found to do manual testing.put
is ran. Super inefficient, but does not really matter maybe? The cache is loaded from file at startup.Very very rough and needs a lot of cleanup with logging and error handling probably. I thought it might be smart to hear your thoughts about the approach here before fixing up all the small things with the code. What do you think?