[go: up one dir, main page]

Skip to content

File and Job API: Support Range Header

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

Problem to solve

When downloading large files on File and Job/Trace API, we have to download the entire file. For example, when using a python script, the whole file is in memory.

To avoid this, there is an HTTP Header "Range" (bytes) which is designed to support "chunk download".

Exemple

curl -r 0-256 -H "PRIVATE-TOKEN: $GITLAB_TOKEN" https://gitlab.com/api/v4/projects/XXXXX/jobs/YYYY/trace

will download first 256 octets.

Like HEAD and sha256 it will preserve bandwith.

Intended users

Developers, SysAdmin.

User experience goal

The user should be able to partial download a file without exploding memory and escape from OOM Killer :)

Proposal

Add support to byte range header and return partial content on Files and Job traces.

Links / references

https://tools.ietf.org/html/rfc7233 https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Range

Edited by 🤖 GitLab Bot 🤖