You are viewing a plain text version of this content. The canonical link for it is here.
Posted to gitbox@yetus.apache.org by GitBox <gi...@apache.org> on 2020/09/28 20:20:51 UTC

[GitHub] [yetus] aw-was-here commented on a change in pull request #138: YETUS-966. github actions very confused about tags?

aw-was-here commented on a change in pull request #138:
URL: https://github.com/apache/yetus/pull/138#discussion_r496209004



##########
File path: precommit/src/main/shell/test-patch.sh
##########
@@ -1288,14 +1288,19 @@ function git_checkout
       # protected by OFFLINE == false
 
       if [[ "${GIT_OFFLINE}" == false ]]; then
-        if ! "${GIT}" fetch; then
-          yetus_error "ERROR: git fetch is failing"
-          cleanup_and_exit 1
-        fi
 
-        if ! "${GIT}" reset --hard FETCH_HEAD; then
-          yetus_error "ERROR: git reset is failing"
-          cleanup_and_exit 1
+        # if it is a tag, then the pull rebase should have done
+        # the trick already
+        if [[ ! -f ".git/refs/tags/${PATCH_BRANCH}" ]]; then

Review comment:
       The problem arises almost entirely in `--empty-patch` mode aka `qbt` mode.  In that case `PATCH_BRANCH` is going to be whatever has been requested to get built: main, branch-2.0, or rel/0.12.0. For example, we hit this bug every time we cut a release because `test-patch` runs on all pushes (which includes branch and tag creations).




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org