Bound the FTP connections allod site deploy opens #186
Labels
No labels
blocked
bug
decision
duplicate
enhancement
help wanted
invalid
landed?
question
ready-to-merge
stale
wontfix
bug
duplicate
enhancement
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
allod/tools#186
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Cap the simultaneous FTP connections
allod site deployopens so a sync to shared hosting finishes instead of tripping the host's per-client connection limit partway through (the failure in allod/tools#184).Primary goals:
rclone syncthat deploy runs passes--transfers,--checkers, and--ftp-concurrency, with the concurrency one more than the sum of the other two, as rclone's FTP documentation requires for a sync to avoid deadlock.--dry-runpasses the same flags, so its listing exercises the same connection budget.Current state and specifics
siteDeployincmd/allod/site.gobuildssyncArgsassync <store path> <docroot>, the profile's--filter-from,--backup-dir, and--verbose, then--dry-runwhen asked. rclone's defaults fill the rest: four transfers, eight checkers, and the FTP backend'sconcurrencyof 0, unlimited. Directory listing during the check phase is what opens connections in parallel; with the store-path timestamps honoured by the host, the transfer set of a typical deploy is small and the listings still exceed the limit (allod/tools#184).The flags belong in the deploy's own argv, next to
--backup-dir, rather than in the rclone config stanza: the stanza is the credential, placed by agenix and rotated byrotate-token, and its parser accepts exactly the five keysallod site configwrites.Scope
In: the three flags in
siteDeploy's sync argv, the test that pins them, and one sentence in the deploy detail prose saying the sync is connection-bounded.Out: making the numbers a hosting-profile field (trigger: a host whose limit the fixed values do not fit), and
check, which opens one connection.