Skip to content

Conversation

@kuenishi
Copy link
Member

What changes were proposed in this pull request?

(Please fill in changes proposed in this fix)

What is the link to the Apache JIRA

(Please create an issue in ASF JIRA before opening a pull request,
and you need to set the title of the pull request which starts with
the corresponding JIRA issue number. (e.g. HDDS-XXXX. Fix a typo in YYY.)

Please replace this section with the link to the Apache JIRA)

How was this patch tested?

(Please explain how this patch was tested. Ex: unit tests, manual tests)
(If this patch involves UI changes, please attach a screen-shot; otherwise, remove this)

@kuenishi kuenishi changed the base branch from pfn-ozone-1.3.990007 to pfn-ozone-1.3.990008 August 14, 2023 06:12
@kuenishi kuenishi marked this pull request as ready for review August 15, 2023 03:05
@kuenishi kuenishi requested a review from k5342 August 15, 2023 03:05
Comment on lines +386 to +395
protected Optional<Response> checkIfReadonly() {
// Check if the S3Gateway is in read-only mode or not.
if (getClient().getConfiguration().getBoolean(
S3GatewayConfigKeys.OZONE_S3G_READONLY,
S3GatewayConfigKeys.OZONE_S3G_READONLY_DEFAULT)) {
return Optional.of(Response.status(HttpStatus.SC_METHOD_NOT_ALLOWED).
header("Allow", "GET,HEAD").build());
}
return Optional.empty();
}
Copy link
Member

Choose a reason for hiding this comment

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

nit: I think throwing newError() here is a more uniform way.

Copy link
Member

Choose a reason for hiding this comment

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

Ah, we need to serve allowed methods because we use 405 error code here. I understand.

"dir1", null, null, null, null, null);

Assert.assertEquals(Status.OK.getStatusCode(), response.getStatus());
}
Copy link
Member

Choose a reason for hiding this comment

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

Do we need a test for initializeMultipartUpload here?

@kuenishi kuenishi requested a review from k5342 August 15, 2023 05:48
@kuenishi kuenishi merged commit 1ad9c8f into pfn-ozone-1.3.990008 Aug 15, 2023
@kuenishi kuenishi deleted the readonly branch August 15, 2023 05:51
k5342 pushed a commit that referenced this pull request Mar 27, 2024
(cherry picked from commit 1ad9c8f)

Tweak tests
k5342 pushed a commit that referenced this pull request Dec 10, 2024
(cherry picked from commit 1ad9c8f)

Tweak tests
k5342 pushed a commit that referenced this pull request Dec 10, 2024
(cherry picked from commit 1ad9c8f)

Tweak tests
k5342 pushed a commit that referenced this pull request Dec 11, 2024
(cherry picked from commit 1ad9c8f)

Tweak tests
k5342 pushed a commit that referenced this pull request Feb 18, 2025
(cherry picked from commit 1ad9c8f)

Tweak tests
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.

3 participants