Closed Bug 1492214 Opened 6 years ago Closed 6 years ago

Unable to submit commit to Phabricator due to post_max_size being too small

Categories

(Conduit :: Infrastructure, defect, P3)

Production
defect

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: dminor, Assigned: glob)

References

Details

(Keywords: conduit-triaged)

While trying to submit the patches for a webrtc.org update (Bug 1376873), I got a 500 from the phabricator instance. Looks like my patch is too large? The update commit itself is usually just a rubberstamp review because it is all upstream code. As a workaround, I could just request review on the subsequent commits. That would prevent me from using Lando to eventually land the series. Submit to Phabricator (YES/No/Always)? YES Creating new revision: 438415:f217733b7f91 Bug 1376873 - Update webrtc to release 64; r?ng e Exception [HTTP/500] Internal Server Error As received by the server, this request had a nonzero content length but no POST data. Normally, this indicates that it exceeds the 'post_max_size' setting in the PHP configuration on the server. Increase the 'post_max_size' setting or reduce the size of the request. Request size according to 'Content-Length' was '53727642', 'post_max_size' is set to '32M'. (Run with `--trace` for a full exception trace.) Exception: command 'arc' failed to complete successfully
(In reply to Mark Côté [:mcote] from comment #1) > Lando can land commit series: > https://groups.google.com/d/msg/mozilla.dev.platform/v_Y_5gJ20vA/g7EDnw3CCQAJ That doesn't help much if I can't submit my commit to Phabricator in the first place :)
Ah, sorry, I thought you said you could workaround your problem but then lando wouldn't work... so I was just saying that lando would work in this instance, if that makes your workaround viable. :)
In this case I don't think I could use Lando, because the first commit in the series (the third party code import) breaks a lot of things that the subsequent commits fix, so they have to land as a group. If each commit built independently then it wouldn't be a problem, I could push the import commit manually and then land the rest of the series using Lando. I'll say sorry too, in case I'm missing something :) Please let me know if you're willing to bump the maximum post size (if that is the problem) or if I should go ahead with my workaround. Thanks!
(In reply to Dan Minor [:dminor] from comment #4) > Please let me know if you're willing to bump the maximum post size (if that > is the problem) or if I should go ahead with my workaround. Thanks! The size is already 32M, which seems quite large. Upstream Phabricator actually recommends *not* using differential for changes this large, doing something out of band instead. I'm unsure how Phabricator would even handle display of a diff this large. :ckolos, any thoughts from an ops perspective on a larger 'post_max_size'? I think for now your workaround really is the best bet. We'll definitely want to figure something out for these cases when Lando becomes more of a requirement though. :glob might have thoughts around this as he has spent a bunch of time on m-c code vendoring practices.
Flags: needinfo?(ckolos)
I can bump it, but if upstream recommends against it, there's a good reason for it. However, if this is the new normal, then I don't want to be a blocker to the flow of things. If there's a simple modification (or one that makes more sense overall), I'd prefer that route.
Flags: needinfo?(ckolos)
I did an hg export to see if I could upload my patch to splinter, not knowing the limitation on bugzilla attachments was 10MB: dminor@treebeard:~/src/firefox-branchupdate$ hg export -r 0117a1355f87 > bug-1376873-update-webrtc-release64.patch dminor@treebeard:~/src/firefox-branchupdate$ ls -l bug-1376873-update-webrtc-release64.patch -rw-rw-r-- 1 dminor dminor 28010287 Sep 20 15:43 bug-1376873-update-webrtc-release64.patch It looks like the patch itself is "only" 27MB or so. It seems odd that the post size mentioned in comment 0 is so much larger than the patch size.
(In reply to Dan Minor [:dminor] from comment #7) > It looks like the patch itself is "only" 27MB or so. It seems odd that the > post size mentioned in comment 0 is so much larger than the patch size. arcanist will attempt to upload a diff with essentially infinite lines of context (so you get full file context expansion). That most likely explains the difference. As you say though "only" 27MB, heh...
(In reply to Steven MacLeod [:smacleod] from comment #5) > :glob might have thoughts around this as he has spent a > bunch of time on m-c code vendoring practices. from what i've seen so far webrtc is an outlier in terms of the size of vendored code, and it looks like dan's split the patch into consumable parts for review and landing.
I guess in the future we'll just have to split patches in to small chunks. I also had problems with the two commits containing code generated build files. It's a little unfortunate to have to split related changes up into separate commits just to make the code review tool happy, but since webrtc seems to be the only place we're running into trouble, and we do updates at most once a year, it doesn't seem worth while making changes just to accommodate it. Setting to WONTFIX, but I won't argue with anyone actually wanting to increase the limit :)
No longer blocks: 1376873
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → WONTFIX
Reopening at :drno's request so we can discuss this further during the next webrtc.org update. At the moment, we're not planning another update until Summer 2019.
Status: RESOLVED → REOPENED
Resolution: WONTFIX → ---

For what it's worth, the problem does not appear specific to webrtc. I believe that I hit it every time I attempt to update ./mach vendor rust.

i think rust vendoring is a slightly different case than webrtc, particularly around code review of vendored code.

when servo was automatically synchronised into mozilla-central, the mach vendor rust step was automated and was outside the scope of code review; the updates to the lock file were reviewed, not the resulting vendoring changes.

i think this points to issues with how we vendor projects, touching all languages. i have a project on my backburner to chase this down, however unfortunately i'm not expecting to have much time to put against it in the short term

With webrtc.org, I have problems in two places:

The first is with the import of the third party code itself. This is done as a separate commit and does not include any of our local modifications. I'd argue that this should be outside the scope of code review, it's all third party code, any required modifications need to be addressed upstream or our local patches. This is only an issue while doing an update.

The second is the json configuration files that are generated by gn and are in turn used to generate moz.build files. This is a problem while doing an update, but also whenever we need to change any gn build configuration. The json files generated are quite large and contain a lot of extraneous information. As a workaround, we might be able to cut down on the size of the generated files by filtering them prior to committing. I'd also argue that the json files should be outside the scope of code review. What should be reviewed are the changes to the gn configuration files themselves, not the resulting code generated files.

To date, I've worked around these problems by manually splitting commits up into smaller commits or requesting review through splinter, with the review pointing to a commit in my user hg.mozilla.org repo. Neither of these are ideal.

If the plan for the future is for all code to land through Lando, I think we need some way of getting large commits to Phabricator/Lando without having to worry about splitting commits up manually prior to submitting. Maybe that just means some tooling that runs prior to submitting code for review, maybe something more complicated that touches on our review policy for vendored and code generated code, I'm not really sure.

thanks for the extra detail there dminor.

(In reply to Dan Minor [:dminor] from comment #15)

If the plan for the future is for all code to land through Lando

this is indeed the plan; however there will be "escape hatches" as there's a lot of edge cases such as this one.

Maybe that just means some tooling that runs prior to submitting code for review

we need some tooling in place, however my initial thoughts are more that code that's generated or vendored generally shouldn't need to be explicitly reviewed, and so they shouldn't need to be pushed to phabricator. rather they could be generated by transplant when landing is requested. i know this is somewhat idealised and not a perfect solution, which is why we'll be exploring options here prior to taking action.

diving into this is something i plan on doing soonish; i'll make sure to reach out to you and others at that time.

Assignee: nobody → glob
Keywords: conduit-triaged

i'm going to explore options here and report back.

Flags: needinfo?(glob)
Priority: -- → P3

(In reply to Byron Jones ‹:glob› 🎈 from comment #17)

i'm going to explore options here and report back.

any progress? since this bug is last blocker for webrtc_updates updates, this would be nice to have sorted out :)

Sorry; i wasn't aware this was actually blocking webrtc updates.

Splitting up the code into smaller patches should through review be required is the best solution.

I'm still working through proposals and solutions to solidify and standardise our approach to reviewing of vendored third party code, with the goal of addressing the "is a review actually required of this code" question. The general consensus is that reviewing a patch of webrtc's size is not viable.

Calling arc diff with --less-context will result in smaller patches. I've filed bug 1549672 to expose this with moz-phab, however even this given the normal patch was 27M that's still likely to bump up against the 32M limit if base64 encoding is in the mix.

Status: REOPENED → RESOLVED
Closed: 6 years ago6 years ago
Flags: needinfo?(glob)
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.