canonical/kubeflow-ci

Track and Branch Automation fails during merge trigger.

Closed this issue · 1 comments

The Branch and Track automation fails when it is triggered during a merge. It fails during the following call:
git diff --name-only HEAD~1..HEAD
This is called to check if any of the files in the releases directory were changed. This seems to fail during merges due to some conflict between git branches. A different method to discover these changes needs to be found.

Until then the current workaround is to just ignore the merge failure and call the automation manually through workflow dispatch.

I am not looking at this code atm, but I've seen similar things in other CI. It might be because the way you git diff against the "past" depends on whether you're doing a PR or merge. There are some gh actions written specifically to handle this, or our own logic can be implemented