Nasser Zahrani activity https://gitlab.com/peanutandlevi 2026-03-18T00:21:47Z tag:gitlab.com,2026-03-18:5215238530 Nasser Zahrani commented on merge request !225736 at GitLab.org / GitLab 2026-03-18T00:21:47Z peanutandlevi Nasser Zahrani

@mdangelo6 I think these failing specs are flaky on master as well, they fail in the same way on fresh master for me, can you validate if you get a chance?

tag:gitlab.com,2026-03-17:5210689704 Nasser Zahrani commented on merge request !222168 at GitLab.org / GitLab 2026-03-17T02:23:10Z peanutandlevi Nasser Zahrani

Valid 👍 I think using the WorkItemAsEpic class that Gosia added is the correct place, since this is largely concerned with that presented of a work item as a legacy epic, let me know what you think 👍

tag:gitlab.com,2026-03-17:5210688742 Nasser Zahrani commented on merge request !222168 at GitLab.org / GitLab 2026-03-17T02:22:26Z peanutandlevi Nasser Zahrani

yeah I think thats a great idea, I included the logic in the WorkItemAsEpic class instead and made some of the naming more specific 👍

tag:gitlab.com,2026-03-17:5210687781 Nasser Zahrani commented on merge request !222168 at GitLab.org / GitLab 2026-03-17T02:21:42Z peanutandlevi Nasser Zahrani

@nicolasdular yes that sounds good I moved it into WorkItemAsEpic with the rest of the logic 👍

tag:gitlab.com,2026-03-17:5210575207 Nasser Zahrani pushed to project branch 588626-saved-view-view-create-event at GitLab.org / GitLab 2026-03-17T01:06:39Z peanutandlevi Nasser Zahrani

Nasser Zahrani (364891cc) at 17 Mar 01:06

Add metrics for counts and shared examples for tracking service sta...

... and 37 more commits

tag:gitlab.com,2026-03-16:5210119678 Nasser Zahrani pushed to project branch 588626-saved-view-view-create-event at GitLab.org / GitLab 2026-03-16T21:18:41Z peanutandlevi Nasser Zahrani

Nasser Zahrani (67cc79a9) at 16 Mar 21:18

Add metrics for counts and shared examples for tracking service sta...

... and 1508 more commits

tag:gitlab.com,2026-03-16:5210111572 Nasser Zahrani pushed to project branch 504269-read-epic-issue-from-work-item at GitLab.org / GitLab 2026-03-16T21:15:15Z peanutandlevi Nasser Zahrani

Nasser Zahrani (46d75312) at 16 Mar 21:15

Migrate API logic to WorkItemAsEpic

... and 15 more commits

tag:gitlab.com,2026-03-16:5210099746 Nasser Zahrani pushed to project branch 504269-read-epic-issue-from-work-item at GitLab.org / GitLab 2026-03-16T21:10:07Z peanutandlevi Nasser Zahrani

Nasser Zahrani (d3f9bba8) at 16 Mar 21:10

Migrate API logic to WorkItemAsEpic

tag:gitlab.com,2026-03-16:5209767648 Nasser Zahrani pushed to project branch 504269-read-epic-issue-from-work-item at GitLab.org / GitLab 2026-03-16T19:12:26Z peanutandlevi Nasser Zahrani

Nasser Zahrani (6c1ac12e) at 16 Mar 19:12

Migrate API logic to WorkItemAsEpic

... and 950 more commits

tag:gitlab.com,2026-03-16:5209455390 Nasser Zahrani pushed to project branch 504269-read-epic-issue-from-work-item at GitLab.org / GitLab 2026-03-16T17:35:00Z peanutandlevi Nasser Zahrani

Nasser Zahrani (a9b1e8ac) at 16 Mar 17:35

Migrate API logic to WorkItemAsEpic

tag:gitlab.com,2026-03-16:5208524459 Nasser Zahrani commented on merge request !226686 at GitLab.org / GitLab 2026-03-16T14:05:02Z peanutandlevi Nasser Zahrani

@nicolasdular good question, I should have added this to the local testing step but the guard clause in the awardable_work_item_id field already handles this, if you add an award emoji to a non-epic and query for it you won't see it

[
  {
    "id": 302,
    "name": "thumbsup",
    "user": {
      "id": 1,
      "username": "root",
      "public_email": "",
      "name": "Administrator",
      "state": "active",
      "locked": false,
      "avatar_url": "http://127.0.0.1:3000/uploads/-/system/user/avatar/1/avatar.png",
      "web_url": "http://127.0.0.1:3000/root"
    },
    "created_at": "2026-03-16T13:49:56.499Z",
    "updated_at": "2026-03-16T13:49:56.499Z",
    "awardable_id": 729,
    "awardable_type": "Issue",
    "url": null
  }
]

This still raises the question of if a legacy epic entity is better since there will be a few references we migrate (notes, resource state events, award emojis and resource label events

But strong opinion weakly held, these lightweight EE entities are fine and simplistic enough, WDYT? @nicolasdular

tag:gitlab.com,2026-03-16:5208405344 Nasser Zahrani commented on merge request !222168 at GitLab.org / GitLab 2026-03-16T13:40:41Z peanutandlevi Nasser Zahrani

https://console.postgres.ai/gitlab/gitlab-production-main/sessions/49727/commands/148108

@bhrai @emmaspark woops, pasting is hard 😓

tag:gitlab.com,2026-03-12:5197746993 Nasser Zahrani commented on merge request !222168 at GitLab.org / GitLab 2026-03-12T15:57:10Z peanutandlevi Nasser Zahrani

@emmaspark Thanks for the initial look! I went ahead and found an epic on gitlab-org with 800 epic issues and attached a query plan if you're able to take another peek

tag:gitlab.com,2026-03-12:5197743277 Nasser Zahrani commented on merge request !222168 at GitLab.org / GitLab 2026-03-12T15:56:17Z peanutandlevi Nasser Zahrani

@emmaspark yeaaaaah naming is hard, I prefer to keep the method name here so I've gone ahead and updated the comment to specify that you're also bundling in the preloads 👍

tag:gitlab.com,2026-03-12:5197738384 Nasser Zahrani commented on merge request !226796 at GitLab.org / GitLab 2026-03-12T15:55:09Z peanutandlevi Nasser Zahrani

@bhrai would you be able to provide maintainer review here?

tag:gitlab.com,2026-03-12:5197735620 Nasser Zahrani commented on merge request !226796 at GitLab.org / GitLab 2026-03-12T15:54:30Z peanutandlevi Nasser Zahrani

Verified both partial unique indexes exist on issue_user_mentions and are valid, so both conflict clauses will resolve correctly

Query plans look fine, the note mentions plan shows ~12.7s for a 10k row batch but more than half of that is the node_id FK validation trigger, which scales linearly so the actual sub batch sizes were working with should be fine.

Agreed with the DO NOTHING point you raised as well, seems unnecessary to take action when were migrating away from the epic data anyways, happy to pass this to maintainer 👍

tag:gitlab.com,2026-03-12:5197734778 Nasser Zahrani approved merge request !226796: Backfill issue_user_mentions from epic_user_mentions at GitLab.org / GitLab 2026-03-12T15:54:17Z peanutandlevi Nasser Zahrani

What does this MR do and why?

This MR backfills the issue_user_mentions table with data from the epic_user_mentions table. Right now, creating a new epic happens through the work items framework, causing both tables to be written to. The aim of the backfill is to move historical data into the issue_user_mentions table.

References

Screenshots or screen recordings

Not provided

Database Query Plans

Note mentions: https://console.postgres.ai/gitlab/gitlab-production-main/sessions/49745/commands/148122

Description mentions: https://console.postgres.ai/gitlab/gitlab-production-main/sessions/49745/commands/148121

MR acceptance checklist

Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #454433

tag:gitlab.com,2026-03-12:5197734775 Nasser Zahrani commented on merge request !226796 at GitLab.org / GitLab 2026-03-12T15:54:17Z peanutandlevi Nasser Zahrani

nit 100 seems a little conservative, the query plans are healthy at 10k rows so 1/10 of that should be safe

tag:gitlab.com,2026-03-12:5197734666 Nasser Zahrani commented on merge request !226796 at GitLab.org / GitLab 2026-03-12T15:54:15Z peanutandlevi Nasser Zahrani

yeah I think DO NOTHING as well, the alternative is update the epic data to match for correctness, but it feels pointless to actively update legacy data we're moving away from, so no issues

tag:gitlab.com,2026-03-11:5194414577 Nasser Zahrani pushed to project branch 504269-read-epic-issue-from-work-item at GitLab.org / GitLab 2026-03-11T22:00:33Z peanutandlevi Nasser Zahrani

Nasser Zahrani (413e4493) at 11 Mar 22:00

Migrate Epic Issues API to read from work_item_parent_links

... and 1989 more commits