You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2019/11/11 15:51:29 UTC

[GitHub] [airflow] ddelange commented on a change in pull request #6523: [AIRFLOW-5873] KubernetesPodOperator fixes and test

ddelange commented on a change in pull request #6523: [AIRFLOW-5873] KubernetesPodOperator fixes and test
URL: https://github.com/apache/airflow/pull/6523#discussion_r344776978
 
 

 ##########
 File path: scripts/ci/_utils.sh
 ##########
 @@ -777,7 +777,9 @@ function build_image_on_ci() {
     echo "Finding changed file names ${TRAVIS_BRANCH}...HEAD"
     echo
 
-    CHANGED_FILE_NAMES=$(git diff --name-only "${TRAVIS_BRANCH}...HEAD")
+    git config remote.origin.fetch "+refs/heads/*:refs/remotes/origin/*"
+    git fetch origin ${TRAVIS_BRANCH}
+    CHANGED_FILE_NAMES=$(git diff --name-only "remotes/origin/${TRAVIS_BRANCH}...HEAD")
 
 Review comment:
   when PR is not against master, and the PR is not a branch in apache/airflow, travis clones master, fetches the HEAD of this PR and checks it out. Then, this shell script tries `git diff --name-only v1-10-test...HEAD`, which errors since `v1-10-test` has not been fetched. These changes are to have `diff` output in all normal cases, plus this case. See for instance these Travis logs: https://travis-ci.org/apache/airflow/jobs/610354673#L166-L214

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


With regards,
Apache Git Services