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

Update error funcs for SDKv2 #3812

Merged
merged 1 commit into from
Aug 8, 2023

Conversation

mboersma
Copy link
Contributor

@mboersma mboersma commented Aug 8, 2023

What type of PR is this?

/kind cleanup

What this PR does / why we need it:

Updates the ResourceConflict() and ResourceNotFound() error helper funcs to also recognize Azure SDK for Go v2 error types.

Also removes the unused ResourceGroupNotFound() func, does some refactoring to simplify, and adds unit test coverage.

Which issue(s) this PR fixes:

Refs #2974

Special notes for your reviewer:

I extracted this from my larger PR in-progress because it stands on its own. I'll keep trying to do that to keep the pieces reviewable.

  • cherry-pick candidate

TODOs:

  • squashed commits
  • includes documentation
  • adds unit tests

Release note:

NONE

@k8s-ci-robot
Copy link
Contributor

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@k8s-ci-robot k8s-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. 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. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Aug 8, 2023
@mboersma mboersma marked this pull request as ready for review August 8, 2023 17:45
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Aug 8, 2023
@codecov
Copy link

codecov bot commented Aug 8, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: +0.05% 🎉

Comparison is base (e2a0c6c) 54.77% compared to head (f8323b8) 54.82%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3812      +/-   ##
==========================================
+ Coverage   54.77%   54.82%   +0.05%     
==========================================
  Files         187      187              
  Lines       19098    19099       +1     
==========================================
+ Hits        10460    10471      +11     
+ Misses       8070     8060      -10     
  Partials      568      568              
Files Changed Coverage Δ
azure/errors.go 28.57% <100.00%> (+19.48%) ⬆️

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

Copy link
Contributor

@Jont828 Jont828 left a comment

Choose a reason for hiding this comment

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

/lgtm

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

LGTM label has been added.

Git tree hash: 0ce68ee9dae056755ffc74acda58aa93fb792b8b

Copy link
Contributor

@nojnhuh nojnhuh left a comment

Choose a reason for hiding this comment

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

/lgtm

@nojnhuh
Copy link
Contributor

nojnhuh commented Aug 8, 2023

/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: nojnhuh

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 Aug 8, 2023
@k8s-ci-robot k8s-ci-robot merged commit 0b70c78 into kubernetes-sigs:main Aug 8, 2023
21 checks passed
@k8s-ci-robot k8s-ci-robot added this to the v1.11 milestone Aug 8, 2023
@mboersma mboersma deleted the sdk-v2-error-funcs branch August 8, 2023 19:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note-none Denotes a PR that doesn't merit a release note. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

4 participants