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 2021/06/14 23:41:49 UTC

[GitHub] [airflow] sawaca96 edited a comment on issue #15572: import error

sawaca96 edited a comment on issue #15572:
URL: https://github.com/apache/airflow/issues/15572#issuecomment-861061924


   @zorzigio 
   >@sawaca96, I expected it to work, however when trying to install the Helm chart, it raises the following error
   
   I want to get more information. then I can try to find cause.
   
   What helm chart are you using ? I'm use [airflow-stable](https://github.com/airflow-helm/charts/tree/main/charts/airflow)
   
   > As from the Airflow documentation, Airflow should include the dags path by default?
   
   I don't think so. but if you want to use module in dags folder then you should include dags path.
   
   >A workaraound is setting PYTHONPATH in values.yaml directly as env variable
   
   I use this [offical values.yaml](https://github.com/airflow-helm/charts/blob/main/charts/airflow/values.yaml), I can't find env section
   
   In addition, explain `extraEnv`
   If you use kubernetes secrets to airflow env then you use `extraEnv` like this 
   ```
   kubectl create secret generic some-secrets --from-literal='SOME_SECRETS'='SOME_SECRETS' 
   ```
   
   ```
   extraEnv:
       - name: SOME_SECRETS
         valueFrom:
           secretKeyRef:
             name: some-secrets
             key: SOME_SECRETS
   ```
   
   ## Important
   
   Note: **change** `PYTHONPATH: /opt/airflow/dags/repo` to `PYTHONPATH: $PYTHONPATH:/opt/airflow/dags/repo` 
   
   The former overwrites(existing path lost) the existing path and the latter is added to the existing path.
   


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