Skip to content

Added nonbillable cluster list to billable processor#196

Merged
QuanMPhm merged 1 commit into
CCI-MOC:mainfrom
QuanMPhm:enhancement/nonbillable
May 21, 2025
Merged

Added nonbillable cluster list to billable processor#196
QuanMPhm merged 1 commit into
CCI-MOC:mainfrom
QuanMPhm:enhancement/nonbillable

Conversation

@QuanMPhm

@QuanMPhm QuanMPhm commented May 12, 2025

Copy link
Copy Markdown
Contributor

Closes #165. More details in the commit message. This is blocking #167 and #152.

I have a feeling this solution for the ocp-test debacle is a bit clunky. Let me know what you guys think.

@QuanMPhm QuanMPhm requested review from knikolla, larsks and naved001 May 12, 2025 20:52
Comment thread process_report/tests/unit/processors/test_coldfront_fetch_processor.py Outdated
As we plan to process projects from the non-billable `ocp-test` cluster [1],
a list is added containing just `ocp-test`. This list is also used by the
Coldfront processor when validating the Coldfront API data.
As processing now has cluster-specific processing, a new
column `Cluster Name` is added.
Test cases have been updated accordingly.

While revising test cases, two bugs were found:
- In `TestColdfrontFetchProcessor._get_test_invoice`, the
default value for project names was set to be a copy of project ids.
This didn’t invalidate pre-existing test cases, but would have
invalidated the test that checked for nonbillable clusters.
- in `TestValidateBillablePIProcessor.test_remove_nonbillables`,
in the last assertion which checked if the output invoice only
contained billable PIs, the assertion only checked if the invoice
contained PIs from the list, not if the invoice ALL PIs from it, and
with an exact quantity. This bug does invalidate the test.
Fortunately, test cases still passed after the bug is fixed.

[1] CCI-MOC#167
@QuanMPhm QuanMPhm force-pushed the enhancement/nonbillable branch from dcff11e to 9518e4b Compare May 20, 2025 21:06
@QuanMPhm QuanMPhm requested a review from naved001 May 20, 2025 21:06
@QuanMPhm QuanMPhm merged commit 54019b2 into CCI-MOC:main May 21, 2025
4 checks passed
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.

Add logic to handle a Cluster Name column in invoicing

2 participants