potiuk commented on a change in pull request #4938: [AIRFLOW-4117] 
Multi-staging Image - Travis CI tests [Step 3/3]
URL: https://github.com/apache/airflow/pull/4938#discussion_r293107546
 
 

 ##########
 File path: scripts/ci/ci_before_install.sh
 ##########
 @@ -0,0 +1,34 @@
+#!/usr/bin/env bash
+
+#
+#  Licensed to the Apache Software Foundation (ASF) under one
+#  or more contributor license agreements.  See the NOTICE file
+#  distributed with this work for additional information
+#  regarding copyright ownership.  The ASF licenses this file
+#  to you under the Apache License, Version 2.0 (the
+#  "License"); you may not use this file except in compliance
+#  with the License.  You may obtain a copy of the License at
+#
+#    http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing,
+#  software distributed under the License is distributed on an
+#  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+#  KIND, either express or implied.  See the License for the
+#  specific language governing permissions and limitations
+#  under the License.
+
+set -xeuo pipefail
+
+MY_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
+
+export KUBERNETES_VERSION=${KUBERNETES_VERSION:=}
+# Required for K8s v1.10.x. See
+# https://github.com/kubernetes/kubernetes/issues/61058#issuecomment-372764783
+if [[ ! -z "${KUBERNETES_VERSION}" ]]; then
+    sudo mount --make-shared /
+    sudo service docker restart
+fi
+pip install --upgrade pip
 
 Review comment:
   @fokko - The ci_before_install.sh is run in the host environment before 
docker compose is run so this pip install is run in the host. So it used to run 
all the pylint/doc check and other rather than tests. They are not run in 
docker to speed it up - but using local python on the host. This was a 
workaround for the long time to start the original airflow-ci docker image - it 
was always installing all the dependencies first before doing anything and it 
took a long time to even do pylint/doccheck etc.. 
   
   Thus said - with the new Dockerfile approach, running all the pylint/docs 
etc. in Docker should be as fast as running them with local python installation 
(unless we have updated setup.py) and then we might indeed remove any python 
installation on the host. Should be super-easy and I might try to do it now . 
WDYT @fokko ?

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to