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

Add Tiers improvements for Bucket Lifecycle management #3380

Merged
merged 1 commit into from
Jun 13, 2024

Conversation

cesnietor
Copy link
Collaborator

@cesnietor cesnietor commented Jun 12, 2024

There are places where we only need to list the Tiers' names including: Add Lifecycle Rule, Bulk add LifecycleRule and EditLifeCycleRule for Buckets. However we were using the listTiers API which does two extra requests including; getting tier stats and verification (verifies endpoint can perform needed requests).
Since we only need the names I've added a new api which does only that.
There were also some issues in the tests for tiersList which I also addressed here.
This makes the requests much faster to give a better user experience.

Changes:

  • Add new API: admin/tiers/names
  • Include tests for getTiersName
  • Fix tests for getTiers (were were not checking the result from the response)
  • Use of map to avoid iterating on the tierStats response on every tier for getTiers

Test Steps:

With an authenticated users and TIERS configured do a GET on:

http://localhost:9090/api/v1/tiers/names

Response comes as:

{
    "items": [
        "PLAY-TIER",
        "SOME-TIER-CONFIG"
    ]
}

Test Steps with UI:

For Bulk Lifecycle:

  • Add Tiers
  • Create two buckets with Versioning enabled
  • Go to Administrator/Buckets and click on Select Multiple buckets Icon
  • Select multiple buckets
  • Click on Set Lifecycle button
  • Click on Transition (the list of tiers should appear)

For Add Bucket Lifecycle:

  • Go to Administrator/Buckets and click on one
  • Click on Lifecycle
  • Click on Add Lifecycle rule
  • Click on Transition (the list of tiers should appear)

For Add Bucket Lifecycle:

  • Go to Administrator/Buckets and click on one with lifecycle rules
  • Click on one rule
  • List of tiers should appear

Screenshots of it working:

Edit:
Screenshot 2024-06-12 at 12 19 27 PM
Add:
Screenshot 2024-06-12 at 12 19 12 PM
Bulk:
Screenshot 2024-06-12 at 12 19 51 PM

@cesnietor cesnietor self-assigned this Jun 12, 2024
@cesnietor cesnietor marked this pull request as ready for review June 12, 2024 19:42
prakashsvmx
prakashsvmx previously approved these changes Jun 13, 2024
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.

Verified. LGTM 👍

hope , fix for ci failure is part of #3381

Copy link
Collaborator

@bexsoft bexsoft 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 fa32d78 into minio:master Jun 13, 2024
32 of 33 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.

None yet

4 participants