Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added a check for duplicate Id in bucket lifecycle rules #8629

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

achouhan09
Copy link
Member

@achouhan09 achouhan09 commented Dec 26, 2024

Explain the changes

  1. Added a check for duplicate Id in bucket lifecycle rules.

Issues: Fixed #xxx / Gap #xxx

  1. Fixed: NSFS | S3 | Lifecycle: two rules with the same ID are accepted #8550

Testing Instructions:

  • Tests added

@achouhan09 achouhan09 requested review from liranmauda, shirady, naveenpaul1, a team and alphaprinz and removed request for a team December 26, 2024 16:43
@achouhan09 achouhan09 changed the title NSFS | Added a check for duplicate Id in bucket lifecycle rules Added a check for duplicate Id in bucket lifecycle rules Dec 30, 2024
@achouhan09 achouhan09 requested a review from romayalon December 30, 2024 12:05
@romayalon
Copy link
Contributor

Hey @achouhan09

  1. Can you please link to the Issues section the bug you are fixing?
  2. Please add tests
  3. Are you following S3 protocol by throwing InvalidArgument error? please make sure this is the expected error code

@achouhan09
Copy link
Member Author

Hi @romayalon
Added issue link and tests. Thanks

check this for the AWS s3 protocol. I think InvalidArgument error suits here.

exports.test_rule_duplicate_id = async function(Bucket, Key, s3) {
const putLifecycleParams = duplicate_id_lifecycle_configuration(Bucket, Key);

await s3.putBucketLifecycleConfiguration(putLifecycleParams)
Copy link
Contributor

Choose a reason for hiding this comment

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

Why do you use a promise chain here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

NSFS | S3 | Lifecycle: two rules with the same ID are accepted
3 participants