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

NSFS | Versioning | List Object Version - Support for Null Version #7371

Merged
merged 1 commit into from
Aug 7, 2023

Conversation

shirady
Copy link
Contributor

@shirady shirady commented Jul 2, 2023

Explain the changes

  1. NSFS versioning list-object-versions operation - add support for null version id (details about the gap).
    Before this change when we had a version id of null the behavior was not expected, when I test it I saw:
    Screenshot 2023-06-27 at 10 38 11
  2. Change the method _get_version_id_by_stat to function outside of the NameSpaceFS class.
     

Issues: Gaps

  1. GPFS was not tested yet with these changes.
     

Testing Instructions:

Manual Tests:

  1. Change the configuration of NSFS Versioning to be Enabled in file config.js and change config.NSFS_VERSIONING_ENABLED to true.
  2. Deploy noobaa system on minikube (Based on the instructions here - the steps of ‘Build images’ and ‘Deploy noobaa’).
    Note: nb is an alias that runs the local operator from build/_output/bin (alias created by devenv).
  3. Deploy NSFS on minikube (Based on the instructions here).
  4. Use AWS CLI and use the put-object command (here is a link to their doc).
  5. Set the bucket to versioning Enabled and put-object of another key (here is a link to their doc).
  6. Set versioning to suspended and put versions of the same object that were uploaded before (steps 4 and 5).
  7. Use AWS CLI and use the list-object-versions command (here is a link to their doc).
     
    While you add objects to the bucket you can view the changes
  8. Connect to the endpoint pod: kubectl exec -it [endpont-pod-name] -- bash.
  9. Move to the bucket path (if you did it as written in the wiki it would be cd /nsfs/fs1/bucket-path/).
  10. Use Linux commands to list the files (including hidden files), for example: ls -al.
     
Test stat error edge case (and no old_version edge case):

Status: When we have .versions directory and inside it only 1 null version, add an error after stat. Should list object version without null version.

Run Unit Tests:

  1. In file src/test/unit_tests/sudo_index.js leave only require('./test_bucketspace_versioning'); (rest of test files  comment out).
  2. From the core tab in the terminal run: make root-perm-test (You should see "144 passing" at the end of the output).
     
  • Tests added: NSFS list object version for null version cases only (using prefix to decrease the list and focus on the null version tests).

@shirady shirady self-assigned this Jul 3, 2023
src/sdk/namespace_fs.js Outdated Show resolved Hide resolved
src/sdk/namespace_fs.js Outdated Show resolved Hide resolved
src/sdk/namespace_fs.js Outdated Show resolved Hide resolved
src/sdk/namespace_fs.js Outdated Show resolved Hide resolved
src/sdk/namespace_fs.js Outdated Show resolved Hide resolved
@shirady shirady force-pushed the list-versions-nsfs branch 2 times, most recently from 3122545 to 7886d48 Compare July 31, 2023 11:59
Copy link
Contributor

@vh05 vh05 left a comment

Choose a reason for hiding this comment

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

/lgtm

I feel one more approval would be better

@shirady shirady requested a review from vh05 July 31, 2023 12:57
src/sdk/namespace_fs.js Outdated Show resolved Hide resolved
src/sdk/namespace_fs.js Outdated Show resolved Hide resolved
src/sdk/namespace_fs.js Outdated Show resolved Hide resolved
Signed-off-by: shirady <57721533+shirady@users.noreply.github.com>
@shirady shirady merged commit 0e611ef into noobaa:master Aug 7, 2023
7 checks passed
@shirady shirady deleted the list-versions-nsfs branch August 7, 2023 07:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants