-
Notifications
You must be signed in to change notification settings - Fork 94
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
[COST-3794] Add new API for managing custom cost groups #4401
Conversation
0fc4531
to
6fbeceb
Compare
SonarCloud Quality Gate failed. |
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #4401 +/- ##
======================================
Coverage 93.9% 94.0%
======================================
Files 361 364 +3
Lines 29900 30132 +232
Branches 3562 3589 +27
======================================
+ Hits 28079 28310 +231
Misses 1161 1161
- Partials 660 661 +1 |
6fbeceb
to
67e204b
Compare
afaa832
to
e30a80d
Compare
5450485
to
07bd994
Compare
Kudos, SonarCloud Quality Gate passed! |
So the initial code looks good for the most part. I think we need some updated testing instructions though (Might be because this is still WIP? But it is not in draft so 🤷) The other part we are still missing is the re-summary step, to trigger a re-summary task for the openshfit provider/source. That will populate the category_id and thus update the platform cost distribution. I did manually test this out locally and it did seem to work so great job there! In short after you add/remove a project to the platform category we just need to trigger |
07bd994
to
ecf8bc6
Compare
I added instructions for testing GET, PUT, and DELETE. Sorry I didn't add those before.
I added resummarization on PUT or DELETE. I could use some help making sure I'm scheduling this task correctly.. |
f1c354b
to
2a738d5
Compare
4c0fe6e
to
591bc30
Compare
4036b6a
to
58866a7
Compare
3d2b22e
to
9961b9e
Compare
Cache list of default projects to prevent multiple database queries. Co-authored-by: Cody Myers <cmyers@redhat.com>
Since this is a class var, make it immutable to make this class thread safe.
Co-authored-by: Cody Myers <cmyers@redhat.com>
- Add docstring - Use a frozenset for allowlist since that better matches how it is used
This mathches our custom query param syntax with the behavior of Django and DRF. Increase test coverage.
I tried to use a sub test but was having problems with duplicate key violations for some reason.
3818ec4
to
84482fb
Compare
Quality Gate passedKudos, no new issues were introduced! 0 New issues |
Jira Ticket
COST-3794
Description
Add new API with PUT/GET/DELETE methods to control what projects belong to which cost groups. Currently there is only one cost group, Platform. In the future, we will all customers to create custom cost groups and add projects to them.
Testing
Get current cost groups
Get just non-default projects
Add new projects to platform projects:
Delete projects from cost groups. Default projects will not be deleted.