Skip to content
Snippets Groups Projects

Link merge requests for all non review app deploys

Merged Yorick Peterse requested to merge fix-linking-merge-requests into master
All threads resolved!

What does this MR do?

This changes how we link merge requests to deployments so that:

  1. We link merge requests for any deployment that is not in the "created" state.
  2. We do not link merge requests to review app deployments.

We want to link deployments regardless of their status so that we can also show failed and running deploys in the merge request widget (and perhaps in other places). We don't want to link review app deployments since this is not useful, and may lead to deployments to different review app environments showing up on a merge request page.

This builds on the refactoring of the deployment model introduced in merge request !20474 (merged), and moves the linking of merge requests to Deployments::FinishedWorker. This worker is scheduled every time a deployment transitions to a finished state.

As part of these changes we also change Deployment#link_merge_requests so that it ignores any already linked merge requests. This way if a deployment changes its status multiple times, we don't error with duplicate key errors.

This fixes #38092 (closed), #38000 (closed).

Does this MR meet the acceptance criteria?

Conformity

Edited by Yorick Peterse

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
  • Shinya Maeda
  • @yorickpeterse Thanks. I left a few questions. Let me know what you think.

  • Shinya Maeda unassigned @dosuken123

    unassigned @dosuken123

  • Yorick Peterse changed the description

    changed the description

  • Yorick Peterse added 1 commit

    added 1 commit

    • e5027a9b - Link merge requests for all non review app deploys

    Compare with previous version

  • Yorick Peterse resolved all threads

    resolved all threads

  • Yorick Peterse assigned to @dosuken123

    assigned to @dosuken123

  • Shinya Maeda
  • Shinya Maeda approved this merge request

    approved this merge request

  • Shinya Maeda unassigned @dosuken123

    unassigned @dosuken123

  • @rspeicher Could you take a look as a maintainer? Thanks!

  • 🤖 GitLab Bot 🤖 changed milestone to %12.7

    changed milestone to %12.7

  • mentioned in issue #38092 (closed)

  • Yorick Peterse added 913 commits

    added 913 commits

    Compare with previous version

  • Yorick Peterse changed the description

    changed the description

  • Yorick Peterse resolved all threads

    resolved all threads

  • Robert Speicher
  • Robert Speicher
  • Robert Speicher
  • @yorickpeterse Looks good, just some minor questions.

  • Yorick Peterse added 161 commits

    added 161 commits

    Compare with previous version

  • Robert Speicher resolved all threads

    resolved all threads

  • Robert Speicher approved this merge request

    approved this merge request

  • Robert Speicher enabled an automatic merge when the pipeline for 67c20fc4 succeeds

    enabled an automatic merge when the pipeline for 67c20fc4 succeeds

  • Robert Speicher mentioned in commit 5278996c

    mentioned in commit 5278996c

  • This merge request has been deployed to the GitLab.com environment gstg in GitLab auto-deploy version 12.7.202001050505-0b0892e71da.6254680766a.

    A list of all the deployed commits can be found here.


    :robot: If this message is incorrect, please create an issue in the Release Tools project.

  • This merge request has been deployed to the GitLab.com environment gprd-cny in GitLab auto-deploy version 12.7.202001051105-de02d30675f.6ee76535eb4.

    A list of all the deployed commits can be found here.


    :robot: If this message is incorrect, please create an issue in the Release Tools project.

  • added workflowcanary label and removed workflowstaging label

  • Yorick Peterse mentioned in issue #35741

    mentioned in issue #35741

  • This merge request has been deployed to the GitLab.com environment gprd in GitLab auto-deploy version 12.7.202001062105-f2d6a8f3378.85c0781518c.

    A list of all the deployed commits can be found here.


    :robot: If this message is incorrect, please create an issue in the Release Tools project.

  • added workflowproduction label and removed workflowcanary label

  • Yorick Peterse mentioned in epic &1936

    mentioned in epic &1936

  • mentioned in commit 7816adee

  • Please register or sign in to reply
    Loading