fix(proxy): preserve original Git pack POST streams before validation#1060
fix(proxy): preserve original Git pack POST streams before validation#1060JamieSlome merged 12 commits intofinos:mainfrom fabiovincenzi:clone-fix
Conversation
✅ Deploy Preview for endearing-brigadeiros-63f9d0 canceled.
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1060 +/- ##
==========================================
+ Coverage 76.78% 76.87% +0.09%
==========================================
Files 55 55
Lines 2261 2266 +5
Branches 251 252 +1
==========================================
+ Hits 1736 1742 +6
+ Misses 495 494 -1
Partials 30 30 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
coopernetes
left a comment
There was a problem hiding this comment.
Thanks for the fix @fabiovincenzi ! LGTM 👍
|
@fabiovincenzi - can we resolve the merge conflict? |
Head branch was pushed to by a user without write access
jescalada
left a comment
There was a problem hiding this comment.
LGTM! 👍🏼
I looked into the E2E CI issue. It seems that some of the latest changes in the CI might have broken the Cypress test that relies on test-repo being added in the unit tests.
I noticed that GitProxy adds the finos/git-proxy repo by default, so checking for that repo would likely fix the issue:
- const cloneURL = 'http://localhost:8000/finos/test-repo.git';
+ const cloneURL = 'http://localhost:8000/finos/git-proxy.git';
const tooltipQuery = 'div[role="tooltip"]';
cy
// tooltip isn't open to start with
.get(tooltipQuery)
.should('not.exist');
cy
- // find the entry for finos/test-repo
- .get('a[href="/dashboard/repo/test-repo"]')
+ // find the entry for finos/git-proxy
+ .get('a[href="/dashboard/repo/git-proxy"]')
// take it's parent row
.closest('tr')
// find the nearby span containing Code we can click to open the tooltip
.find('span')
.contains('Code')
.should('exist')
.click();|
I also noticed that all the old unit tests are being ignored for some odd reason... Wonder if resolving the merge conflicts will fix this? |
Signed-off-by: Fabio Vincenzi <93596376+fabiovincenzi@users.noreply.github.com>
|
@jescalada Thanks for catching that – I realized I accidentally left a |
This PR ensures that Git
git-upload-packandgit-receive-packPOST requests are handled without changing their original packet:bodyParser.raw()insrc/proxy/index.tsso that the proxy sees the unmodified stream.teeAndValidatemiddleware insrc/proxy/routes/index.tswhich:PassThroughpipes.Closes #1037.