Skip to content

Conversation

leif-scality
Copy link

add BucketLoggingStatus to BucketInfo model

@bert-e
Copy link
Contributor

bert-e commented Oct 2, 2025

Hello leif-scality,

My role is to assist you with the merge of this
pull request. Please type @bert-e help to get information
on this process, or consult the user documentation.

Available options
name description privileged authored
/after_pull_request Wait for the given pull request id to be merged before continuing with the current one.
/bypass_author_approval Bypass the pull request author's approval
/bypass_build_status Bypass the build and test status
/bypass_commit_size Bypass the check on the size of the changeset TBA
/bypass_incompatible_branch Bypass the check on the source branch prefix
/bypass_jira_check Bypass the Jira issue check
/bypass_peer_approval Bypass the pull request peers' approval
/bypass_leader_approval Bypass the pull request leaders' approval
/approve Instruct Bert-E that the author has approved the pull request. ✍️
/create_pull_requests Allow the creation of integration pull requests.
/create_integration_branches Allow the creation of integration branches.
/no_octopus Prevent Wall-E from doing any octopus merge and use multiple consecutive merge instead
/unanimity Change review acceptance criteria from one reviewer at least to all reviewers
/wait Instruct Bert-E not to run until further notice.
Available commands
name description privileged
/help Print Bert-E's manual in the pull request.
/status Print Bert-E's current status in the pull request TBA
/clear Remove all comments from Bert-E from the history TBA
/retry Re-start a fresh build TBA
/build Re-start a fresh build TBA
/force_reset Delete integration branches & pull requests, and restart merge process from the beginning.
/reset Try to remove integration branches unless there are commits on them which do not appear on the source branch.

Status report is not available.

@bert-e
Copy link
Contributor

bert-e commented Oct 2, 2025

Incorrect fix version

The Fix Version/s in issue ARSN-528 contains:

  • None

Considering where you are trying to merge, I ignored possible hotfix versions and I expected to find:

  • 8.2.33

  • 8.3.0

Please check the Fix Version/s of ARSN-528, or the target
branch of this pull request.

@leif-scality leif-scality force-pushed the improvement/ARSN-528-add-bucketloggingstatus-model branch from e6293e8 to ef0c028 Compare October 2, 2025 15:48
Copy link

codecov bot commented Oct 2, 2025

Codecov Report

❌ Patch coverage is 55.35714% with 25 lines in your changes missing coverage. Please review.
✅ Project coverage is 71.01%. Comparing base (fb44b3b) to head (4b4ea42).
⚠️ Report is 4 commits behind head on development/8.2.

Files with missing lines Patch % Lines
lib/models/BucketLoggingStatus.ts 62.85% 13 Missing ⚠️
lib/models/BucketInfo.ts 53.84% 6 Missing ⚠️
lib/s3routes/routes/routePUT.ts 20.00% 4 Missing ⚠️
lib/s3routes/routes/routeGET.ts 0.00% 2 Missing ⚠️
Additional details and impacted files
@@                 Coverage Diff                 @@
##           development/8.2    #2538      +/-   ##
===================================================
- Coverage            71.07%   71.01%   -0.06%     
===================================================
  Files                  220      221       +1     
  Lines                17729    17781      +52     
  Branches              3652     3688      +36     
===================================================
+ Hits                 12601    12628      +27     
- Misses                5124     5149      +25     
  Partials                 4        4              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@dvasilas dvasilas self-requested a review October 2, 2025 16:30
Copy link
Contributor

@jonathan-gramain jonathan-gramain left a comment

Choose a reason for hiding this comment

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

LGTM (I can review again in the final version)

} catch (err) {
return {
error: { arsenalError: errors.MalformedXML, details: err },
res: undefined,
Copy link
Contributor

Choose a reason for hiding this comment

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

I assume we probably don't need to add an undefined res property (if we do, then maybe we need to revisit how we interpret the results to avoid being too javascript-centric).

import { AzureInfoMetadata } from './BucketAzureInfo';
import BucketLoggingStatus from './BucketLoggingStatus';

// WHEN UPDATING THIS NUMBER, UPDATE BucketInfoModelVersion.md CHANGELOG
Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Author

Choose a reason for hiding this comment

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

Where should I do the bump?

Copy link
Contributor

Choose a reason for hiding this comment

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

1 or 2 line below there is the variable


export type LoggingEnabled = {
TargetBucket: string;
TargetPrefix: string;
Copy link
Contributor

Choose a reason for hiding this comment

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

should we include optional TargetGrants and TargetObjectKeyFormat ? https://docs.aws.amazon.com/AmazonS3/latest/API/API_LoggingEnabled.html

Copy link
Contributor

Choose a reason for hiding this comment

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

nvm I see they are not implemented

Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe add a comment in here to describe that those 2 fields are not implemented

Copy link
Author

Choose a reason for hiding this comment

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

done

return {
error: {
arsenalError: errors.NotImplemented,
details: 'TargetGrants tag in LoggingEnabled is not implemented',
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
details: 'TargetGrants tag in LoggingEnabled is not implemented',
details: 'TargetGrants field in LoggingEnabled is not implemented',

Copy link
Contributor

Choose a reason for hiding this comment

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

is it aws that use tag instead of field in their error description ?

Copy link
Author

Choose a reason for hiding this comment

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

changed, XML uses tag and element but we can use field

Comment on lines +119 to +141
arsenalError: errors.NotImplemented,
details: 'TargetObjectKeyFormat tag in LoggingEnabled is not implemented',
Copy link
Contributor

Choose a reason for hiding this comment

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

How is details going to be used ? Instead should we rather add a custom description directly on the error, to be returned to the client: errorInstances.NotImplemented.customDescription('...')

Copy link
Contributor

Choose a reason for hiding this comment

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

You can generate a unit test with AI to covers these

};
}

if (parsed.BuckerLoggingStatus.LoggingEnabled.TargetGrants) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
if (parsed.BuckerLoggingStatus.LoggingEnabled.TargetGrants) {
if (parsed.BucketLoggingStatus.LoggingEnabled.TargetGrants) {

Copy link
Author

Choose a reason for hiding this comment

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

fixed

};
}

if (parsed.BuckerLoggingStatus.LoggingEnabled.TargetObjectKeyFormat) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
if (parsed.BuckerLoggingStatus.LoggingEnabled.TargetObjectKeyFormat) {
if (parsed.BucketLoggingStatus.LoggingEnabled.TargetObjectKeyFormat) {

Copy link
Author

Choose a reason for hiding this comment

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

fixed

Comment on lines 127 to 149
TargetPrefix: parsed.BucketLoggingStatus.LoggingEnabled.TargetPrefix[0],
TargetBucket: parsed.BucketLoggingStatus.LoggingEnabled.TargetBucket[0],
Copy link
Contributor

Choose a reason for hiding this comment

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

Aws performs no validation on those fields ?

Because bucket name is pretty restrictive format, and prefix should probably not go beyond a certains size

Copy link
Author

Choose a reason for hiding this comment

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

@leif-scality leif-scality force-pushed the improvement/ARSN-528-add-bucketloggingstatus-model branch 2 times, most recently from fce43fb to 823a3ef Compare October 3, 2025 15:36
@leif-scality leif-scality force-pushed the improvement/ARSN-528-add-bucketloggingstatus-model branch from 823a3ef to edebec8 Compare October 3, 2025 15:43
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.

5 participants