Skip to content

Conversation

@cfsmp3
Copy link
Contributor

@cfsmp3 cfsmp3 commented Dec 23, 2025

Summary

When a test fails due to missing build artifacts, users previously saw only a generic "An error occurred" message with no details. This made it difficult to understand what went wrong.

Example: Test #7139 failed because the Windows build was still in progress (Windows builds take ~40 minutes, but the test tried to fetch the artifact immediately).

Changes

  • Add error_message property to Test model to expose the last error message
  • Update test detail template to show error message prominently in an alert box
  • Add _diagnose_missing_artifact() helper that checks GitHub workflow status and provides specific error messages:
Scenario Error Message
Build in progress "Build still in progress: 'Build CCExtractor on Windows' is in_progress. Please wait for the build to complete and retry."
Build failed "Build failed: '...' finished with conclusion 'failure'. Check the GitHub Actions logs for details."
Build succeeded but no artifact "Artifact not found: '...' completed successfully, but no artifact was found. The artifact may have expired..."
No workflow run found "No workflow run found: '...' has not run for commit abc1234..."

Before vs After

Before: User sees generic "An error occurred - Something went wrong while the tests were running"

After: User sees specific error like "Error: Build still in progress: 'Build CCExtractor on Windows' is in_progress. Please wait for the build to complete and retry."

Test plan

  • Verify syntax is correct (Python files compile)
  • Test with a commit where Windows build is in progress
  • Test with a commit where build failed
  • Test with a successful build to ensure no regression

🤖 Generated with Claude Code

@codecov
Copy link

codecov bot commented Dec 23, 2025

Codecov Report

❌ Patch coverage is 88.23529% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 87.02%. Comparing base (53b3d7f) to head (5616b9b).

Files with missing lines Patch % Lines
mod_ci/controllers.py 86.20% 2 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #947      +/-   ##
==========================================
+ Coverage   86.88%   87.02%   +0.13%     
==========================================
  Files          35       35              
  Lines        3759     3791      +32     
  Branches      767      776       +9     
==========================================
+ Hits         3266     3299      +33     
+ Misses        355      354       -1     
  Partials      138      138              
Flag Coverage Δ
unittests 87.02% <88.23%> (+0.13%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ 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.

@cfsmp3 cfsmp3 force-pushed the fix/improve-artifact-error-messages branch 2 times, most recently from 829df8c to 90c7d6a Compare December 23, 2025 20:01
Add _diagnose_missing_artifact function that checks workflow run status
to provide specific error messages:

- Build still in progress: tells user to wait and retry
- Build failed: directs user to check GitHub Actions logs
- Artifact expired: explains artifacts are deleted after retention period
- No workflow run: indicates workflow wasn't triggered or is queued

This helps users understand why their test couldn't start and what
action to take.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
@cfsmp3 cfsmp3 force-pushed the fix/improve-artifact-error-messages branch from 90c7d6a to 91aa24b Compare December 23, 2025 20:12
@sonarqubecloud
Copy link

@canihavesomecoffee canihavesomecoffee merged commit b57b33b into master Dec 23, 2025
6 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.

3 participants