Skip to content

feat: execute all steps and collect errors at end of chain#1640

Open
jescalada wants to merge 8 commits into
mainfrom
make-chain-execute-all-steps
Open

feat: execute all steps and collect errors at end of chain#1640
jescalada wants to merge 8 commits into
mainfrom
make-chain-execute-all-steps

Conversation

@jescalada

Copy link
Copy Markdown
Contributor

Description

This PR implements one of fogwall's quality-of-life features: collecting all errors in the chain and reporting to the user, so they don't have to make multiple pushes and fix one-by-one. This still fails mid-chain if non-validator steps (parsePush, pullRemote, writePack, etc.) error out.

collectibleSteps are defined in chain.ts (steps that can be collected and reported later, as opposed to immediately failing).

image

Related Issue

Resolves #

Checklist

General

Documentation

  • Documentation has been added/updated for any new features

Configuration

  • If configuration schema (config.schema.json) was modified:
    • TypeScript types regenerated (npm run generate-config-types)
    • Schema reference docs regenerated (npm run gen-schema-doc)

Tests

  • Tests have been added/updated for new functionality
  • Unit tests pass (npm test)
  • Linting and formatting pass (npm run lint and npm run format:check)
  • Type checks pass (npm run check-types)

@netlify

netlify Bot commented Jul 8, 2026

Copy link
Copy Markdown

Deploy Preview for endearing-brigadeiros-63f9d0 canceled.

Name Link
🔨 Latest commit 3e2cdbc
🔍 Latest deploy log https://app.netlify.com/projects/endearing-brigadeiros-63f9d0/deploys/6a57114de6e0cb0008b5571e

@github-actions

github-actions Bot commented Jul 8, 2026

Copy link
Copy Markdown

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

@codecov

codecov Bot commented Jul 8, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 92.30769% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 86.01%. Comparing base (096a049) to head (3e2cdbc).

Files with missing lines Patch % Lines
src/proxy/chain.ts 91.48% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1640      +/-   ##
==========================================
+ Coverage   85.75%   86.01%   +0.25%     
==========================================
  Files          85       85              
  Lines        8448     8488      +40     
  Branches     1457     1479      +22     
==========================================
+ Hits         7245     7301      +56     
+ Misses       1172     1157      -15     
+ Partials       31       30       -1     

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

@jescalada
jescalada marked this pull request as ready for review July 8, 2026 12:50
@jescalada
jescalada requested a review from a team as a code owner July 8, 2026 12:50

@coopernetes coopernetes left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Overall LGTM, just a few notes/suggestions.

Comment thread src/config/generated/config.ts Outdated
Comment thread src/proxy/chain.ts Outdated
Comment thread src/proxy/chain.ts Outdated
* such as repository authorisation, user push permission, or later steps
* depending on their output (pullRemote, writePack, getDiff)
*/
const collectibleSteps = new Set<Processor['exec']>([

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Worth adding a class/object property like private readonly boolean isCollectible directly on the Processor type? Then each step can self-declare it's behaviour and this list doesn't need to remain statically defined (and needing updates when new checks are introduced).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Could also be worth thinking about how plugin behave - they could be collectible or not...

@kriswest kriswest left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM, although I agree with @coopernetes that the config option can be removed and that processors could self declare their behaviour, which could have an impact on plugins. Up to you if you deal with the alter point in this PR or raise a follow-up issue. However, best to drop the config setting now if we don't need it

@jescalada

Copy link
Copy Markdown
Contributor Author

@kriswest @coopernetes Ready for another look! I'm not sure about the plugin behavior - should these be collectible as well? I'm happy to open another PR for this to get this merged faster 👍🏼

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