Skip to content

Conversation

prakashsvmx
Copy link
Member

fix to show or hide show deleted objects option based on versioning status

"Show Deleted Objects" option is displayed for non versioned bucket.
it should be displayed only for versioned state ( enabled, suspended) buckets

Tested in :

Locking enabled bucket
Versioning enabled bucket
Versioning suspended bucket
Non versioned bucket

@jinapurapu
Copy link
Contributor

Just checking that this is correct behavior - If versioning is suspended, deleted objects are still visible, but can't be restored, and objects deleted while versioning is suspended will show as deleted objects, but not be recoverable even once versioning is enabled. The only case the "Show deleted objects" box should not show is for never-versioned buckets, correct?

@prakashsvmx
Copy link
Member Author

@jinapurapu

here is a summary of the behaviour in each of the buckets

Locking enabled bucket
  "Show deleted objects" option would be displayed  as versioning is enabled by default. 
  "Restore option is available per object  (from object versions list)"  is  available 
  Rewind option is available

Versioning enabled bucket
"Show deleted objects" option would be displayed  as versioning is enabled by default. 
 "Restore option is available per object (from object versions list)"  if multiple versions are/were available
 Rewind option is available
  
Versioning suspended bucket
"Show deleted objects" option would be displayed  as versioning is enabled by default. 
 "Restore option is available per object (from object versions list)"  if multiple versions are/were available
  Rewind option is availabe
  
Non versioned bucket
 "Show deleted objects" - Not available
 "Restore " - Not available
  Rewind - Not available

jinapurapu
jinapurapu previously approved these changes Apr 20, 2023
@dvaldivia
Copy link
Collaborator

I only found 1 problem @prakashsvmx if you are looking at a non-version bucket, and do ctrl/cmd + k to navigate to a versioned bucket, the show deleted objects option doesn't render, other than that, the change works fine

@prakashsvmx
Copy link
Member Author

@dvaldivia this seem to happen only with KBar actions. and looks not due to these changes.

The object broweser in does not re render and populate the required states . i will investigate further in a new PR.
with master branch, it does not even refresh the object list when navigated via KBar action. I suspect some react router issue

@prakashsvmx
Copy link
Member Author

@dvaldivia i have sent a fix for the re-rendering bug when the bucket name changes within the Object browser view e.g using KBar. PTAL.

@prakashsvmx prakashsvmx requested a review from jinapurapu April 26, 2023 14:19
@prakashsvmx prakashsvmx force-pushed the fix-show-del-obj branch 2 times, most recently from 3d15ff0 to c59afa8 Compare April 28, 2023 11:27
@bexsoft
Copy link
Collaborator

bexsoft commented May 2, 2023

Can you please help us to fix conflicts @prakashsvmx? Thank you!

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

@cesnietor
Copy link
Collaborator

@prakashsvmx seems that the coverage check is failing, we'd need to add some tests for this.

@allanrogerr allanrogerr self-requested a review May 10, 2023 13:07
@bexsoft
Copy link
Collaborator

bexsoft commented May 10, 2023

@prakashsvmx seems that the coverage check is failing, we'd need to add some tests for this.

I think this issue is not related to this PR, seems like threshold decreased while generating assets. We can manage this in a second PR

@cesnietor
Copy link
Collaborator

cesnietor commented May 10, 2023

Tested:

Bucked Locked:

  • Shows Show deleted objects
  • Item allows to see previous versions ✅
  • Allows deletion and restore ✅
    -- Found an issue where the UI shows the modal to disable versioning for the locked bucket but this is not possible so we should hide that propbably (can be addressed separetely [could we create a ticket for this 🙏 ]). ⚠️

Screenshot 2023-05-10 at 10 14 07 AM

Bucket Versioned:

  • Shows Show deleted objects
  • Item allows to see previous versions ✅
  • Allows deletion and restore ✅

Bucket versioned suspended

  • Shows Show deleted objects
  • Item allows to see previous versions ✅
  • Allows deletion and restore Only on those objects that were created while versioning was enabled
  • If an object was added after Versioning was suspended, when trying to delete it, it shows the Delete all versions which is wrong since versioning was suspended right?. ⚠️

Screenshot 2023-05-10 at 10 11 35 AM

Bucket no versioning:

  • Does not show Show deleted objects
  • Not able to see previous versions ✅
  • Allows deletion ✅

@bexsoft bexsoft merged commit c5d4cdf into minio:master May 10, 2023
@prakashsvmx
Copy link
Member Author

@cesnietor Thank you so much for testing this out and the detailed feedback.

  • Found an issue where the UI shows the modal to disable versioning for the locked bucket but this is not possible so we should hide that propbably (can be addressed separetely [could we create a ticket for this pray ]). warning

yes, i could send a fix.

If an object was added after Versioning was suspended, when trying to delete it, it shows the Delete all versions which is wrong since versioning was suspended right?.

We would not exactly when the versioning was suspended. So i believe this is fine as the older objects may have versions to delete.

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.

5 participants