Yicong-Huang commented on code in PR #8262:
URL: https://github.com/apache/texera/pull/8262#discussion_r4073214387
##########
amber/src/main/python/pytexera/storage/large_binary_manager.py:
##########
@@ -84,10 +85,20 @@ def _ensure_bucket_exists(self, bucket: str):
s3 = self._get_s3_client()
try:
s3.head_bucket(Bucket=bucket)
- except s3.exceptions.NoSuchBucket:
+ except ClientError as error:
+ if error.response["Error"]["Code"] not in (
+ "404",
+ "NoSuchBucket",
+ "NotFound",
Review Comment:
**Advisory:**
The `"NotFound"` entry in this allowlist has no test coverage and is not a
modeled botocore S3 error: I checked the botocore S3 service model and
`HeadBucket`'s only modeled error shape is `NoSuchBucket`. The `"404"` and
`"NoSuchBucket"` entries are both pinned by tests. Which backend returns
`"NotFound"` from HeadBucket? If it is speculative, consider dropping it or
adding a test: this allowlist gates bucket creation, so each entry should be
observed rather than guessed.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]