Gatekeeper merge and push does not trigger Specs build

XMLWordPrintable

    • 1
    • Severity 2 - Major

      Issue Summary

      Modifying Specs from branch plan and then using Gatekeeper to merge and push into master plan does not trigger Specs build in master plan when there's a merge conflict

      Steps to Reproduce

      1. Use the following YAML Specs to create the plan:
        ---
        version: 2
        plan:
          project-key: SPECS
          key: STASH
          name: bamboo specs yaml
        
        branches:
          create: for-new-branch
          integration:
            merge-to: master
            push-on-success: true
        
        stages:
          - stage 1:
            - Job1
            
        Job1:
          tasks:
            - script:
                scripts:
                  - echo hello
        
        ...
        
      2. Create a branch, commit and push.
      3. Change specs on this branch to change the stage name and echo part:
        stages:
          - stage 2:
            - Job1
            
        Job1:
          tasks:
            - script:
                scripts:
                  - echo hello2
        
        ...
        
      4. Commit, but don't push.
      5. Change specs on master, making a change that will cause merge conflict on gatekeeper for the branch (change the same thing):
        Job1:
          tasks:
            - script:
                scripts:
                  - echo hello3
        
        ...
        
      6. Commit and push.
      7. Bamboo Specs will detect new commit on master and update configuration on master.
      8. Now push the branch changes from Step 3.
      9. Bamboo will detect and update configuration changes on branch.
      10. Gatekeeper will try to merge, merge conflict, build fails.
      11. Fix the merge conflicts on the branch without merging branches, just make sure the changes are enough, for example changing the echo to be same as master branch but change
        stages:
          - stage 2:
            - Job1
            
        Job1:
          tasks:
            - script:
                scripts:
                  - echo hello3
        
        ...
        
      12. Commit and push.
      13. Bamboo Specs will detect commit on branch and update configuration on branch.
      14. Gatekeeper will merge branch into master.

      Expected Results

      After branch plan finish running in Step 14 and push to master branch, master branch will perform Specs build

      Actual Results

      • Bamboo Specs will detect the new commit on master, but it will use the last commit of the branch to update Specs, it ignores the merge commit from gatekeeper. The consequence is that Bamboo Specs ignore the changes that would update master, leaving the VCS master with a different Bamboo Specs than what is currently applied in the plan.
      • From the above Steps to Reproduce, the stage name is not changed in master plan
      • The below log message is thrown in the atlassian-bamboo.log file:
        2020-06-19 21:48:07,028 INFO [15-BAM::SpecsDetection:pool-22-thread-2] [RssDetectionServiceImpl] Skipping Specs detection. Bamboo Specs have already been executed for a newer revision (current=xxx, previous=yyy) in repository 'stash-master'.
        
        

        xxx = commit in Step 11 from branch plan
        yyy = commit in Step 5 from master plan

      Workaround

      • When merge conflicts happen with Bamboo Specs in the gatekeeper, rerun Specs from the Repository Settings.
      • Alternatively, disable Bamboo push-on-success merge and then perform the merge and push manually

            Assignee:
            Marcin Gardias
            Reporter:
            Foong (Inactive)
            Votes:
            2 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: