8000 Return additional build info on action rerun by justin-thurman · Pull Request #1174 · chromaui/chromatic-cli · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Return additional build info on action rerun #1174

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 17, 2025
Merged

Return additional build info on action rerun #1174

merged 1 commit into from
Apr 17, 2025

Conversation

justin-thurman
Copy link
Contributor
@justin-thurman justin-thurman commented Apr 16, 2025

Description

This PR fixes an issue whereby reruns of the GitHub action, which a user might trigger after approving visual changes, would not provide updated values for things like testCount, changeCount, etc. This was happening because we were only pulling these values from the ctx.build field, if it was defined. This PR updates that logic to pull from ctx.rebuildForBuild if ctx.build is undefined. I've also added the relevant fields to the LastBuildQuery GQL query so we're pulling that information from the index.

Manual testing

I've verified through the Apollo GQL dashboard that the fields I've added to LastBuildQuery work as expected. I also ran a build with the CLI locally and triggered the Skipping rebuild of an already fully passed/accepted build, and confirmed that the relevant count values are being populated as expected.

📦 Published PR as canary version: 11.28.2--canary.1174.14517169208.0

✨ Test out this PR locally via:

npm install chromatic@11.28.2--canary.1174.14517169208.0
# or 
yarn add chromatic@11.28.2--canary.1174.14517169208.0

@justin-thurman justin-thurman added bug Classification: Something isn't working release Auto: Create a `latest` release when merged patch Auto: Increment the patch version when merged labels Apr 16, 2025
specCount
testCount
changeCount
errorCount: testCount(statuses: [BROKEN])
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I copied this from other implementations of this field, e.g., snapshot.ts.

Copy link
Contributor
github-actions bot commented Apr 16, 2025

📦 Package Size: 5576 KB
✅ Compared to main: 0 KB aa1210d (5576 KB)

Copy link
codecov bot commented Apr 16, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 70.01%. Comparing base (aa1210d) to head (891a6cd).
Report is 4 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1174   +/-   ##
=======================================
  Coverage   70.00%   70.01%           
=======================================
  Files         202      202           
  Lines        7314     7316    +2     
  Branches     1299     1301    +2     
=======================================
+ Hits         5120     5122    +2     
  Misses       2171     2171           
  Partials       23       23           

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

@justin-thurman justin-thurman requested a review from a team April 16, 2025 17:06
@justin-thurman justin-thurman marked this pull request as ready for review April 16, 2025 17:06
Copy link
Contributor
@codykaup codykaup left a comment

Choose a reason for hiding this comment

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

LGTM! Just a couple questions but the main goal looks great!

@justin-thurman
Copy link
Contributor Author

@codykaup, addressed your changes. I also reran the CLI manually and confirmed the new values are working as expected.

@justin-thurman justin-thurman requested a review from codykaup April 17, 2025 11:11
@justin-thurman justin-thurman added this pull request to the merge queue Apr 17, 2025
Merged via the queue into main with commit c83a466 Apr 17, 2025
21 checks passed
@justin-thurman justin-thurman deleted the CAP-2990 branch April 17, 2025 13:44
@chromatic-ci-bot
Copy link
Collaborator

🚀 PR was released in v11.28.1 🚀

@chromatic-ci-bot chromatic-ci-bot added the released Verdict: This issue/pull request has been released label Apr 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Classification: Something isn't working patch Auto: Increment the patch version when merged release Auto: Create a `latest` release when merged released Verdict: This issue/pull request has been released
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0