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

Upgrade to new azure-go-sdk and refactor old go-autorest references #2368

Merged
merged 18 commits into from
Nov 22, 2023

Conversation

mabhi
Copy link
Contributor

@mabhi mabhi commented Sep 30, 2023

Change Overview

As per Azure guidelines, few modules from azure library are retiring support from 31 March 2023 . Due to which there is need to replace such modules with azure recommended azure-go-sdk modules.

go-autorest being used in the blockstorage package will be out of support from March 2023. Follow the documentation below to replace it with a new supported package.
https://azure.microsoft.com/en-us/updates/support-for-azure-sdk-libraries-that-do-not-conform-to-our-current-azure-sdk-guidelines-will-be-retired-as-of-31-march-2023/

Pull request type

Please check the type of change your PR introduces:

  • 🚧 Work in Progress
  • 🌈 Refactoring (no functional changes, no api changes)
  • 🐹 Trivial/Minor
  • 🐛 Bugfix
  • 🌻 Feature
  • 🗺️ Documentation
  • 🤖 Test

Issues

  • fixes #issue-number

Test Plan

  • 💪 Manual
  • ⚡ Unit test
  • 💚 E2E

@infraq infraq added this to In Progress in Kanister Sep 30, 2023
@mabhi mabhi marked this pull request as ready for review October 3, 2023 07:11
@mabhi mabhi mentioned this pull request Oct 3, 2023
10 tasks
@viveksinghggits
Copy link
Contributor

Hi @leuyentran ,
Can you please have a look into this PR?

@mabhi mabhi force-pushed the update-azure-sdk-lib branch 2 times, most recently from 95eabcc to 8a3e451 Compare October 6, 2023 04:50
Copy link
Contributor

@leuyentran leuyentran left a comment

Choose a reason for hiding this comment

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

Pre-lim review on my end. Thank you for working on this integration 🙏 The new package is so much nicer to use 😄 I will come back and finish off the reviews soon

pkg/blockstorage/azure/auth.go Outdated Show resolved Hide resolved
pkg/blockstorage/azure/auth.go Show resolved Hide resolved
pkg/blockstorage/azure/auth.go Outdated Show resolved Hide resolved
pkg/blockstorage/azure/auth.go Outdated Show resolved Hide resolved
pkg/blockstorage/azure/auth.go Outdated Show resolved Hide resolved
pkg/blockstorage/azure/auth.go Outdated Show resolved Hide resolved
pkg/blockstorage/azure/auth.go Outdated Show resolved Hide resolved
pkg/blockstorage/azure/auth.go Outdated Show resolved Hide resolved
pkg/blockstorage/azure/client.go Outdated Show resolved Hide resolved
Kanister automation moved this from In Progress to Review Required Oct 10, 2023
@leuyentran leuyentran self-requested a review October 12, 2023 20:48
Copy link
Contributor

@leuyentran leuyentran left a comment

Choose a reason for hiding this comment

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

Part 2 of my pre-lim. azuredisk.go is a beast so I'd like to do another pass later. Awesome job with the integration in that file 🙏

I'm a little nervous on the extent of changes. This is not at all about the quality of PR, but more on the scope of things that need to change that might cause us to miss a thing a two even w PR reviews. What are our testing plans?

pkg/blockstorage/azure/client.go Show resolved Hide resolved
pkg/blockstorage/azure/client_test.go Show resolved Hide resolved
pkg/blockstorage/azure/client_test.go Outdated Show resolved Hide resolved
pkg/blockstorage/azure/environments.go Show resolved Hide resolved
pkg/blockstorage/helpers.go Show resolved Hide resolved
pkg/blockstorage/azure/azuredisk.go Show resolved Hide resolved
pkg/blockstorage/azure/azuredisk.go Show resolved Hide resolved
pkg/blockstorage/azure/azuredisk.go Show resolved Hide resolved
Copy link
Contributor

@leuyentran leuyentran left a comment

Choose a reason for hiding this comment

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

Part 2 of my pre-lim. azuredisk.go is a beast so I'd like to do another pass later. Awesome job with the integration in that file 🙏

Copy link
Contributor Author

@mabhi mabhi left a comment

Choose a reason for hiding this comment

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

Addressed review comments

pkg/blockstorage/azure/auth.go Outdated Show resolved Hide resolved
pkg/blockstorage/azure/auth.go Outdated Show resolved Hide resolved
pkg/blockstorage/azure/auth.go Outdated Show resolved Hide resolved
pkg/blockstorage/azure/environments.go Show resolved Hide resolved
pkg/blockstorage/azure/auth.go Show resolved Hide resolved
pkg/blockstorage/helpers.go Outdated Show resolved Hide resolved
pkg/blockstorage/helpers.go Outdated Show resolved Hide resolved
Copy link
Contributor

@leuyentran leuyentran left a comment

Choose a reason for hiding this comment

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

Partial re-review. Need to take a closer look to azuredisk.go

pkg/blockstorage/azure/auth.go Show resolved Hide resolved
pkg/blockstorage/azure/auth.go Outdated Show resolved Hide resolved
pkg/blockstorage/helpers.go Outdated Show resolved Hide resolved
pkg/blockstorage/helpers.go Outdated Show resolved Hide resolved
pkg/blockstorage/helpers.go Outdated Show resolved Hide resolved
pkg/blockstorage/helpers.go Outdated Show resolved Hide resolved
Copy link
Contributor

@leuyentran leuyentran left a comment

Choose a reason for hiding this comment

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

I have reviewed azuredisk.go as well as the changes made since the last partial reviews. Thank you for the quick around 🙏 . Overall the changes look good to me besides some concerns for nil pointer deref. Please also check Vivek's comment on import ordering 😄

pkg/blockstorage/azure/azuredisk.go Outdated Show resolved Hide resolved
pkg/blockstorage/azure/azuredisk.go Outdated Show resolved Hide resolved
pkg/blockstorage/azure/azuredisk.go Outdated Show resolved Hide resolved
pkg/blockstorage/azure/azuredisk.go Outdated Show resolved Hide resolved
pkg/blockstorage/azure/azuredisk.go Outdated Show resolved Hide resolved
pkg/blockstorage/azure/azuredisk.go Outdated Show resolved Hide resolved
pkg/blockstorage/azure/azuredisk.go Outdated Show resolved Hide resolved
Copy link
Contributor

@leuyentran leuyentran left a comment

Choose a reason for hiding this comment

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

LGTM. Thank you for breaking down the review changes by commits. it really helped w reviewing.

I have a follow up question on which data is considered critical and should results in errors in case of nil pointer. Adn on that topic, I'd like to follow up on whether disSize should be considered a critical data. However, I think these can be follow uped after this PR

pkg/blockstorage/azure/azuredisk.go Show resolved Hide resolved
pkg/blockstorage/azure/azuredisk.go Show resolved Hide resolved
pkg/blockstorage/azure/azuredisk.go Show resolved Hide resolved
pkg/blockstorage/azure/auth.go Outdated Show resolved Hide resolved
pkg/blockstorage/helper_test.go Outdated Show resolved Hide resolved
Signed-off-by: mabhi <abhijit.mukherjee@infracloud.io>
Signed-off-by: mabhi <abhijit.mukherjee@infracloud.io>
Signed-off-by: mabhi <abhijit.mukherjee@infracloud.io>
Signed-off-by: mabhi <abhijit.mukherjee@infracloud.io>
Signed-off-by: mabhi <abhijit.mukherjee@infracloud.io>
Signed-off-by: mabhi <abhijit.mukherjee@infracloud.io>
Signed-off-by: mabhi <abhijit.mukherjee@infracloud.io>
Signed-off-by: mabhi <abhijit.mukherjee@infracloud.io>
Signed-off-by: mabhi <abhijit.mukherjee@infracloud.io>
Signed-off-by: mabhi <abhijit.mukherjee@infracloud.io>
Signed-off-by: mabhi <abhijit.mukherjee@infracloud.io>
Signed-off-by: mabhi <abhijit.mukherjee@infracloud.io>
Signed-off-by: Abhijit Mukherjee <abhijit.mukherjee@infracloud.io>
Signed-off-by: Abhijit Mukherjee <abhijit.mukherjee@infracloud.io>
Signed-off-by: Abhijit Mukherjee <abhijit.mukherjee@infracloud.io>
Signed-off-by: Abhijit Mukherjee <abhijit.mukherjee@infracloud.io>
Signed-off-by: Abhijit Mukherjee <abhijit.mukherjee@infracloud.io>
Signed-off-by: Abhijit Mukherjee <abhijit.mukherjee@infracloud.io>
@mabhi mabhi added the kueue label Nov 22, 2023
@mergify mergify bot merged commit 94ac01a into master Nov 22, 2023
14 checks passed
Kanister automation moved this from Reviewer approved to Done Nov 22, 2023
@mergify mergify bot deleted the update-azure-sdk-lib branch November 22, 2023 11:52
@mabhi mabhi restored the update-azure-sdk-lib branch November 22, 2023 13:17
PrasadG193 added a commit that referenced this pull request Nov 22, 2023
mergify bot pushed a commit that referenced this pull request Nov 22, 2023
@leuyentran leuyentran mentioned this pull request Dec 6, 2023
10 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Development

Successfully merging this pull request may close these issues.

None yet

6 participants