Skip to content

Conversation

@cmillar-trunk
Copy link
Collaborator

Changes our default behaviour on errors to be to continue with quarantining and returning error codes based on test status, with carveouts for the cases where we believe an error is a result of user misconfiguration:

  • The server is sending any of the error codes it uses when your org slug and token disagree
  • We tried to find a git repo and couldn't find it
  • You told us to error out if there weren't any test reports, and there weren't any Creates the InterruptingError as a carveout for when we explicitly want to errors to block the user.
    As part of this, discovered that our integration tests that use the mock server were misconfigured - any response in a handler other than the expected response message would actually get sent to the cli as a 516 invalid media type. The fix for this was to pull the handler from a closure to a fn so we could define the return type as Response, at which point the into_response function axum uses can actually return it.

Changes our default behaviour on errors to be to continue with
quarantining and returning error codes based on test status, with
carveouts for the cases where we believe an error is a result of user
misconfiguration:
- The server is sending any of the error codes it uses when your org
  slug and token disagree
- We tried to find a git repo and couldn't find it
- You told us to error out if there weren't any test reports, and there
  weren't any
Creates the InterruptingError as a carveout for when we explicitly want
to errors to block the user.
As part of this, discovered that our integration tests that use the mock
server were misconfigured - any response in a handler other than the
expected response message would actually get sent to the cli as a 516
invalid media type. The fix for this was to pull the handler from a
closure to a fn so we could define the return type as Response<Body>, at
which point the into_response function axum uses can actually return it.
@trunk-io
Copy link

trunk-io bot commented Jan 16, 2026

Merging to main in this repository is managed by Trunk.

  • To merge this pull request, check the box to the left or comment /trunk merge below.

@codecov-commenter
Copy link

codecov-commenter commented Jan 16, 2026

Codecov Report

❌ Patch coverage is 83.33333% with 13 lines in your changes missing coverage. Please review.
✅ Project coverage is 81.01%. Comparing base (f156bbf) to head (a9f8a16).

Files with missing lines Patch % Lines
cli/src/error_report.rs 86.66% 8 Missing ⚠️
test_utils/src/mock_server.rs 0.00% 3 Missing ⚠️
cli/src/context_quarantine.rs 75.00% 1 Missing ⚠️
cli/src/upload_command.rs 80.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #990      +/-   ##
==========================================
+ Coverage   80.72%   81.01%   +0.29%     
==========================================
  Files          66       66              
  Lines       14178    14235      +57     
==========================================
+ Hits        11445    11533      +88     
+ Misses       2733     2702      -31     

☔ View full report in Codecov by Sentry.
📢 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.

@trunk-staging-io
Copy link

trunk-staging-io bot commented Jan 16, 2026

Static BadgeStatic BadgeStatic BadgeStatic Badge

View Full Report ↗︎Docs

@trunk-io
Copy link

trunk-io bot commented Jan 17, 2026

Static BadgeStatic BadgeStatic BadgeStatic Badge

View Full Report ↗︎Docs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants