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

Enable console to set expired-object-all-versions #3226

Merged
merged 4 commits into from
Mar 11, 2024

Conversation

shtripat
Copy link
Contributor

@shtripat shtripat commented Feb 6, 2024

This PR enables console to set bucket ILM rule for deleting all versions of expired object.

Steps to test:
Create a bucket and enable versioning for the same.
Try to create ILM rule and select option for delete all versions.
Make sure listing of rules works fine.

@shtripat shtripat force-pushed the expired-object-all-versions branch 2 times, most recently from 9779888 to 79cfea0 Compare February 6, 2024 10:56
@shtripat shtripat marked this pull request as ready for review February 6, 2024 10:57
@shtripat shtripat requested a review from prakashsvmx February 6, 2024 10:57
@prakashsvmx
Copy link
Member

@shtripat , please resolve the conflicts

@shtripat shtripat force-pushed the expired-object-all-versions branch from 79cfea0 to 4106cef Compare February 8, 2024 04:41
@shtripat
Copy link
Contributor Author

shtripat commented Feb 8, 2024

@shtripat , please resolve the conflicts

Done!

@shtripat shtripat force-pushed the expired-object-all-versions branch from 63e946a to 746766d Compare February 14, 2024 04:26
@harshavardhana
Copy link
Member

Some permission tests failing

Run npx testcafe "chrome:headless" web-app/tests/permissions-B/ --skip-js-errors -c 3
 Running tests in:
 - Chrome 121.0.6167.160 / Ubuntu 22.0[4](https://github.com/minio/console/actions/runs/7906473383/job/21581373151#step:9:5)
 - Chrome 121.0.6167.160 / Ubuntu 22.04
 - Chrome 121.0.6167.160 / Ubuntu 22.04

 For user with Bucket Write to specific prefix permissions
 ✖ Upload File button is disable and Upload Folder button is enabled on bucket root path

   1) Cannot obtain information about the node because the specified selector does not match any node in the DOM tree.

         | Selector('li')
       > |   .withText('Upload File')

      Browser: Chrome 121.0.6167.160 / Ubuntu 22.04

         30 |      await t
         31 |        .useRole(roles.bucketWritePrefixOnly)
         32 |        .navigateTo("http://localhost:9090/browser/testcafe")
         33 |        .click(uploadButton)
         34 |        .expect(Selector("li").withText("Upload File").hasClass("disabled"))
       > 3[5](https://github.com/minio/console/actions/runs/7906473383/job/21581373151#step:9:6) |        .ok()
         3[6](https://github.com/minio/console/actions/runs/7906473383/job/21581373151#step:9:7) |        .expect(Selector("li").withText("Upload Folder").hasClass("disabled"))
         3[7](https://github.com/minio/console/actions/runs/7906473383/job/21581373151#step:9:8) |        .notOk();
         3[8](https://github.com/minio/console/actions/runs/7906473383/job/21581373151#step:9:9) |    },
         3[9](https://github.com/minio/console/actions/runs/7906473383/job/21581373151#step:9:10) |  )
         40 |  .after(async (t) => {});

         at <anonymous> (/home/runner/work/console/console/web-app/tests/permissions-B/bucketWritePrefixOnly.ts:35:[10](https://github.com/minio/console/actions/runs/7906473383/job/21581373151#step:9:11))
         at <anonymous> (/home/runner/work/console/console/web-app/tests/permissions-B/bucketWritePrefixOnly.ts:23:71)
         at __awaiter (/home/runner/work/console/console/web-app/tests/permissions-B/bucketWritePrefixOnly.ts:19:[12](https://github.com/minio/console/actions/runs/7906473383/job/21581373151#step:9:13))
         at <anonymous> (/home/runner/work/console/console/web-app/tests/permissions-B/bucketWritePrefixOnly.ts:28:17)


 ✖ Upload File and Folder buttons are enabled on bucket prefix path

   1) Cannot obtain information about the node because the specified selector does not match any node in the DOM tree.

         | Selector('li')
       > |   .withText('Upload File')

      Browser: Chrome 121.0.6[16](https://github.com/minio/console/actions/runs/7906473383/job/21581373151#step:9:17)7.160 / Ubuntu 22.04

         47 |      await t
         48 |        .useRole(roles.bucketWritePrefixOnly)
         49 |        .navigateTo("http://localhost:9090/browser/testcafe/d3JpdGU=")
         50 |        .click(uploadButton)
         51 |        .expect(Selector("li").withText("Upload File").hasClass("disabled"))
       > 52 |        .notOk()
         53 |        .expect(Selector("li").withText("Upload Folder").hasClass("disabled"))
         54 |        .notOk();
         55 |    },
         56 |  )
         57 |  .after(async (t) => {});

         at <anonymous> (/home/runner/work/console/console/web-app/tests/permissions-B/bucketWritePrefixOnly.ts:52:10)
         at <anonymous> (/home/runner/work/console/console/web-app/tests/permissions-B/bucketWritePrefixOnly.ts:23:71)
         at __awaiter (/home/runner/work/console/console/web-app/tests/permissions-B/bucketWritePrefixOnly.ts:19:12)
         at <anonymous> (/home/runner/work/console/console/web-app/tests/permissions-B/bucketWritePrefixOnly.ts:45:[17](https://github.com/minio/console/actions/runs/7906473383/job/21581373151#step:9:18))



 2/2 failed ([18](https://github.com/minio/console/actions/runs/7906473383/job/21581373151#step:9:19)s)
Error: Process completed with exit code 2.

@shtripat
Copy link
Contributor Author

Some permission tests failing

Run npx testcafe "chrome:headless" web-app/tests/permissions-B/ --skip-js-errors -c 3
 Running tests in:
 - Chrome 121.0.6167.160 / Ubuntu 22.0[4](https://github.com/minio/console/actions/runs/7906473383/job/21581373151#step:9:5)
 - Chrome 121.0.6167.160 / Ubuntu 22.04
 - Chrome 121.0.6167.160 / Ubuntu 22.04

 For user with Bucket Write to specific prefix permissions
 ✖ Upload File button is disable and Upload Folder button is enabled on bucket root path

   1) Cannot obtain information about the node because the specified selector does not match any node in the DOM tree.

         | Selector('li')
       > |   .withText('Upload File')

      Browser: Chrome 121.0.6167.160 / Ubuntu 22.04

         30 |      await t
         31 |        .useRole(roles.bucketWritePrefixOnly)
         32 |        .navigateTo("http://localhost:9090/browser/testcafe")
         33 |        .click(uploadButton)
         34 |        .expect(Selector("li").withText("Upload File").hasClass("disabled"))
       > 3[5](https://github.com/minio/console/actions/runs/7906473383/job/21581373151#step:9:6) |        .ok()
         3[6](https://github.com/minio/console/actions/runs/7906473383/job/21581373151#step:9:7) |        .expect(Selector("li").withText("Upload Folder").hasClass("disabled"))
         3[7](https://github.com/minio/console/actions/runs/7906473383/job/21581373151#step:9:8) |        .notOk();
         3[8](https://github.com/minio/console/actions/runs/7906473383/job/21581373151#step:9:9) |    },
         3[9](https://github.com/minio/console/actions/runs/7906473383/job/21581373151#step:9:10) |  )
         40 |  .after(async (t) => {});

         at <anonymous> (/home/runner/work/console/console/web-app/tests/permissions-B/bucketWritePrefixOnly.ts:35:[10](https://github.com/minio/console/actions/runs/7906473383/job/21581373151#step:9:11))
         at <anonymous> (/home/runner/work/console/console/web-app/tests/permissions-B/bucketWritePrefixOnly.ts:23:71)
         at __awaiter (/home/runner/work/console/console/web-app/tests/permissions-B/bucketWritePrefixOnly.ts:19:[12](https://github.com/minio/console/actions/runs/7906473383/job/21581373151#step:9:13))
         at <anonymous> (/home/runner/work/console/console/web-app/tests/permissions-B/bucketWritePrefixOnly.ts:28:17)


 ✖ Upload File and Folder buttons are enabled on bucket prefix path

   1) Cannot obtain information about the node because the specified selector does not match any node in the DOM tree.

         | Selector('li')
       > |   .withText('Upload File')

      Browser: Chrome 121.0.6[16](https://github.com/minio/console/actions/runs/7906473383/job/21581373151#step:9:17)7.160 / Ubuntu 22.04

         47 |      await t
         48 |        .useRole(roles.bucketWritePrefixOnly)
         49 |        .navigateTo("http://localhost:9090/browser/testcafe/d3JpdGU=")
         50 |        .click(uploadButton)
         51 |        .expect(Selector("li").withText("Upload File").hasClass("disabled"))
       > 52 |        .notOk()
         53 |        .expect(Selector("li").withText("Upload Folder").hasClass("disabled"))
         54 |        .notOk();
         55 |    },
         56 |  )
         57 |  .after(async (t) => {});

         at <anonymous> (/home/runner/work/console/console/web-app/tests/permissions-B/bucketWritePrefixOnly.ts:52:10)
         at <anonymous> (/home/runner/work/console/console/web-app/tests/permissions-B/bucketWritePrefixOnly.ts:23:71)
         at __awaiter (/home/runner/work/console/console/web-app/tests/permissions-B/bucketWritePrefixOnly.ts:19:12)
         at <anonymous> (/home/runner/work/console/console/web-app/tests/permissions-B/bucketWritePrefixOnly.ts:45:[17](https://github.com/minio/console/actions/runs/7906473383/job/21581373151#step:9:18))



 2/2 failed ([18](https://github.com/minio/console/actions/runs/7906473383/job/21581373151#step:9:19)s)
Error: Process completed with exit code 2.

Fixed by #3236

shtripat added 4 commits March 1, 2024 10:24
Signed-off-by: Shubhendu Ram Tripathi <[email protected]>
Signed-off-by: Shubhendu Ram Tripathi <[email protected]>
Signed-off-by: Shubhendu Ram Tripathi <[email protected]>
@shtripat shtripat force-pushed the expired-object-all-versions branch from a34ccc8 to cb61275 Compare March 1, 2024 04:55
Copy link
Member

@prakashsvmx prakashsvmx left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@bexsoft bexsoft merged commit 39bf627 into minio:master Mar 11, 2024
30 checks passed
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.

4 participants