Loading
Draft: Make the MCP artifact archive cap an application setting
What does this MR do and why?
Option A of #629157 (closed): make the get_artifact_file archive download cap admin-tunable instead of a hard-coded constant.
- Adds
mcp_max_artifact_archive_size_mb(integer, default 20) to the existingmcp_server_settingsJSONB accessor onApplicationSetting— no migration. - JSON-schema entry plus a numericality validation (integer, greater than 0).
- Exposed through
visible_attributesin the same self-managed-only branch asmcp_server_enabled, so self-managed admins tune it through the settings API while GitLab.com stays on the shipped default; the OpenAPI document is regenerated accordingly. Mcp::Tools::Jobs::GetArtifactFileServicereads the setting per call instead ofMAX_ARCHIVE_BYTES, and a spec covers a raised cap admitting an archive the default would refuse.
Why this is a Draft
The competing option — ranged reads that remove the whole-archive download entirely — is implemented in !255762 (merged). If that lands, this setting loses its reason to exist, and settings are permanent surface once shipped. The direction is being decided in #629157 (closed); this MR leaves draft only if that discussion picks the setting.
Related to #629157 (closed)
Edited by Tian Gao