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

gateway tagging handle copyobject replace tagging #9711

Merged
merged 2 commits into from May 27, 2020

Conversation

BigUstad
Copy link
Contributor

Description

X-Amz-Tagging-Directive set to REPLACE for CopyObject in gateway for some conditions.
Also handles the very specific case where replace tagging directive is set but no tags are given

Motivation and Context

How to test this PR?

Use CopyObject() API or copy-object cli command with arguments/values suitably set for tagging-directive and tagging. Below are 4 different cases:

  1. Copy object without tagging-directive (default is COPY)
  2. Copy object with tagging-directive (COPY)
  3. Copy object with tagging-directive (REPLACE) with tags to replace existing tagging
  4. Copy object with tagging-directive (REPLACE) but without any tags, so it should remove the existing tags.

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
  • Functional tests needed (If yes, add mint PR # here: )

Also handles the very specific case where replace tagging directive is set but no tags are given
cmd/object-handlers.go Outdated Show resolved Hide resolved
@harshavardhana harshavardhana merged commit 9d39fb3 into minio:master May 27, 2020
@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 more...

9711-83c7e6a/mint-gateway-nas.sh.log:

Running with
SERVER_ENDPOINT:      minio-dev3.minio.io:30061
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 28f907cc252e:/mint/log /tmp/mint-logs'

(1/15) Running aws-sdk-go tests ... done in 0 seconds
(2/15) Running aws-sdk-java tests ... done in 2 seconds
(3/15) Running aws-sdk-php tests ... done in 1 seconds
(4/15) Running aws-sdk-ruby tests ... done in 2 seconds
(5/15) Running awscli tests ... done in 1 minutes and 7 seconds
(6/15) Running healthcheck tests ... done in 1 seconds
(7/15) Running mc tests ... done in 16 seconds
(8/15) Running minio-dotnet tests ... done in 29 seconds
(9/15) Running minio-go tests ... done in 25 seconds
(10/15) Running minio-java tests ... done in 24 seconds
(11/15) Running minio-js tests ... FAILED in 12 seconds
{
  "name": "minio-js",
  "function": "getBucketPolicy(bucketName, cb)",
  "args": "bucketName:minio-js-test-730dbb0d-ea3e-4125-835c-514c32c9cf84",
  "duration": 15,
  "status": "FAIL",
  "error": "S3Error: The bucket policy does not exist at Object.parseError (node_modules/minio/dist/main/xml-parsers.js:86:11) at /mint/run/core/minio-js/node_modules/minio/dist/main/transformers.js:156:22 at DestroyableTransform._flush (node_modules/minio/dist/main/transformers.js:80:10) at DestroyableTransform.prefinish (node_modules/readable-stream/lib/_stream_transform.js:129:10) at prefinish (node_modules/readable-stream/lib/_stream_writable.js:611:14) at finishMaybe (node_modules/readable-stream/lib/_stream_writable.js:620:5) at endWritable (node_modules/readable-stream/lib/_stream_writable.js:643:3) at DestroyableTransform.Writable.end (node_modules/readable-stream/lib/_stream_writable.js:571:22) at IncomingMessage.onend (_stream_readable.js:673:10) at endReadableNT (_stream_readable.js:1201:12) at processTicksAndRejections (internal/process/task_queues.js:84:21)"
}
(11/15) Running minio-py tests ... done in 59 seconds
(12/15) Running s3cmd tests ... done in 23 seconds
(13/15) Running s3select tests ... done in 3 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

blaenk pushed a commit to blaenk/minio that referenced this pull request Aug 26, 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