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

Simple script to populate billing budget history per project. #669

Open
wants to merge 3 commits into
base: dev
Choose a base branch
from

Conversation

milo-hyben
Copy link
Contributor

@milo-hyben milo-hyben commented Jan 29, 2024

Simple script to loop through cpg-infra-private commits information, reconstruct budget changes history per project and sync with BQ billing budget table.
At some stage we would might convert to a cloud function and run as scheduled job.

…reconstruct budget changes history per project and sync with BQ billing budget table.
@codecov-commenter
Copy link

codecov-commenter commented Jan 29, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (91b5ff7) 68.67% compared to head (3320cd7) 68.67%.
Report is 3 commits behind head on dev.

Additional details and impacted files
@@           Coverage Diff           @@
##              dev     #669   +/-   ##
=======================================
  Coverage   68.67%   68.67%           
=======================================
  Files         131      131           
  Lines       10198    10198           
=======================================
  Hits         7003     7003           
  Misses       3195     3195           

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

"""
budget_records: dict[datetime, int] = {}

cmd = f'cd {folder_path}; git log -L2,+1:"{project_name}/budgets.yaml" --pretty="format:%ci"'
Copy link
Collaborator

@illusional illusional Feb 4, 2024

Choose a reason for hiding this comment

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

Use with path.chdir(...) to be a temporary change in path.

@milo-hyben
Copy link
Contributor Author

This PR is going to be closed without merging as script has been moved to cpg-infra-private:

https://github.com/populationgenomics/cpg-infrastructure-private/pull/353

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.

3 participants