Skip to content

feat: track service unit cost of runs in database (SBP-445) - #113

Merged
marius-mather merged 17 commits into
devfrom
feat/service-usage
Jul 29, 2026
Merged

feat: track service unit cost of runs in database (SBP-445)#113
marius-mather merged 17 commits into
devfrom
feat/service-usage

Conversation

@marius-mather

@marius-mather marius-mather commented Jul 29, 2026

Copy link
Copy Markdown
Collaborator

Pull Request

Summary

SBP-445: retrieve the usage report (uploaded to S3) and record the actual service units for the workflow run in the database

Changes

  • Add UsageReport.csv to results/output specs so it gets synced along with other results
  • Add service_usage column to WorkflowRun DB table
  • Sync usage when accessing job list/job detail endpoints (since that's where other syncs are currently triggered)
  • Add service_usage column to DB admin view

How to Test

Run uv run pytest

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update

Checklist

  • I have added tests that prove my fix is effective or that my feature works
  • I have added or updated documentation where necessary
  • I have run linting and unit tests locally
  • The code follows the project's style guidelines

@amandazhuyilan amandazhuyilan left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Looks good to me - looking forward to seeing some csv generated once this is in

@marius-mather
marius-mather merged commit 896ee39 into dev Jul 29, 2026
3 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