Skip to content
Snippets Groups Projects

Update epic cache counts on project/group deletion

Merged Jan Provaznik requested to merge jp-cached-issue-weight-worker2 into master
All threads resolved!

What does this MR do and why?

When issue's count or weight is changed for an epic, we update its cached values. These cached values are sum of both direct epic's issues and also sub-epic's issues.

Because we want to include subepics weights/counts too, when cached value is changed we propagate this change to all epic ancestors. This is achieved by scheduling cache update for epic's parent in epic's after_commit callback.

Related to #356683 (closed)

DB changes:

Screenshots or screen recordings

These are strongly recommended to assist reviewers and reduce the time to merge your change.

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

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 Jan Provaznik

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
  • Jan Provaznik
  • Jan Provaznik
  • added database label

  • Jan Provaznik requested review from @felipe_artur

    requested review from @felipe_artur

  • Jan Provaznik added 621 commits

    added 621 commits

    Compare with previous version

  • Jan Provaznik added 55 commits

    added 55 commits

    Compare with previous version

  • Jan Provaznik changed the description

    changed the description

  • requested review from @huzaifaiftikhar1

  • Huzaifa Iftikhar approved this merge request

    approved this merge request

  • Huzaifa Iftikhar requested review from @mayra-cabrera and removed review request for @huzaifaiftikhar1

    requested review from @mayra-cabrera and removed review request for @huzaifaiftikhar1

  • :wave: @huzaifaiftikhar1, thanks for approving this merge request.

    This is the first time the merge request is approved. To ensure full test coverage, a new pipeline has been started.

    For more info, please refer to the following links:

  • Felipe Cardozo approved this merge request

    approved this merge request

  • Mayra Cabrera
  • Mayra Cabrera removed review request for @mayra-cabrera

    removed review request for @mayra-cabrera

  • Jan Provaznik added 1 commit

    added 1 commit

    • 08893cea - Minor changes based on review

    Compare with previous version

  • Jan Provaznik added 209 commits

    added 209 commits

    Compare with previous version

  • Jan Provaznik added 1 commit

    added 1 commit

    • b3ec0244 - Minor changes based on review

    Compare with previous version

  • requested review from @mayra-cabrera

  • Mayra Cabrera removed review request for @mayra-cabrera

    removed review request for @mayra-cabrera

  • Jan Provaznik added 344 commits

    added 344 commits

    Compare with previous version

  • requested review from @mayra-cabrera

  • Mayra Cabrera removed review request for @mayra-cabrera

    removed review request for @mayra-cabrera

  • requested review from @mayra-cabrera

  • Mayra Cabrera removed review request for @mayra-cabrera

    removed review request for @mayra-cabrera

  • Jan Provaznik added 1072 commits

    added 1072 commits

    Compare with previous version

  • A deleted user added backend label

    added backend label

  • requested review from @mayra-cabrera

  • Mayra Cabrera removed review request for @mayra-cabrera

    removed review request for @mayra-cabrera

  • 🤖 GitLab Bot 🤖 changed milestone to %15.3

    changed milestone to %15.3

  • Jan Provaznik added 2405 commits

    added 2405 commits

    Compare with previous version

  • requested review from @mayra-cabrera

  • Mayra Cabrera requested review from @ahegyi

    requested review from @ahegyi

  • Adam Hegyi
  • Adam Hegyi
  • Adam Hegyi
  • Mayra Cabrera removed review request for @mayra-cabrera

    removed review request for @mayra-cabrera

  • Jan Provaznik added 2234 commits

    added 2234 commits

    Compare with previous version

  • Jan Provaznik mentioned in merge request !95048 (merged)

    mentioned in merge request !95048 (merged)

  • Jan Provaznik changed title from Update cached issue weight and count for epics to Update cached issue weight and count for epics (project/group deletion)

    changed title from Update cached issue weight and count for epics to Update cached issue weight and count for epics (project/group deletion)

  • Jan Provaznik changed title from Update cached issue weight and count for epics (project/group deletion) to Update epic cache counts on project/group deletion

    changed title from Update cached issue weight and count for epics (project/group deletion) to Update epic cache counts on project/group deletion

  • Jan Provaznik added 270 commits

    added 270 commits

    Compare with previous version

  • Jan Provaznik removed review request for @felipe_artur and @ahegyi

    removed review request for @felipe_artur and @ahegyi

  • 🤖 GitLab Bot 🤖 changed milestone to %15.4

    changed milestone to %15.4

  • Jan Provaznik added 1661 commits

    added 1661 commits

    Compare with previous version

  • 2 Warnings
    :warning: 11fbd513: Commits that change 30 or more lines across at least 3 files should describe these changes in the commit body. For more information, take a look at our Commit message guidelines.
    :warning:

    featureaddition and featureenhancement merge requests normally have a documentation change. Consider adding a documentation update or confirming the documentation plan with the Technical Writer counterpart.

    For more information, see:

    1 Message
    :book: 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 Tarun Vellishetty (@tvellishetty) (UTC+5.5, 3.5 hours ahead of @jprovaznik) Kamil Trzciński (@ayufan) (UTC+2, same timezone as @jprovaznik)
    database Alexandru Croitor (@acroitor) (UTC+3, 1 hour ahead of @jprovaznik) Adam Hegyi (@ahegyi) (UTC+2, same timezone as @jprovaznik)
    ~"codeowners" Reviewer review is optional for ~"codeowners" Adam Hegyi (@ahegyi) (UTC+2, same timezone as @jprovaznik)

    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 :repeat: danger-review job that generated this comment.

    Generated by :no_entry_sign: Danger

  • Jan Provaznik added 1 commit

    added 1 commit

    • c516087f - Iterate through issues using each_batch

    Compare with previous version

  • Jan Provaznik added 38 commits

    added 38 commits

    Compare with previous version

  • Jan Provaznik added 1 commit

    added 1 commit

    • 37b40441 - Iterate through issues using each_batch

    Compare with previous version

  • Jan Provaznik requested review from @ahegyi

    requested review from @ahegyi

  • Jan Provaznik added 143 commits

    added 143 commits

    Compare with previous version

  • Jan Provaznik added 1 commit

    added 1 commit

    • 764ec17b - Iterate through issues using each_batch

    Compare with previous version

  • Adam Hegyi
  • Adam Hegyi
  • Jan Provaznik added 1 commit

    added 1 commit

    • 52092e65 - Iterate through issues using each_batch

    Compare with previous version

  • Jan Provaznik added 1 commit

    added 1 commit

    • 9926eaa8 - Iterate through issues using each_batch

    Compare with previous version

  • Jan Provaznik
  • Jan Provaznik requested review from @felipe_artur

    requested review from @felipe_artur

  • added databaseapproved label and removed databasereviewed label

  • Adam Hegyi approved this merge request

    approved this merge request

  • Thanks, @jprovaznik! DB LGTM! :thumbsup:

  • Jan Provaznik added 371 commits

    added 371 commits

    Compare with previous version

  • Jan Provaznik added 1 commit

    added 1 commit

    • fd4f84ed - Iterate through issues using each_batch

    Compare with previous version

  • Felipe Cardozo
  • Felipe Cardozo
  • Felipe Cardozo
  • Felipe Cardozo
  • Jan Provaznik added 290 commits

    added 290 commits

    Compare with previous version

  • Jan Provaznik added 235 commits

    added 235 commits

    Compare with previous version

  • Jan Provaznik requested review from @cablett

    requested review from @cablett

  • charlie ablett
  • charlie ablett
  • charlie ablett
  • charlie ablett requested review from @engwan

    requested review from @engwan

  • Jan Provaznik added 219 commits

    added 219 commits

    Compare with previous version

    • Resolved by Heinrich Lee Yu

      Not related to MR, but just curious: How would cache_issue_sums work when some users don't have access to all issues under the epic?

      I guess showing the total count / weight isn't really a problem in the epic boards. It would just be confusing if we use this in the epic tree and the user sees numbers that are inconsistent with the child issues they see in the tree.

  • Heinrich Lee Yu removed review request for @engwan

    removed review request for @engwan

  • Jan Provaznik added 177 commits

    added 177 commits

    Compare with previous version

  • Heinrich Lee Yu resolved all threads

    resolved all threads

  • Heinrich Lee Yu enabled an automatic merge when the pipeline for 451a8734 succeeds

    enabled an automatic merge when the pipeline for 451a8734 succeeds

  • Jan Provaznik requested review from @engwan

    requested review from @engwan

  • Jan Provaznik removed review request for @cablett

    removed review request for @cablett

  • Heinrich Lee Yu approved this merge request

    approved this merge request

  • Heinrich Lee Yu resolved all threads

    resolved all threads

  • Heinrich Lee Yu mentioned in commit 48247e7e

    mentioned in commit 48247e7e

  • added workflowstaging label and removed workflowcanary label

  • Jan Provaznik resolved all threads

    resolved all threads

  • Jan Provaznik mentioned in merge request !98077 (merged)

    mentioned in merge request !98077 (merged)

  • Please register or sign in to reply
    Loading