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

Feature/ignore hours #82

Merged
merged 4 commits into from
Oct 25, 2024
Merged

Conversation

naved001
Copy link
Collaborator

@naved001 naved001 commented Oct 21, 2024

This adds a feature to allow us to ignore certain hours to not be billed. This works by ignoring those hours from being excluded from a pod's runtime.

Right now, the CLI can accept a bunch of timestamps to ignore but I think ultimately it'll come from the nerc-rates repo.

I am still working on writing a test have added tests for write_metrics_by_namespace with hours to ignore and a similar one for write_metrics_by_pod.

@naved001 naved001 requested review from knikolla and QuanMPhm October 21, 2024 20:02
@naved001 naved001 force-pushed the feature/ignore-hours branch 2 times, most recently from b9a5337 to 3ce1ec2 Compare October 22, 2024 20:39
Copy link
Contributor

@knikolla knikolla left a comment

Choose a reason for hiding this comment

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

Looks pretty good otherwise!

openshift_metrics/invoice.py Outdated Show resolved Hide resolved
openshift_metrics/merge.py Show resolved Hide resolved
* Use the property to get end_time
* fix the comparison of start and end dates when taking user input
* Specify UTC timzone when creating datetime object
@naved001 naved001 force-pushed the feature/ignore-hours branch from 3ce1ec2 to 7c395a9 Compare October 24, 2024 19:47
@naved001
Copy link
Collaborator Author

@knikolla I added a new commit that addresses your comments and the timezone thing.

@naved001 naved001 merged commit 48eac4a into CCI-MOC:main Oct 25, 2024
2 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.

2 participants