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

@mabhi mabhi force-pushed the update-azure-sdk-lib branch from 5cffae4 to e991881 Compare October 2, 2023 06:01
@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
@mabhi mabhi requested review from pavannd1 and PrasadG193 October 3, 2023 07:13
@mabhi mabhi force-pushed the update-azure-sdk-lib branch from 62b7902 to f6223fc Compare October 5, 2023 06:42
@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
@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 🙏

@mabhi mabhi force-pushed the update-azure-sdk-lib branch from 8a3e451 to 72c7a41 Compare October 13, 2023 17:57
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
@mabhi mabhi force-pushed the update-azure-sdk-lib branch from f5371f9 to 069c08f Compare October 17, 2023 14:09
@mabhi mabhi force-pushed the update-azure-sdk-lib branch from ba7e030 to e5978a4 Compare October 25, 2023 08:01
@mabhi mabhi force-pushed the update-azure-sdk-lib branch from e5978a4 to 4fe7b46 Compare November 1, 2023 14:56
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
@mabhi mabhi force-pushed the update-azure-sdk-lib branch from 4fe7b46 to d6ae3ba Compare November 8, 2023 14:18
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
@mabhi mabhi force-pushed the update-azure-sdk-lib branch from d6ae3ba to 78aa9e3 Compare November 14, 2023 06:52
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
mabhi added 18 commits November 22, 2023 16:28
Signed-off-by: mabhi <[email protected]>
Signed-off-by: mabhi <[email protected]>
Signed-off-by: Abhijit Mukherjee <[email protected]>
Signed-off-by: Abhijit Mukherjee <[email protected]>
Signed-off-by: Abhijit Mukherjee <[email protected]>
Signed-off-by: Abhijit Mukherjee <[email protected]>
@mabhi mabhi force-pushed the update-azure-sdk-lib branch from cb5e7ba to 0ad1e5f Compare November 22, 2023 11:04
@mabhi mabhi added the kueue label Nov 22, 2023
@mergify mergify bot merged commit 94ac01a into master Nov 22, 2023
14 checks passed
@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
Status: Done
Development

Successfully merging this pull request may close these issues.

6 participants