Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • briar briar
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 789
    • Issues 789
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 9
    • Merge requests 9
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • briarbriar
  • briarbriar
  • Merge requests
  • !1655

Add mailbox plugin and file manager for downloads

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged akwizgran requested to merge 2292-mailbox-file-manager into master Jun 02, 2022
  • Overview 11
  • Commits 4
  • Pipelines 6
  • Changes 22

This branch adds a mailbox plugin and a file manager for handling mailbox downloads. The upload parts of the file manager will be added later.

A download worker can call MailboxFileManager#createTempFileForDownload() to create a local file that can be passed to MailboxApi#getFile(). When the download finishes, the worker calls MailboxFileManager#handleDownloadedFile(). The file manager is responsible for the file from this point on.

The file manager uses the plugin to create a TransportConnectionReader for reading from the file. This is passed to the ConnectionManager. If the read succeeds then the file is deleted. The file is also deleted if the read fails, unless the app is shutting down, in which case the manager leaves the file in the download directory and tries again to process it at the next startup. This is meant to prevent files from being wrongly deleted if the read is interrupted during shutdown.

Part of #2292 (closed).

Edited Jun 03, 2022 by akwizgran
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: 2292-mailbox-file-manager