Skip to content

NC | NSFS | CLI | Improve Performance of List with Name Filter #8272

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

Merged
merged 1 commit into from
Aug 13, 2024

Conversation

shirady
Copy link
Contributor

@shirady shirady commented Aug 11, 2024

Explain the changes

  1. In list_config_files "mock" the entries array to have one entry and it is the name by the filter (for performance).
  2. Exclude the action list from fetch_bucket_data and fetch_account_data.
  3. Edit the account list tests to validate that we receive an array in the response.

Issues:

  1. Partial fix for NC | Maintenance and Short Refactoring Tasks #8264 .

Testing Instructions:

Unit Tests:

Please run: sudo npx jest test_nc_nsfs_account_cli.test.js.

Manual Tests:

  1. Create an account with the CLI: sudo node src/cmd/manage_nsfs account add --name shira-1001 --new_buckets_path /tmp/nsfs_root1 --access_key <access-key> --secret_key <secret-key> --uid <uid> --gid <gid>
    Note: before creating the account need to give permission to the new_buckets_path: chmod 777 /tmp/nsfs_root1.
  2. Account list with decryption and filter name: sudo node src/cmd/manage_nsfs account list --wide --show_secrets --name <account-name> (should still work).
  • Doc added/updated
  • Tests added

@shirady shirady self-assigned this Aug 11, 2024
@shirady shirady force-pushed the nsfs-nc-list-with-name-filter branch from 48926bb to fa713af Compare August 13, 2024 07:12
@shirady shirady changed the title NC | NSFS | CLI | Reuse Status Output in Case of List with Only Name Filter NC | NSFS | CLI | Improve Performance of List with Name Filter Aug 13, 2024
@shirady shirady requested a review from romayalon August 13, 2024 08:00
Copy link
Contributor

@romayalon romayalon left a comment

Choose a reason for hiding this comment

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

LGTM, approving
minor thing - there is an indentation issue on line 582

1. In list_config_files "mock" the entries array to have one entry and it is the name by the filter (for performance).
2. Exclude the action list from fetch_bucket_data and fetch_account_data.
3. Edit the account list tests to validate that we receive an array in the response.

Signed-off-by: shirady <[email protected]>
@shirady shirady force-pushed the nsfs-nc-list-with-name-filter branch from 3981997 to cd5d80e Compare August 13, 2024 08:39
@shirady shirady merged commit a72063b into noobaa:master Aug 13, 2024
10 checks passed
@shirady shirady deleted the nsfs-nc-list-with-name-filter branch August 13, 2024 09:58
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.

2 participants