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
Switch to azblob sdk #4028
Switch to azblob sdk #4028
Conversation
daf79ba
to
f6cc86b
Compare
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.
Thanks for the PR. Switching to the newer azure sdk is a good idea. Most comments are smaller issues, the only larger one is the Save
method.
I'm a bit undecided how the Save
method should look like. We basically have three options:
- change the case with <256MB files to stage and commit a block similar to saveLarge. The main difference would be that the expected md5 hash of the block is retrieved from rd.Hash()
- Always use
saveLarge
- Always use
UploadStream
The simplest way would be to use UploadStream, however, then we'd loose the end-to-end integrity checks for uploaded blocks. My current preference would be to use the first option, even though it's slightly more code.
84195f0
to
59312bd
Compare
I've fixed the remaining review comments. Apparently the azure SDK requires golang 1.18, which would be major bump in the required golang version... |
594c05e
to
d77adf9
Compare
@MichaelEischer idk what's up here but I get
Seems we're calculating or giving a mismach of the MD5? |
feb3171
to
54a242e
Compare
So now it's working that far but now it hangs on:
I guess it's due to one of the locks not releasing? |
54a242e
to
71943cd
Compare
Without more context that's usually pretty hard to tell. In case of a hanging golang program it's often helpful to send a SIGQUIT to the program (ctrl+). Then the runtime prints a stacktrace of all goroutines and exits. Here it was probably caused by a leaked token in the [Edit]Did you test whether |
No but I well def use it before pushing more code! Thanks for the tip |
I found a lock contention in the "List" method https://github.com/restic/restic/pull/4028/files#diff-1b24b164885fb0062347e123c6485f3444f696c8d178798bcfa7e6ac6376fd44R416
|
I have no idea which version of the code that is. But it looks like it does not include the last three bugfix commits which I've added to this PR (otherwise the line number doesn't make sense). |
c10dfda
to
af66852
Compare
@MichaelEischer all tests are green and the branch has been updated. Thanks for your help! |
765d061
to
25648e2
Compare
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.
LGTM. I've squashed the commits (the bugfix commits probably aren't useful anyways) and removed the changelog.
This is the start to fix #3698 since that requires to take a
cred
struct into many of the client New methods
What does this PR change? What problem does it solve?
Was the change previously discussed in an issue or on the forum?
Checklist
changelog/unreleased/
that describes the changes for our users (see template).gofmt
on the code in all commits.