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

Lifecycle should not remove a protected version #10189

Merged
merged 2 commits into from Aug 4, 2020

Conversation

vadmeste
Copy link
Member

@vadmeste vadmeste commented Aug 3, 2020

Description

Lifecycle should be prevented from removing versions protected by locking

Motivation and Context

Fix an issue after review

How to test this PR?

Use the following lifecycle:

{
    "Rules": [
        {
            "Expiration": {
                "Date": "2020-07-27T00:00:00.000Z"
            },
            "ID": "TempUploads2",
            "Filter": {
                "Prefix": ""
            },
            "Status": "Enabled",
            "NoncurrentVersionExpiration": {
                "NoncurrentDays": 1
            }
        }
    ]
}
  1. upload some versions of the same object
  2. active object locking with mc lock and upload new objects again
  3. mc ls --versions to see what versions are removed (you need to play with your machine date/time)

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • Fixes a regression (If yes, please add commit-id or PR # here)
  • Documentation needed
  • Unit tests needed

@minio-trusted
Copy link
Contributor

Mint Automation

Test Result
mint-xl.sh ✔️
mint-large-bucket.sh ✔️
mint-fs.sh ✔️
mint-dist-xl.sh ✔️
mint-gateway-s3.sh ✔️
mint-gateway-azure.sh ✔️
mint-gateway-nas.sh ✔️
mint-zoned.sh more...

10189-680721a/mint-zoned.sh.log:

Running with
SERVER_ENDPOINT:      minio-dev8.minio.io:32366
ACCESS_KEY:           minio
SECRET_KEY:           ***REDACTED***
ENABLE_HTTPS:         0
SERVER_REGION:        us-east-1
MINT_DATA_DIR:        /mint/data
MINT_MODE:            full
ENABLE_VIRTUAL_STYLE: 0

To get logs, run 'docker cp 1ad92492cb20:/mint/log /tmp/mint-logs'

(1/15) Running aws-sdk-go tests ... done in 2 seconds
(2/15) Running aws-sdk-java tests ... done in 2 seconds
(3/15) Running aws-sdk-php tests ... done in 43 seconds
(4/15) Running aws-sdk-ruby tests ... done in 5 seconds
(5/15) Running awscli tests ... done in 2 minutes and 19 seconds
(6/15) Running healthcheck tests ... done in 0 seconds
(7/15) Running mc tests ... done in 50 seconds
(8/15) Running minio-dotnet tests ... done in 55 seconds
(9/15) Running minio-go tests ... done in 1 minutes and 20 seconds
(10/15) Running minio-java tests ... done in 1 minutes and 33 seconds
(11/15) Running minio-js tests ... done in 1 minutes and 2 seconds
(12/15) Running minio-py tests ... done in 2 minutes and 47 seconds
(13/15) Running s3cmd tests ... FAILED in 25 seconds
{
  "name": "s3cmd",
  "duration": "11392",
  "function": "test_sync_list_objects",
  "status": "FAIL",
  "error": "WARNING: Bucket is not empty. Removing all the objects from it first. This may take some time...\nERROR: S3 error: 404 (Not Found)"
}
(13/15) Running s3select tests ... done in 13 seconds
(14/15) Running security tests ... done in 0 seconds

Executed 14 out of 15 tests successfully.

Deleting image on docker hub
Deleting image locally

Copy link
Contributor

@poornas poornas left a comment

Choose a reason for hiding this comment

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

LGTM

@harshavardhana harshavardhana merged commit 6ae30b2 into minio:master Aug 4, 2020
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.

None yet

4 participants