noobaa-core icon indicating copy to clipboard operation
noobaa-core copied to clipboard

s3_put_bucket_lifecycle validations should be more compatible with AWS

Open dannyzaken opened this issue 4 months ago • 0 comments

Environment info

  • NooBaa Version: VERSION
  • Platform: Kubernetes 1.14.1 | minikube 1.1.1 | OpenShift 4.1 | other: specify

Actual behavior

  1. following https://github.com/noobaa/noobaa-core/pull/8424, we accept all types of lifecycle configurations, including the deprecated Prefix field
  2. We should improve the validation of the configuration in the request. I noticed a few things that AWS does in their verifications, there might be more. e.g.:
    • if Prefix is sent, then the entire configuration is considered V1 , and any rule that contain a Filter will result in this error
      Filter element can only be used in Lifecycle V2.
      
    • if using V1, overlapping prefixes in different rules with the same action are not allowed. e.g.:
      Found overlapping prefixes 'dir/' and 'di' for same action type 'AbortIncompleteMultipartUpload'
      
      This is accepted in lifecycle V2
  3. We should consider how we want to handle these restrictions and if we want to follow it or be more permisive.
  4. in addition, we should add validations for all other actions before accepting the configuration

Expected behavior

Steps to reproduce

More information - Screenshots / Logs / Other output

dannyzaken avatar Oct 01 '24 16:10 dannyzaken