Skip to content
Snippets Groups Projects

batches: Remote Mount #3 - HTTP API

Created by: Piszmog

Part of #31792.

Previous part: #40809

Add HTTP API endpoint to upload, retrieve, and check if files exist. Endpoints are included as part of the external services and the executor services.

Overview

The FileHandler has a single ServerHTTP function that handles GET (retrieval), HEAD (existence check), and POST (upload). The GET and HEAD are nothing unique. POST on the other hand receives a multipart/form-data as the request. POST also has a security check to ensure either a site admin or the creator of the batch spec is uploading the file (not sure if this should apply to all the methods :thinking: ).

POST limits the max size of the request to 10MB (I made this number up). In the future when not using Postgres to store the file content, this can be updated to stream the chunks (there is a comment with a link to an example repo).

Follow up

  • Will request a security review after team approval

Test plan

Add Go Unit Tests

Merge request reports

Approval is optional
The source branch rc/remote-mount-httpapi does not exist. Please restore it or use a different source branch.

Merge details

  • 30 commits and 1 merge commit will be added to rc/remote-mount-graphql.
  • Source branch will not be deleted.

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
Please register or sign in to reply
Loading