feat: add live feedback during pushes (sideband streaming)#1637
feat: add live feedback during pushes (sideband streaming)#1637jescalada wants to merge 13 commits into
Conversation
✅ Deploy Preview for endearing-brigadeiros-63f9d0 canceled.
|
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1637 +/- ##
==========================================
- Coverage 85.87% 85.75% -0.12%
==========================================
Files 84 85 +1
Lines 8109 8448 +339
Branches 1376 1457 +81
==========================================
+ Hits 6964 7245 +281
- Misses 1117 1172 +55
- Partials 28 31 +3 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> Signed-off-by: Juan Escalada <97265671+jescalada@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> Signed-off-by: Juan Escalada <97265671+jescalada@users.noreply.github.com>
|
Pinging @finos/git-proxy-maintainers for thoughts on this 👍🏼 I intend to refactor things a bit to make the feedback more flexible. Should we pass the sideband writer into each I think it might be a good chance to also refactor the chain to run all the steps, give feedback on whether each check passed or failed and finally reject the push at the end if anything failed. |
|
@jescalada That's really nice. I like that a lot. I know its a different issue - is there a way to get rid of the fatal error from git when the proxy blocks the the push? Assume not? |
|
@andypols It's not hard to fix, actually. It requires reporting the status correctly to band 1, which we weren't doing previously. It even lets us add a rejection reason next to the
Thanks for the feedback! |
|
This looks like a great improvements, thanks @jescalada and @coopernetes (for the inspiration). I DO think you should refactor to make sure all steps run (although do remember that some are dependent on previous steps - you can't scan the diff until its been retrieved) so you may end up needing to express some dependencies or a flag indicating that you shouldn't run subsequent steps if the current step fails. I believe @andypols talked about a similar change he made in a fork to convert some of the errors into advisories for reviewers to consider during review?? Perhaps we need to create a a scale or results pass -> advisory -> error? |
|
P.S> replacing the fatal error with a custom message was also a great improvement |

Description
Implements sideband streaming by intercepting git-receive-pack POST requests to stream directly to the user.
On successful pushes
This is what a
git pushlooks like (note that I added a randomized delay between each step to make the execution obvious).git-proxy-sideband-streaming-demo.mp4
On failed checks
Blocked pushes currently stop at the step that failed, although it's easier to visualize the push going through the chain:
I've been wondering about whether we should edit the
Processor'sexecfunction to take in theSidebandProgressWriter. This would allow processors to send arbitrary messages to the user in their implementation, rather than just the current step being executed.For a separate PR I'd like to make the chain execute all the steps (or at least the steps that aren't dependent on previous ones) and use stream the results of failed checks before finally blocking the push at the end.
Related Issue
Resolves #1485
Related discussion: #1556
Checklist
General
Documentation
Configuration
config.schema.json) was modified:npm run generate-config-types)npm run gen-schema-doc)Tests
npm test)npm run lintandnpm run format:check)npm run check-types)