Backfill project permissions in blob
What does this MR do and why?
Describe in detail what your merge request does and why.
Backfill the repository_access_level
and visibility_level
for blob
in the main index.
Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
- Make sure you have advanced search enabled. Go to the admin settings. And check the boxes
Elasticsearch indexing
andSearch with Elasticsearch enabled
- Run the query on local Elasticsearch:
GET gitlab-development/_count
{
"query": {
"bool": {
"must_not": {
"exists": {
"field": "repository_access_level"
}
},
"must": {
"term": {
"type": "blob"
}
}
}
}
}
Notice in the response that count
should be non-zero.
- Now open the Rails console
bundle exec rails c
Run the following command
BackfillProjectPermissionsInBlobs.new(20230411064300).migrate
- Now, again run the above Elastic query and notice in the response that
count
should be0
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #344594 (closed)
Edited by Siddharth Dungarwal