elastic / jarvis

Logstash's ChatOps bot, J.A.R.V.I.S.
41 stars 28 forks source link

Commits end up with 'merge' messages #106

Closed roaksoax closed 4 years ago

roaksoax commented 4 years ago
commit 678a78c70552f7c91ddc94bf9c17fa7b1d93adfd (HEAD -> master, origin/master, origin/HEAD)
Merge: 78eb3b81f 74b2153cc
Author: Andrea Selva <andrea.selva@elastic.co>
Date:   Wed May 27 16:24:48 2020 +0000

    merge

$ git show 78eb3b81f

commit 78eb3b81f3a0fa3519424b3f340ace89637171cb
Merge: 9f56b468f 386c263a7
Author: Andrea Selva <andrea.selva@elastic.co>
Date:   Wed May 27 15:57:51 2020 +0000

    merge

$ git show 74b2153cc

commit 74b2153ccda015ef5dde37228d578af4370b244a
Author: andsel <selva.andre@gmail.com>
Date:   Wed May 27 18:22:21 2020 +0200

    Renamed os axis to label

diff --git a/.ci/matrix-unix-compatibility-linux-distros.yml b/.ci/matrix-unix-compatibility-linux-distros.yml
index eeb68ab09..bf6195e90 100644
--- a/.ci/matrix-unix-compatibility-linux-distros.yml
+++ b/.ci/matrix-unix-compatibility-linux-distros.yml
@@ -18,7 +18,7 @@
 #  - ubuntu-18.04&&immutable
 #  - ubuntu-20.04&&immutable

-os:
+label:
   - amazon
   - centos&&immutable
   - debian&&immutable
diff --git a/.ci/matrix-unix-linux-distros.yml b/.ci/matrix-unix-linux-distros.yml
index fdfb75dea..4f529e524 100644
--- a/.ci/matrix-unix-linux-distros.yml
+++ b/.ci/matrix-unix-linux-distros.yml
@@ -4,6 +4,6 @@
 # This axis of the build matrix represents the Linux distributions on
 # which Logstash will be tested.

-os:
+label:
   - centos-7&&immutable
   - ubuntu-18.04&&immutable
\ No newline at end of file
jsvd commented 4 years ago

This happens because the jarvis command uses git merge, and if the target branch has progressed then a merge commit is used to preserve the commits. Preserving these are needed to mark the github PR as merged (instead of closed).

To sort this we need to use the github merge api. So the order would be :

  1. github merge api to target branch
  2. checkout target branch, do a git format-patch with these commits
  3. apply to all remaining/backport branches
  4. push to origin

the only remaining concern is that in this scenario we don't validate that the cherry-picks work on backport branches. which would lead to the target branch getting merged but not the backports.

I'll find out if it's possible to do a dry run or similar that still gives us the diff we can apply to test.