Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disallow composing more than 32 objects at once #1254

Merged
merged 1 commit into from
Jul 30, 2023
Merged

Disallow composing more than 32 objects at once #1254

merged 1 commit into from
Jul 30, 2023

Conversation

manuteleco
Copy link
Contributor

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.

Copy link
Owner

@fsouza fsouza left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for contributing! Can you add a test?

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
Copy link
Owner

@fsouza fsouza left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@fsouza fsouza merged commit 63221c8 into fsouza:main Jul 30, 2023
@manuteleco manuteleco deleted the limit_compose_to_32_objects branch July 30, 2023 15:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants