Shopify / Shopify/shipit-engine

Identical Stacks can interfere with each other's Merge Queue

Open
#1,121 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Ruby
Stars
1.5k
Forks
154
Avg merge
2h 26m
Merged PRs (30d)
3

Description

Currently,
I'm able to create 2 stacks for the same repo & branch.
If Merge-Queue is enabled on both, they can interfere with each other.

Suggestion:
Merge-Queue can be enabled only once for a given set of Repo & Branch, regardless of the stack environment.

module Shipit
  class Stack < Record
    module NoDeployedCommit

...

    validates :merge_queue_enabled, uniqueness: {
        scope: %i(repository branch),
        message: 'cannot be used more than once with this repository and branch. Check (archived) stacks.'
    }

...

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in stack.rb at the Shipit::Stack model and inspect the existing validations around merge_queue_enabled, repository, and branch. Confirm the desired behavior by checking that Merge Queue cannot be enabled more than once for the same repository and branch, regardless of stack environment.

Written by the indexing model from the issue text.

Assessment

Tech stack
ruby
Domain
devops
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.