-
Notifications
You must be signed in to change notification settings - Fork 6
users unable to search files #1076
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
Conversation
this should save some time as often every file needs to be indexed after the dataset
|
I'm converting to draft again because some issues are coming up with groups. Adding and removing members from groups seems to mean that some users who are in a group that has access to a file or dataset will not get it in search results. |
when adding a user to a group, elasticsearch is not updated when adding a group, if there were no read only users and empty list was inserted into the index
fixing indexing for files
|
Important Note: I cannot get the shellcheck pre-commit hook to run on my machine. So far I have found no solution - I can install it via brew but if my pre-commit config is not the same as the one in the github repo, it rejects the commit. So if someone else can please run it as part of the review, thank you very much. This should be ready to review now. |
longshuicy
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you merge in the latest main to fix the pytest failure? Thanks!
ddey2
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
works well, code looks good.
longshuicy
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works now.

I change the name here since the bug affected more than just read only users.
If a user who is not the owner of a dataset searched for files, they would not find files in the dataset.
This is because the user_ids were not updated in the elasticsearch entries for the files.
To fix this, I added a method index_dataset_files which is called after datasets are updated and indexed.
I also checked and a user that is part of a group will find files in the group. Ready for review.