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

s3: GCS compatibility #4956

Merged

Conversation

orymate
Copy link
Contributor

@orymate orymate commented May 9, 2024

Google Cloud Storage's implementation of the S3 API responds the following error to requests like
GET /bucket?uploads&prefix=p&key-marker=&upload-id-marker=:

<Error>
	<Code>InvalidArgument</Code>
	<Message>Invalid argument.</Message>
	<Details>Invalid upload ID marker: </Details>
</Error>

The changed code specifies these query parameters only in subsequent requests after we get a truncated response.

The boto3 Client.list_multipart_uploads() method doesn't accept None arguments, so this was the most readable solution that I could come up with.

Google Cloud Storage's implementation of the S3 API responds the
following error to a requests like
"GET /bucket?uploads&prefix=p&key-marker=&upload-id-marker=":

<Error>
	<Code>InvalidArgument</Code>
	<Message>Invalid argument.</Message>
	<Details>Invalid upload ID marker: </Details>
</Error>

Specify these query parameters only in subsequent requests after we get
a truncated response.

Signed-off-by: Mate Ory <mate.ory@axoflow.com>
@orymate orymate force-pushed the fix-s3-gcp-list-multipart-uploads branch from edc8126 to 1d9061b Compare May 13, 2024 07:01
@alltilla alltilla merged commit a09e4fb into syslog-ng:master May 13, 2024
20 checks passed
@orymate orymate deleted the fix-s3-gcp-list-multipart-uploads branch May 13, 2024 13:20
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.

None yet

2 participants