Skip to content

Limit allowed commit range for Changelog generation

Vasilii Iakliushin requested to merge 340941_changelog_commits_limitation into master

What does this MR do and why?

  • Contributes to #340941
  • Feature flag: #364101

We want to verify the commit range before fetching the commits to keep a good endpoint performance.

Screenshots or screen recordings

Screenshot_2022-06-01_at_14.49.55

How to set up and validate locally

  1. Enable feature flag Feature.enable(:changelog_commits_limitation)
  2. Find a project id that has more than 15000 commits (or lower COMMITS_LIMIT constant locally)
  3. Visit URL: http://127.0.0.1:3000/api/v4/projects/<project_id>/repository/changelog?version=v1.0&from=<from_sha>&to=<to_sha>
  4. You should see an error that the commit range is over the limit

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Vasilii Iakliushin

Merge request reports