potiuk commented on pull request #13299:
URL: https://github.com/apache/airflow/pull/13299#issuecomment-751841821


   Hey QP. I tested the prod image used (the one that is used as a base for 
testing k8s ) and it seems that it contains your changes:
   
   ```
   docker run -it 
docker.pkg.github.com/apache/airflow/master-python3.6:448166283 bash
   airflow@9a15b4ba9935:/opt/airflow$ cd 
~/.local/lib/python3.6/site-packages/airflow/executors/
   airflow@9a15b4ba9935:~/.local/lib/python3.6/site-packages/airflow/executors$ 
grep _make_safe_pod_id kubernetes_executor.py
   airflow@9a15b4ba9935:~/.local/lib/python3.6/site-packages/airflow/executors$ 
grep airflow.kubernetes.pod_generator  kubernetes_executor.py
   from airflow.kubernetes.pod_generator import PodGenerator
   airflow@9a15b4ba9935:~/.local/lib/python3.6/site-packages/airflow/executors$ 
python
   Python 3.6.12 (default, Nov 25 2020, 03:59:00) 
   [GCC 8.3.0] on linux
   Type "help", "copyright", "credits" or "license" for more information.
   >>> from airflow.executors.kubernetes_executor import PodGenerator
   >>> from airflow.executors.kubernetes_executor MAX_POD_ID_LEN
     File "<stdin>", line 1
       from airflow.executors.kubernetes_executor MAX_POD_ID_LEN
                                                               ^
   SyntaxError: invalid syntax
   >>> 
   ```
   
   Explanation: 
   All images that we use for testing are automatically stored in GitHub image 
registry with the RUN_ID tag:
   `docker.pkg.github.com/apache/airflow/master-python3.6:448166283` is the one 
that was used in case of the last run.
   
   I entered the image (via bash command) and run some greps and imports and 
seems that everything is as in your PR (removed MAX_POD_ID_LEN, removed 
_make_safe_pod_id)
   
   What happens next in the tests (you can see it in the logs) the image is 
tagged apache/airflow:master-python3.6:
   
   ```
   Tagging docker.pkg.github.com/apache/airflow/master-python3.6:448166283 as 
apache/airflow:master-python3.6
   ```
   
   And in the next step, the same image is used as a base for the K8S image and 
the image is loaded to the cluster:
   
   Building the K8S image (basically embedding pod templates and example dags 
in the image):
   
   ```
   Step 1/5 : FROM apache/airflow:master-python3.6
    ---> d83522e8e04d
   Step 2/5 : USER root
    ---> Running in 4c6ab5c14968
   Removing intermediate container 4c6ab5c14968
    ---> ab350a1cf73b
   Step 3/5 : COPY --chown=airflow:root airflow/example_dags/ 
${AIRFLOW_HOME}/dags/
    ---> 5bb3d159f5f9
   Step 4/5 : COPY --chown=airflow:root airflow/kubernetes_executor_templates/ 
${AIRFLOW_HOME}/pod_templates/
    ---> 12adf141ca1e
   Step 5/5 : USER airflow
    ---> Running in fa63e6afc5b4
   Removing intermediate container fa63e6afc5b4
    ---> 12e5286b9925
   Successfully built 12e5286b9925
   Successfully tagged apache/airflow:master-python3.6-kubernetes
   The apache/airflow:master-python3.6-kubernetes is prepared for test 
kubernetes deployment.
   ```
   
   And then this image is loaded to the K8S cluster:
   
   ```
   Loading apache/airflow:master-python3.6-kubernetes to 
airflow-python-3.6-v1.18.6
   ```
   
   So all there seems totally legit.
   
   Can you please rebase once again on top of the master? I improved the 
logging even more in recent versions and hopefully it will be even clearer 
what's going on here.
   


----------------------------------------------------------------
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:
[email protected]


Reply via email to