This repository was archived by the owner on Oct 12, 2026. It is now read-only.
Repository navigation
bucket-logging: test for log record fields - #667
Merged
Merged
Conversation
yuvalif
reviewed
Jul 1, 2025
| @pytest.mark.bucket_logging | ||
| @pytest.mark.fails_on_aws | ||
| def test_bucket_logging_acl_required(): | ||
| _bucket_logging_acl_required() |
Contributor
There was a problem hiding this comment.
if you donr parameterize the test, you probably can just implement it here, and dont need a helper function
yuvalif
reviewed
Jul 1, 2025
| key = 'my-test-object' | ||
| _set_log_bucket_policy(client, log_bucket_name, [src_bucket_name], [prefix]) | ||
|
|
||
| #client.put_bucket_acl(Bucket=src_bucket_name, ACL='public-read') |
Contributor
There was a problem hiding this comment.
any reason why not ACL at bucket level?
Contributor
Author
There was a problem hiding this comment.
The Read ACL at the bucket level allows the grantee to list the objects in the bucket. To actually download the object, the ACL is required to be set at the object level.
yuvalif
reviewed
Jul 1, 2025
| logger.info('bucket log record: %s', json.dumps(parsed_record, indent=4)) | ||
| if bucket_name in record and event_type in record and object_key in record: | ||
| if field_name in parsed_record: | ||
| val = parsed_record[field_name] |
Contributor
There was a problem hiding this comment.
you should probably wrap that with try/except of KeyError in case that the field name does not exist
nbalacha
force-pushed
the
wip-nbalacha-71730
branch
from
July 2, 2025 04:41
73eb35e to
bd5d087
Compare
yuvalif
approved these changes
Jul 2, 2025
nbalacha
force-pushed
the
wip-nbalacha-71730
branch
from
July 3, 2025 10:13
2c0043b to
28fd484
Compare
Tests that the AclRequired field is set correctly in the bucket logging record. Signed-off-by: N Balachandran <[email protected]>
Fixes typo in function name. Signed-off-by: N Balachandran <[email protected]>
nbalacha
force-pushed
the
wip-nbalacha-71730
branch
from
July 3, 2025 10:37
28fd484 to
089d96d
Compare
yuvalif
approved these changes
Jul 7, 2025
4 of 14 tasks
Contributor
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Tests that the AclRequired field is set correctly in the bucket logging record.