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

[WIP] Replace last usage of Azure/go-autorest #4780

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mboersma
Copy link
Contributor

/kind cleanup

What this PR does / why we need it:

Replaces the last usages of the deprecated Azure/go-autorest library.

Which issue(s) this PR fixes:

Fixes #2974

Special notes for your reviewer:

This mostly adapts the Environment code from go-autorest that we still seem to be using.

  • cherry-pick candidate

TODOs:

  • squashed commits
  • includes documentation
  • adds unit tests

Release note:

NONE

@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Apr 25, 2024
@k8s-ci-robot k8s-ci-robot added the size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. label Apr 25, 2024
@mboersma mboersma added this to the v1.15 milestone Apr 25, 2024
Copy link

codecov bot commented Apr 25, 2024

Codecov Report

Attention: Patch coverage is 80.95238% with 4 lines in your changes missing coverage. Please review.

Project coverage is 62.47%. Comparing base (1d29cae) to head (e62dc3b).
Report is 307 commits behind head on main.

Files Patch % Lines
azure/scope/environments.go 75.00% 3 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4780      +/-   ##
==========================================
+ Coverage   62.45%   62.47%   +0.02%     
==========================================
  Files         196      197       +1     
  Lines       16180    16196      +16     
==========================================
+ Hits        10105    10119      +14     
- Misses       5335     5336       +1     
- Partials      740      741       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@jackfrancis
Copy link
Contributor

tasty

@mboersma
Copy link
Contributor Author

/retest

@jackfrancis
Copy link
Contributor

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Apr 26, 2024
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: 1ed3ae7644484a6f2629ca8c0cc1181ce7093c98

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jackfrancis

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Apr 26, 2024
)

// AzureClients contains all the Azure clients used by the scopes.
type AzureClients struct {
auth.EnvironmentSettings
EnvironmentSettings
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm a little confused about how we were really using this type before if not just to store data. Isn't this a SDKv1 construct, and presumably not usable with SDKv2? Should we be utilizing this instead? https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/[email protected]/cloud

Copy link
Contributor Author

@mboersma mboersma Apr 29, 2024

Choose a reason for hiding this comment

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

I am also confused; AFAICT we've just been using this as an environment variable container and I've tried to keep the usages intact so as not to break things, but it may all amount to a no-op honestly.

Let me look more closely at Configuration and see if it's a more functional replacement for this go-autorest code path. Thanks @nojnhuh!

@jackfrancis
Copy link
Contributor

/hold

to address @nojnhuh's comment

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Apr 26, 2024
@mboersma mboersma removed the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Apr 29, 2024
@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Apr 30, 2024
@k8s-ci-robot
Copy link
Contributor

PR needs rebase.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@mboersma mboersma modified the milestones: v1.15, next May 6, 2024
@dtzar dtzar modified the milestones: next, v1.16 May 16, 2024
@mboersma
Copy link
Contributor Author

/retitle [WIP] Replace last usage of Azure/go-autorest

@k8s-ci-robot k8s-ci-robot changed the title Replace last usage of Azure/go-autorest [WIP] Replace last usage of Azure/go-autorest May 17, 2024
@k8s-ci-robot k8s-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label May 17, 2024
@mboersma mboersma removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label May 17, 2024
@mboersma mboersma modified the milestones: v1.16, next Jul 11, 2024
@k8s-ci-robot
Copy link
Contributor

@mboersma: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
pull-cluster-api-provider-azure-ci-entrypoint e62dc3b link true /test pull-cluster-api-provider-azure-ci-entrypoint

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

@mboersma mboersma modified the milestones: next, v1.17 Aug 8, 2024
@mboersma mboersma removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Aug 29, 2024
@dtzar dtzar modified the milestones: v1.17, v1.18 Sep 20, 2024
@mboersma mboersma modified the milestones: v1.18, next Nov 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. release-note-none Denotes a PR that doesn't merit a release note. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
Status: In Progress
Development

Successfully merging this pull request may close these issues.

Azure/go-autorest will soon be unsupported
5 participants