You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "Russole (via GitHub)" <gi...@apache.org> on 2026/03/31 18:08:50 UTC
[PR] HDDS-14795. Move the character length check to the server if the strict S3 naming flag is enabled [ozone]
Russole opened a new pull request, #10014:
URL: https://github.com/apache/ozone/pull/10014
## What changes were proposed in this pull request?
* Apply S3 bucket name length (3–63) validation only when strict S3 naming is enabled
* Allow non-S3-compliant bucket names when strict S3 is disabled
* Keep existing length validation unchanged for volume name
## What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-14795
## How was this patch tested?
- Updated and added unit tests for strict and non-strict bucket naming
- All CI checks passed
- https://github.com/Russole/ozone/actions/runs/23796758818
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
Re: [PR] HDDS-14795. Move the character length check to the server if the strict S3 naming flag is enabled [ozone]
Posted by "Gargi-jais11 (via GitHub)" <gi...@apache.org>.
Gargi-jais11 commented on code in PR #10014:
URL: https://github.com/apache/ozone/pull/10014#discussion_r3019642222
##########
hadoop-ozone/ozone-manager/src/test/java/org/apache/hadoop/ozone/om/request/bucket/TestOMBucketCreateRequest.java:
##########
@@ -68,15 +68,24 @@ public void testPreExecute() throws Exception {
}
@Test
- public void preExecuteRejectsInvalidBucketName() {
- // Verify invalid bucket name throws exception
+ public void preExecuteRejectsShortBucketNameWhenStrictS3Enabled() {
+ when(ozoneManager.isStrictS3()).thenReturn(true);
+
OMException omException = assertThrows(OMException.class,
() -> doPreExecute("volume1", "b1"));
assertEquals(
"bucket name 'b1' is too short, valid length is 3-63 characters",
omException.getMessage());
}
+ @Test
+ public void preExecuteAllowsShortBucketNameWhenStrictS3Disabled()
Review Comment:
Similarly, you can check if isS3strict=false then larger bucket name ( > 63) is allowed.
##########
hadoop-ozone/ozone-manager/src/test/java/org/apache/hadoop/ozone/om/request/bucket/TestOMBucketCreateRequest.java:
##########
@@ -68,15 +68,24 @@ public void testPreExecute() throws Exception {
}
@Test
- public void preExecuteRejectsInvalidBucketName() {
- // Verify invalid bucket name throws exception
+ public void preExecuteRejectsShortBucketNameWhenStrictS3Enabled() {
Review Comment:
Make this Parameterised and pass both bucket name less than 3 length and bucket name greater than 63 length, then check suck bucket names should be rejected.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
Re: [PR] HDDS-14795. Allow non-S3-compliant bucket name length if strict S3 is disabled [ozone]
Posted by "jojochuang (via GitHub)" <gi...@apache.org>.
jojochuang commented on PR #10014:
URL: https://github.com/apache/ozone/pull/10014#issuecomment-4180659881
Please update user doc here regarding the non-S3 compliant behavior: https://ozone.apache.org/docs/core-concepts/namespace/buckets/overview#what-is-a-bucket
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
Re: [PR] HDDS-14795. Move the character length check to the server if the strict S3 naming flag is enabled [ozone]
Posted by "Russole (via GitHub)" <gi...@apache.org>.
Russole commented on PR #10014:
URL: https://github.com/apache/ozone/pull/10014#issuecomment-4171312164
Thanks @Gargi-jais11 for the review. Updated the test to a parameterized test and covered both cases.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
Re: [PR] HDDS-14795. Allow non-S3-compliant bucket name length if strict S3 is disabled [ozone]
Posted by "adoroszlai (via GitHub)" <gi...@apache.org>.
adoroszlai merged PR #10014:
URL: https://github.com/apache/ozone/pull/10014
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
Re: [PR] HDDS-14795. Allow non-S3-compliant bucket name length if strict S3 is disabled [ozone]
Posted by "adoroszlai (via GitHub)" <gi...@apache.org>.
adoroszlai commented on PR #10014:
URL: https://github.com/apache/ozone/pull/10014#issuecomment-4180224980
Thanks @Russole for the patch, @Gargi-jais11 for the review. @sadanand48 please let us know if any further changes are needed.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
Re: [PR] HDDS-14795. Move the character length check to the server if the strict S3 naming flag is enabled [ozone]
Posted by "Russole (via GitHub)" <gi...@apache.org>.
Russole commented on PR #10014:
URL: https://github.com/apache/ozone/pull/10014#issuecomment-4164482231
Hi @sadanand48 , could you please review this PR when you have time? Thank you!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org