Skip to content

add basic usage report - #1495

Open
MattShirley wants to merge 17 commits into
developfrom
1478-download-usage-report-as-csv-file
Open

add basic usage report#1495
MattShirley wants to merge 17 commits into
developfrom
1478-download-usage-report-as-csv-file

Conversation

@MattShirley

@MattShirley MattShirley commented Jul 2, 2026

Copy link
Copy Markdown
Collaborator

Instead of limiting this report based on SQL rows as the Issue requested, I have added logic to SqlCsvReportView to allow a max size to be added to a report. Output will be truncated by row if the max download size is exceeded.

@MattShirley MattShirley linked an issue Jul 2, 2026 that may be closed by this pull request
@codecov

codecov Bot commented Jul 2, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.62%. Comparing base (f06b45a) to head (d114e10).
⚠️ Report is 2 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #1495      +/-   ##
===========================================
+ Coverage    89.20%   89.62%   +0.42%     
===========================================
  Files          103      106       +3     
  Lines         3732     3953     +221     
  Branches       460      485      +25     
===========================================
+ Hits          3329     3543     +214     
- Misses         326      331       +5     
- Partials        77       79       +2     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@MattShirley
MattShirley marked this pull request as ready for review July 8, 2026 20:25
Comment thread servicex_app/servicex_app/web/admin/reports/__init__.py

@ponyisi ponyisi 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.

See the one thing, otherwise looks good to me

UserModel.institution.label("Institution"),
TransformRequest.submit_time.label("Run Time"),
)
.join(TransformRequest, TransformRequest.submitted_by == UserModel.id)

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Hmm.. I wonder if there still needs to be a limit here in cases of large TransformRequest tables. How much memory do pods usually have in prod?

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.

We would expect 2-3 GB?

@MattShirley MattShirley Jul 22, 2026

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I changed SqlCsvReportView to always stream results from the SQL server in 1000 row increments, so this shouldn't be a problem for general reporting. Expected large CSVs can just implement the max_download_size (which we can optionally add a default value, currently it's unbounded by default).

@BenGalewsky BenGalewsky added this to the 1.8 milestone Jul 23, 2026
@ponyisi

ponyisi commented Jul 24, 2026

Copy link
Copy Markdown
Collaborator

As discussed in the meeting earlier today - it might be nice to just dump everything present in the TransformRequest model (aka the requests table) instead of trying to be clever and cherry-pick?

@MattShirley

Copy link
Copy Markdown
Collaborator Author

As discussed in the meeting earlier today - it might be nice to just dump everything present in the TransformRequest model (aka the requests table) instead of trying to be clever and cherry-pick?

@ponyisi I updated the field list to include most fields on TransformRequest. I have still excluded some fields, such as database keys, the selection itself, and some of the longer fields that I wasn't sure would be useful. Can you take a look at that and tell me if you want it modified?

@MattShirley
MattShirley requested a review from ponyisi July 31, 2026 14:02
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.

Download Usage Report as CSV file

3 participants