Skip to content
Snippets Groups Projects

File templates fetching refactor [RUN AS-IF-FOSS] [RUN ALL RSPEC]

Merged Alexandru Croitor requested to merge file-templates-fetching-refactor into master
All threads resolved!

What does this MR do?

This MR tries to extract a part of the bigger !51692 (closed) MR related to common code around file template fetching.

Refactor the code around template fetching to make it reusable and ready to be adjusted for inheritable issue and merge requests templates.

The intent is of this MR is to also use TemplateFinder as SSOT for fetching templates. We have several types of file templates, but only issue and merge request description template names are cached. That has been added some time ago now, but I think it is done mostly because of the higher usage of issues and merge requests where caching helps limit the number of requests to gitaly. Because issue and merge requests use caching we were fetching those template names through repository model and other template names by calling the TemplateFinder.build().execute.

With this change we can fetch all templates through TemplateFinder.template_names(project, type) and it will take care to fetch the issue and merge request ones from cache.

Screenshots (strongly suggested)

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • Label as security and @ mention @gitlab-com/gl-security/appsec
  • The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • Security reports checked/validated by a reviewer from the AppSec team
Edited by Alexandru Croitor

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • there are no DB changes, but this MR touches TemplateFinder so danger suggests DB review, but I think we can skip that one.

  • Natalia Tepluhina approved this merge request

    approved this merge request

  • Alexandru Croitor marked this merge request as ready

    marked this merge request as ready

  • Jan Provaznik changed milestone to %13.9

    changed milestone to %13.9

  • added 1 commit

    • f8f506a4 - Prepare templates fetching code for templates inheritance

    Compare with previous version

  • added 1 commit

    • 2997d23c - Prepare templates fetching code for templates inheritance

    Compare with previous version

  • added 1 commit

    • 351e918c - Prepare templates fetching code for templates inheritance

    Compare with previous version

  • added 1 commit

    • 42af6c7a - Prepare templates fetching code for templates inheritance

    Compare with previous version

  • Alexandru Croitor added 582 commits

    added 582 commits

    Compare with previous version

  • added 1 commit

    • 95b8f241 - Use TemplateFinder as SSOT for fetching templates

    Compare with previous version

  • added 1 commit

    • 191a90ad - Use TemplateFinder as SSOT for fetching templates

    Compare with previous version

  • Alexandru Croitor changed the description

    changed the description

  • added 1 commit

    • 38e3301d - Use TemplateFinder as SSOT for fetching templates

    Compare with previous version

  • Alexandru Croitor added 71 commits

    added 71 commits

    • 38e3301d...0a4cdd86 - 69 commits from branch master
    • eb5f4f4c - Prepare templates fetching code for templates inheritance
    • 8a5d4313 - Use TemplateFinder as SSOT for fetching templates

    Compare with previous version

    • Resolved by Alexandru Croitor

      Thanks @acroitor, I left some questions inline - it doesn't necessarily mean that the MR needs a change, but I got little bit lost during review and I probably didn't grasp the intention/idea of the approach. Maybe we could discuss this synchronously to get me on the same page?

  • Alexandru Croitor added 341 commits

    added 341 commits

    Compare with previous version

  • added 1 commit

    Compare with previous version

  • added 1 commit

    Compare with previous version

  • added 1 commit

    Compare with previous version

  • added 1 commit

    Compare with previous version

  • added 1 commit

    Compare with previous version

  • added 1 commit

    Compare with previous version

  • added 1 commit

    Compare with previous version

  • Jan Provaznik
  • Jan Provaznik approved this merge request

    approved this merge request

  • added 1 commit

    Compare with previous version

  • Alexandru Croitor added 485 commits

    added 485 commits

    • 74367071...6fa6700a - 482 commits from branch master
    • 591ab526 - Prepare templates fetching code for templates inheritance
    • 5d966b36 - Use TemplateFinder as SSOT for fetching templates
    • 2949bed8 - Code review feedback

    Compare with previous version

  • Alexandru Croitor changed title from File templates fetching refactor to File templates fetching refactor [RUN AS-IF-FOSS] [RUN ALL RSPEC]

    changed title from File templates fetching refactor to File templates fetching refactor [RUN AS-IF-FOSS] [RUN ALL RSPEC]

  • added 1 commit

    Compare with previous version

  • added 1 commit

    Compare with previous version

  • added 1 commit

    Compare with previous version

  • Alexandru Croitor added 560 commits

    added 560 commits

    • 0eac94ef...c8141f4c - 556 commits from branch master
    • bf86a46b - Prepare templates fetching code for templates inheritance
    • d8c2a560 - Use TemplateFinder as SSOT for fetching templates
    • 39468aba - Code review feedback
    • f9a73e24 - Improve test coverage on new methods

    Compare with previous version

  • Alexandru Croitor added 93 commits

    added 93 commits

    • f9a73e24...caa86179 - 89 commits from branch master
    • 314cd924 - Prepare templates fetching code for templates inheritance
    • b76f1d3a - Use TemplateFinder as SSOT for fetching templates
    • b8bcea4b - Code review feedback
    • f72da5ea - Improve test coverage on new methods

    Compare with previous version

  • Markus Koller resolved all threads

    resolved all threads

  • added 1 commit

    Compare with previous version

  • added 1 commit

    Compare with previous version

  • added 1 commit

    Compare with previous version

  • Alexandru Croitor added 460 commits

    added 460 commits

    Compare with previous version

  • mentioned in issue #301173 (closed)

  • added 1 commit

    Compare with previous version

  • Alexandru Croitor resolved all threads

    resolved all threads

  • Alexandru Croitor added 240 commits

    added 240 commits

    Compare with previous version

  • Markus Koller approved this merge request

    approved this merge request

  • Markus Koller resolved all threads

    resolved all threads

  • Markus Koller enabled an automatic merge when the pipeline for f99e0fd5 succeeds

    enabled an automatic merge when the pipeline for f99e0fd5 succeeds

  • merged

  • Markus Koller mentioned in commit c45aef05

    mentioned in commit c45aef05

  • added workflowcanary label and removed workflowstaging label

  • added workflowproduction label and removed workflowcanary label

  • mentioned in issue #293854 (closed)

  • Alexandru Croitor mentioned in merge request !54614 (merged)

    mentioned in merge request !54614 (merged)

  • Please register or sign in to reply
    Loading