Page MenuHomePhabricator

Make the repository "Filesize Limit" and "Clone/Fetch Timeout" configurable in the UI
ClosedPublic

Authored by epriestley on Thu, Nov 22, 1:18 AM.

Details

Summary

Depends on D19830. Ref T13216. See PHI908. See PHI750. See PHI885. Allow users to configure a filesize limit, and allow them to adjust the clone/fetch timeout.

Test Plan

  • Configured a filesize limit and pushed, hit it. Made the limit larger and pushed, change went through.

Diff Detail

Repository
rP Phabricator
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

epriestley created this revision.Thu, Nov 22, 1:18 AM
Owners added a subscriber: Restricted Owners Package.Thu, Nov 22, 1:18 AM
epriestley requested review of this revision.Thu, Nov 22, 1:20 AM
epriestley marked an inline comment as done.Sun, Nov 25, 11:38 PM
epriestley added inline comments.
src/applications/diffusion/management/DiffusionRepositoryLimitsManagementPanel.php
102

(Ignore this, test.)

amckinley accepted this revision.Wed, Nov 28, 6:25 PM
amckinley added inline comments.
src/applications/diffusion/editor/DiffusionRepositoryEditEngine.php
475

I guess it's your own damn fault if you set filesize limit to "🐐" or something, but I'm kind of surprised there's no PhabricatorNautralNumberEditField or similar.

src/applications/diffusion/management/DiffusionRepositoryLimitsManagementPanel.php
25

This is so we can eventually enable a default value for this?

src/applications/repository/storage/PhabricatorRepository.php
1901

If it's too late to change this, no big deal, but limit.copyTime or similar might be more clear.

src/applications/repository/xaction/PhabricatorRepositoryCopyTimeLimitTransaction.php
10

Just making sure you meant to use getCopyTimeLimit() instead of getEffectiveCopyTimeLimit() here. I guess this version makes more sense because if we changed the default in the code, suddenly old transactions would render differently.

65–73

And this handles the validation I was worried about above.

src/applications/repository/xaction/PhabricatorRepositoryFilesizeLimitTransaction.php
69

"Unable to parse filesize limit, specify a positive number of bytes."

src/docs/user/userguide/diffusion_managing.diviner
249

This also affects the timeout on the initial import, right? Worth documenting as "If you're having trouble importing a particularly large repository, try increasing this value above the default (900 seconds)."?

This revision is now accepted and ready to land.Wed, Nov 28, 6:25 PM
This revision was automatically updated to reflect the committed changes.