-
Notifications
You must be signed in to change notification settings - Fork 82
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 new Azure SDK and refactor Azure implementation #3
Conversation
Currently I need to fix the transport configuration in the new client to make use of tls certs etc. I will start testing my fork after that is completed. Having some sort of conformance tests would be nice but I may just have to resort to create a test tenant in my Thanos deployment. The current Azure implementation works just fine so it is important that we don't break any existing features. Would appreciate any help with testing the changes. |
76a0823
to
f815c13
Compare
Please make sure to signoff your commits with |
c9022ee
to
c64ffc7
Compare
c64ffc7
to
050f4e0
Compare
E2E tests now pass. |
Biggest issue right now is that MSI Resource and User Assigned ID is an either or choice. Dont think this will affect functionality but it will affect the config validation. |
c9346da
to
73f94a2
Compare
So I have verified that MSI resource no longer has to be set when configuring access to the storage account with Azure. It is automatically calculated and can not be configured. The current blocker right now seems to be the requirement on Go 1.18 but there seems to be progress on that end also getting Thanos upgraded. |
|
@phillebaba @bwplotka go1.18 is not strictly required for thanos-io/objstore. Where does this requirement come from? |
The requirement comes from the new Azure Go SDK. It requires Go 1.18, if i remember correctly it is because some authentication package uses generics. |
@phillebaba Ok, got it. For whatever reason, I thought the other way around. Thanks for clarifying. I think after we release an initial version of this package, we can bump the required version and have these changes. I'm working on the CI tests now for the repo. |
78a3c8f
to
236cad3
Compare
41538f4
to
93d9bae
Compare
@kakkoyun so I have now rebased this branch and fixed some of the unit tests. I have also deployed a build of this fork in a test environment and verified that things seems to still work. I just cant figure out why CodeQL is failing. Looking through the changes it seems that there is no real breaking changes other than the On top of this I had to upgrade the Go version to 1.18 which can cause issues for both Thanos and other depending projects. I think it would be good to start reviewing this PR. |
93d9bae
to
c58f949
Compare
@bwplotka I fixed the issue. I needed to set the specific Go version for CodeQL. |
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, LGTM
I wish we had e2e tested this, but we don't have an Azure account for Thanos use I believe.
Ticket for this: #10
Happy to merge this after rebase (:
c281d63
to
9387cdf
Compare
Signed-off-by: Philip Laine <philip.laine@gmail.com>
9387cdf
to
022755a
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.
Amazing, thanks 💪🏽
And thanks for caring about compatibility, good job!
Endpoint string `yaml:"endpoint"` | ||
MaxRetries int `yaml:"max_retries"` | ||
// Deprecated: Is automatically set by the Azure SDK. | ||
MSIResource string `yaml:"msi_resource"` |
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.
I think we planned to log warning when someone provides it? Let's do that in next PR if needed (:
This is a larger refactor of the Azure implementation which switches to the new Azure Go SDK. A lot of function names are the same its for the most part that interface that has changed to become more idiomatic Go. The main benefit of switching is that the new SDK does not require ADAL and instead fully supports azidentity which will remove some less than ideal code to get MSI working. I took the liberty to do some refactoring while I am at it in the hope that it will be easier for future developers to understand.
Fixes thanos-io/thanos/issues/5172