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

Avoid looking up API resources on APIObject.get() calls #252

Merged
merged 1 commit into from
Dec 14, 2023

Conversation

jacobtomlinson
Copy link
Member

@jacobtomlinson jacobtomlinson commented Dec 14, 2023

Now that #249 has implemented the ability to pass objects to kr8s.get() we can pass the cls in places like the APIObject.get() classmethod instead of passing the endpoint name.

One benefit of this is that we don't need to look up API resources to resolve the string back into a class again. This closes #251.

@github-actions github-actions bot added the kr8s label Dec 14, 2023
Copy link

codecov bot commented Dec 14, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (aed0366) 94.56% compared to head (7b091f8) 94.56%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #252   +/-   ##
=======================================
  Coverage   94.56%   94.56%           
=======================================
  Files          27       27           
  Lines        2743     2743           
=======================================
  Hits         2594     2594           
  Misses        149      149           

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

@jacobtomlinson jacobtomlinson merged commit 1a79d2c into kr8s-org:main Dec 14, 2023
11 checks passed
@jacobtomlinson jacobtomlinson deleted the object-get-cls branch December 14, 2023 11:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

get calls are causing many requests
1 participant