-
Notifications
You must be signed in to change notification settings - Fork 0
Description
Summary
Build-group references to merged pull requests can break test when auto-branch deletion and squash-merge are used.
Description
This issue was observed and debugged in this UFO check run.
1) The pull request was configured with the annotation build-group=JCSDA-internal/ioda-converters#1697 but at the time the test was initiated, the the pull request had already been merged.
2) Several hours prior to the check run, Ben Ruston merged the ioda-converters#1697 pull request which triggered automatic deletion of the associated branch. Because he also used a squash merge (which does not link to the commit history of the PR) the branch deletion transitively deleted the now-detached commits from the PR. Note this is default behavior for most JEDI repositories and was not a choice made by Ben.
3) During test configuration the runner queried GitHub which correctly identified the branch name and latest commit hash for the ioda-converters pull request because this is GitHub metadata, not Git metadata.
4) Finally, during the actual build, the test runner failed to find the Git reference because it did not exist.
-- Adding bundle project iodaconv
--
-- Cloning iodaconv from https://github.com/jcsda-internal/ioda-converters.git into /workdir/bundle/iodaconv...
-- /workdir/bundle/iodaconv retrieved.
-- Updating iodaconv to TAG f6203f5ceda8393e0e894e796aa4e6dc47f04534...
-- git fetch --all @ /workdir/bundle/iodaconv
-- git fetch --all --tags @ /workdir/bundle/iodaconv
-- git checkout f6203f5ceda8393e0e894e796aa4e6dc47f04534 @ /workdir/bundle/iodaconv
CMake Error at /opt/views/._view/wyydi4a6nosgnqvs2yi2v254744uxxhg/share/ecbuild/cmake/ecbuild_log.cmake:190 (message):
�[1;35mCRITICAL - git checkout f6203f5ceda8393e0e894e796aa4e6dc47f04534 on
/workdir/bundle/iodaconv failed:
/usr/bin/git checkout -q f6203f5ceda8393e0e894e796aa4e6dc47f04534
fatal: reference is not a tree: f6203f5ceda8393e0e894e796aa4e6dc47f04534
Proposed fix
Test configuration should check if a PR is merged and then ignore the link annotation if it is merged.
Remediation for affected tests
Remove the build group annotation and re-run

