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

feat: adding more specific quota errors, and test coverage for the package #41

Merged
merged 5 commits into from
Nov 22, 2023

Conversation

Bryce-Soghigian
Copy link
Contributor

@Bryce-Soghigian Bryce-Soghigian commented Nov 22, 2023

What this PR Does
Subscription Level Quota captures the fact there is a quota error well, but we need more specific quota errors inside of karpenter.

The behavior should differ between TotalRegionalCores subscription level quota, and between a SKU Families quota error.

So now I want to detect them separately.

How was this PR Tested
Unit tests

@codecov-commenter
Copy link

codecov-commenter commented Nov 22, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (354dc9e) 83.12% compared to head (091420a) 84.49%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #41      +/-   ##
==========================================
+ Coverage   83.12%   84.49%   +1.37%     
==========================================
  Files           5        6       +1     
  Lines         237      258      +21     
==========================================
+ Hits          197      218      +21     
  Misses         34       34              
  Partials        6        6              

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

@Bryce-Soghigian Bryce-Soghigian changed the title fix: only including subscription level quota here feat: adding more specific quota errors, and test coverage for the package Nov 22, 2023
Copy link

@charliedmcb charliedmcb left a comment

Choose a reason for hiding this comment

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

Overall, looking good. Mostly cleanup comments on the *_test.go file.

pkg/errors/consts.go Outdated Show resolved Hide resolved
pkg/errors/armerrors.go Show resolved Hide resolved
pkg/errors/armerrors_test.go Show resolved Hide resolved
pkg/errors/armerrors_test.go Outdated Show resolved Hide resolved
pkg/errors/armerrors_test.go Outdated Show resolved Hide resolved
pkg/errors/armerrors_test.go Outdated Show resolved Hide resolved
pkg/errors/armerrors_test.go Show resolved Hide resolved
pkg/errors/armerrors_test.go Show resolved Hide resolved
pkg/errors/armerrors_test.go Show resolved Hide resolved
pkg/errors/armerrors_test.go Show resolved Hide resolved
pkg/errors/armerrors_test.go Show resolved Hide resolved
Copy link

@charliedmcb charliedmcb left a comment

Choose a reason for hiding this comment

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

Approving as only nits remain

@Bryce-Soghigian Bryce-Soghigian merged commit 52a003e into main Nov 22, 2023
4 checks passed
@tallaxes tallaxes deleted the bsoghigian/updating-grep-string-for-sub branch November 29, 2023 23:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants