Skip to content
Snippets Groups Projects

Refactor project API helpers

Merged Andreas Brandl requested to merge ab/pagination-batch-counts into master

What does this MR do?

Coming from #37919 (closed), this MR

  1. Adds a regression spec for this type of problem
  2. Refactors the projects API (helper) methods to make side effects more explicit.

In more detail, the side effect I wanted to make more explicit is the fact that we perform batch counting to refresh caches. This had been mixed into preparing the database query to retrieve projects (hence I think of it as a "side effect") and didn't have specs.

Closes #37919 (closed)

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

  • This is a refactoring only, but we've run into missing tests before.
Edited by 🤖 GitLab Bot 🤖

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
  • Andreas Brandl
  • Andreas Brandl
  • Andreas Brandl
  • Andreas Brandl added 1 commit

    added 1 commit

    Compare with previous version

  • mentioned in issue #37919 (closed)

  • @smcgivern Coming from #37919 (closed), you have the full context here already, would it be possible for you to review the refactoring too?

    Failures are unrelated to this MR, see #38115 (closed).

  • added api backend labels

  • Andreas Brandl mentioned in commit 055bece0

    mentioned in commit 055bece0

  • Andreas Brandl mentioned in merge request !21194 (merged)

    mentioned in merge request !21194 (merged)

  • Andreas Brandl added 28 commits

    added 28 commits

    Compare with previous version

  • Andreas Brandl mentioned in commit e105662b

    mentioned in commit e105662b

  • Andreas Brandl added 107 commits

    added 107 commits

    Compare with previous version

  • @abrandl thanks! I have two very small comments which I'm happy to move to a future MR if you want to get this merged soon; neither are blockers.

  • Andreas Brandl added 1 commit

    added 1 commit

    • 03ab9886 - Apply suggestion to lib/api/projects.rb

    Compare with previous version

  • Andreas Brandl added 31 commits

    added 31 commits

    Compare with previous version

  • Andreas Brandl added 1 commit

    added 1 commit

    • 7e4649af - Rename method to more detailed name

    Compare with previous version

  • Andreas Brandl mentioned in commit 1119876a

    mentioned in commit 1119876a

  • @smcgivern Thank you for the review. I think this is ready now, would you mind merging it please?

  • Andreas Brandl mentioned in commit 88d33022

    mentioned in commit 88d33022

  • Sean McGivern resolved all threads

    resolved all threads

  • Sean McGivern approved this merge request

    approved this merge request

  • merged

  • Sean McGivern mentioned in commit 7a5656b7

    mentioned in commit 7a5656b7

  • mentioned in issue #32186 (closed)

  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Please register or sign in to reply
    Loading