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/27 17:42:05 UTC

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

aw-was-here opened a new pull request #138:
URL: https://github.com/apache/yetus/pull/138


   


----------------------------------------------------------------
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



[GitHub] [yetus] aw-was-here merged pull request #138: YETUS-966. github actions very confused about tags?

Posted by GitBox <gi...@apache.org>.
aw-was-here merged pull request #138:
URL: https://github.com/apache/yetus/pull/138


   


----------------------------------------------------------------
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



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

Posted by GitBox <gi...@apache.org>.
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



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

Posted by GitBox <gi...@apache.org>.
aw-was-here commented on pull request #138:
URL: https://github.com/apache/yetus/pull/138#issuecomment-700261301


   Thanks for the review! Merging this!


----------------------------------------------------------------
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



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

Posted by GitBox <gi...@apache.org>.
ndimiduk commented on a change in pull request #138:
URL: https://github.com/apache/yetus/pull/138#discussion_r496178728



##########
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

Review comment:
       _nod_

##########
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:
       `PATCH_BRANCH` not being a tag -- this should be the common case, correct? I'm trying to imagine when/why someone would build a tag instead of a branch. Is ghaction invoked against anything other than a PR? I suppose one _could_ create a PR from a tag.




----------------------------------------------------------------
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