Skip to content

[build-tools] upload serve-sim metrics artifact on session teardown#3995

Draft
gwdp wants to merge 1 commit into
gwdp/serve-sim-metrics-corsfrom
gwdp/serve-sim-metrics-artifact
Draft

[build-tools] upload serve-sim metrics artifact on session teardown#3995
gwdp wants to merge 1 commit into
gwdp/serve-sim-metrics-corsfrom
gwdp/serve-sim-metrics-artifact

Conversation

@gwdp

@gwdp gwdp commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Why

so a finished simulator session's CPU/memory shows up in the dashboard (the live stream is gone once the session ends).

How

at session teardown, lists serve-sim's /artifacts, downloads the metrics NDJSON, and uploads it through the same uploadDeviceRunSessionArtifactAsync path as other session artifacts. the file grows all session, so it's fetched once at the end rather than mid-session.

Test Plan

CI passes. unit tests cover listing, download+upload, and the teardown drain.

gwdp commented Jul 10, 2026

Copy link
Copy Markdown
Contributor Author

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

This stack of pull requests is managed by Graphite. Learn more about stacking.

@gwdp gwdp force-pushed the gwdp/serve-sim-metrics-cors branch from 54257fd to 1230799 Compare July 10, 2026 05:39
@gwdp gwdp force-pushed the gwdp/serve-sim-metrics-artifact branch from 88f253b to 158b437 Compare July 10, 2026 05:39
@github-actions

Copy link
Copy Markdown

✅ Thank you for adding the changelog entry!

@codecov

codecov Bot commented Jul 10, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 85.48387% with 9 lines in your changes missing coverage. Please review.
✅ Project coverage is 59.65%. Comparing base (1230799) to head (158b437).

Files with missing lines Patch % Lines
...s/build-tools/src/steps/utils/serveSimArtifacts.ts 89.66% 6 Missing ⚠️
.../src/steps/functions/startServeSimRemoteSession.ts 25.00% 3 Missing ⚠️
Additional details and impacted files
@@                       Coverage Diff                       @@
##           gwdp/serve-sim-metrics-cors    #3995      +/-   ##
===============================================================
- Coverage                        59.80%   59.65%   -0.15%     
===============================================================
  Files                              936      939       +3     
  Lines                            41069    41299     +230     
  Branches                          8639     8688      +49     
===============================================================
+ Hits                             24559    24632      +73     
- Misses                           16416    16573     +157     
  Partials                            94       94              

☔ 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.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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.

1 participant