Explore memoize-ing search_service in Search API
What does this MR do and why?
Describe in detail what your merge request does and why.
In this specific implementation, the strong_memoize_with method caches the result of the block that creates a new SearchService object with the current user and a set of search parameters merged with any additional parameters that may have been passed to the method. The cached result is returned if the method is called again with the same input parameters.
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.
Merge request reports
Activity
Hey @youngjun827!
Thank you for your contribution to GitLab. Please refer to the contribution flow documentation for a quick overview of the process, and the merge request (MR) guidelines for the detailed process.
When you're ready for a first review, post
@gitlab-bot ready
. If you know a relevant reviewer(s) (for example, someone that was involved in a related issue), you can also assign them directly with@gitlab-bot ready @user1 @user2
.At any time, if you need help, feel free to post
@gitlab-bot help
or initiate a mentor session on Discord. Read more on how to get help.To enable automated checks on your MR, please configure Danger for your fork.
You can comment
@gitlab-bot label <label1> <label2>
to add labels to your MR. Please see the list of allowed labels in thelabel
command documentation.This message was generated automatically. You're welcome to improve it.
added Community contribution workflowin dev labels
assigned to @youngjun827
added workflowready for review label and removed workflowin dev label
requested review from @maddievn
@maddievn
, this Community contribution is ready for review.- Do you have capacity and domain expertise to review this? We are mindful of your time, so if you are not able to take this on, please re-assign to one or more other reviewers.
- Add the workflowin dev label if the merge request needs action from the author. This message was generated automatically. You're welcome to improve it.
6 Warnings 67c96043: The commit subject must contain at least 3 words. For more information, take a look at our Commit message guidelines. 67c96043: The commit body should not contain more than 72 characters per line. For more information, take a look at our Commit message guidelines. e2c62c90: The commit body should not contain more than 72 characters per line. For more information, take a look at our Commit message guidelines. You've made some app changes, but didn't add any tests.
That's OK as long as you're refactoring existing code,
but please consider adding any of the maintenancepipelines, maintenancerefactor, maintenanceworkflow, documentation, QA labels.This Merge Request needs to be labelled with backend. Please request a reviewer or maintainer to add them. This merge request does not refer to an existing milestone. 1 Message CHANGELOG missing: If you want to create a changelog entry for GitLab FOSS, add the
Changelog
trailer to the commit message you want to add to the changelog.If you want to create a changelog entry for GitLab EE, also add the
EE: true
trailer to your commit message.If this merge request doesn't need a CHANGELOG entry, feel free to ignore this message.
Reviewer roulette
Changes that require review have been detected!
Please refer to the table below for assigning reviewers and maintainers suggested by Danger in the specified category:
Category Reviewer Maintainer backend Eduardo Bonet (
@eduardobonet
) (UTC+1)Kamil Trzciński (
@ayufan
) (UTC+1)To spread load more evenly across eligible reviewers, Danger has picked a candidate for each review slot, based on their timezone. Feel free to override these selections if you think someone else would be better-suited or use the GitLab Review Workload Dashboard to find other available reviewers.
To read more on how to use the reviewer roulette, please take a look at the Engineering workflow and code review guidelines. Please consider assigning a reviewer or maintainer who is a domain expert in the area of the merge request.
Once you've decided who will review this merge request, assign them as a reviewer! Danger does not automatically notify them for you.
If needed, you can retry the
danger-review
job that generated this comment.Generated by
Dangermentioned in issue gitlab-org/quality/triage-reports#11296 (closed)
added maintenanceperformance typemaintenance labels
added groupglobal search label
added devopsdata stores sectioncore platform labels
added devopsenablement label and removed devopsdata stores sectioncore platform labels
added devopsdata stores sectioncore platform labels and removed devopsenablement label
@maddievn Could you please review the changes?
Nice @youngjun827, we now just have a failing spec that is an easy fix:
# ./spec/requests/api/search_spec.rb:704 expect(SearchService).to receive(:new) expected: 2 times received: 1 time
Which means the memoizing works
Will you be able to update the spec and then tag me?
Hey @youngjun827
I hope you're doing well!I just want to check if you have some capacity to update the spec and then we can get this MR shipped?
- Resolved by Madelein van Niekerk
@maddievn, this Community contribution was recently assigned to you for review.
- Do you still have capacity to review this? We are mindful of your time, so if you are not able to take this on, please re-assign to one or more other reviewers.
- Add the workflowin dev label if the merge request needs action from the author.
This message was generated automatically. You're welcome to improve it.
added automation:reviewers-reminded label
added workflowin dev label and removed workflowready for review label
removed automation:reviewers-reminded label
@youngjun827, it seems we're waiting on an action from you for approximately two weeks.
- Do you still have capacity to work on this? If not, you might want to close this MR and/or ask someone to take over.
- Do you need help in getting it ready? At any time, you can:
- If you're actually ready for a review, you can post
@gitlab-bot ready
.
This message was generated automatically. You're welcome to improve it.
added automation:author-reminded label
added idle label
removed review request for @maddievn
Hi @changzhengliu!
To provide a better contribution experience, we're identifying older merge requests with no human activity in the past 120 days. Our goal is to bring these merge requests to completion or close them, enabling us to spend more time on active merge requests.
Review this merge request and determine if you should:
- Work on the provided feedback. Add
@gitlab-bot ready
when you need a review or are looking for more feedback. - Don't know how to proceed? Ask for help from a merge request coach by adding
@gitlab-bot help
in a comment. - Close the merge request.
Please see the handbook for additional details on this
- Work on the provided feedback. Add
added automation:stale-reminded label
@youngjun827, I am going to close this MR for now as it's been inactive for a while. Please reopen this MR when you get time to address the failing spec. Thank you for your contribution.
@youngjun827, how was your code review experience with this merge request? Please tell us how we can continue to iterate and improve:
- React with a
or a on this comment to describe your experience. - Create a new comment starting with
@gitlab-bot feedback
below, and leave any additional feedback you have for us in the comment.
Interested in learning more tips and tricks to solve your next challenge faster? Subscribe to the GitLab Community Newsletter for contributor-focused content and opportunities to level up.
Thanks for your help!
This message was generated automatically. You're welcome to improve it.
- React with a
removed stale label