[PR #1254] [MERGED] Disallow composing more than 32 objects at once #1331

Closed
opened 2026-03-03 12:34:07 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/fsouza/fake-gcs-server/pull/1254
Author: @manuteleco
Created: 7/17/2023
Status: Merged
Merged: 7/30/2023
Merged by: @fsouza

Base: mainHead: limit_compose_to_32_objects


📝 Commits (1)

  • b83a306 Disallow composing more than 32 objects at once

📊 Changes

2 files changed (+23 additions, -0 deletions)

View changed files

📝 fakestorage/object.go (+8 -0)
📝 fakestorage/object_test.go (+15 -0)

📄 Description

The Google Cloud Storage API does not allow it either (see documentation). Trying to compose more than 32 objects at once qualifies as a 400 BadRequest. This is the body that GCS returns in such a case:

{
  "error": {
    "code": 400,
    "message": "The number of source components provided (33) exceeds the maximum (32)",
    "errors": [
      {
        "message": "The number of source components provided (33) exceeds the maximum (32)",
        "domain": "global",
        "reason": "invalid"
      }
    ]
  }
}

Note that GCS supports composing more than 32 objects into one. But it requires multiple compose calls, each one composing at most 32 objects in one go.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/fsouza/fake-gcs-server/pull/1254 **Author:** [@manuteleco](https://github.com/manuteleco) **Created:** 7/17/2023 **Status:** ✅ Merged **Merged:** 7/30/2023 **Merged by:** [@fsouza](https://github.com/fsouza) **Base:** `main` ← **Head:** `limit_compose_to_32_objects` --- ### 📝 Commits (1) - [`b83a306`](https://github.com/fsouza/fake-gcs-server/commit/b83a30642523804fe274b8206bc6a81c2f933b6f) Disallow composing more than 32 objects at once ### 📊 Changes **2 files changed** (+23 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `fakestorage/object.go` (+8 -0) 📝 `fakestorage/object_test.go` (+15 -0) </details> ### 📄 Description The Google Cloud Storage API does not allow it either (see [documentation][1]). Trying to compose more than 32 objects at once qualifies as a 400 BadRequest. This is the body that GCS returns in such a case: ```json { "error": { "code": 400, "message": "The number of source components provided (33) exceeds the maximum (32)", "errors": [ { "message": "The number of source components provided (33) exceeds the maximum (32)", "domain": "global", "reason": "invalid" } ] } } ``` Note that GCS supports composing more than 32 objects into one. But it requires multiple `compose` calls, each one composing at most 32 objects in one go. [1]: https://cloud.google.com/storage/docs/json_api/v1/objects/compose --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-03 12:34:07 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/fake-gcs-server#1331
No description provided.