jerome-aosis opened a new issue, #23895:
URL: https://github.com/apache/airflow/issues/23895
### Official Helm Chart version
1.6.0 (latest released)
### Apache Airflow version
2.3.0 (latest released)
### Kubernetes Version
1.20.11
### Helm Chart configuration
```shell
"helm" upgrade --install "airflow" "path/to/Values.yaml" -n "my-namespace" \
--set "images.airflow.repository=myregistry/airflow" \
--set "images.airflow.pullPolicy=Always" \
--set "images.airflow.tag=v1.8.0"
```
### Docker Image customisations
My DAGs image is just an hello world DAGs:
```python
from datetime import datetime
from airflow import DAG
from airflow.operators.python import PythonOperator
def print_hello(): return 'Hello world from first Airflow DAG!'
dag = DAG('hello_world', description='Hello World DAG',
schedule_interval='0 * * * *',
start_date=datetime(2017, 3, 20), catchup=False)
hello_py_operator = PythonOperator(task_id='hello_task',
python_callable=print_hello, dag=dag)
hello_py_operator
```
The Dockerfile just copy the python file in the default `/opt/airflow/dags`
directory in the worker container.
### What happened
- First time I launch the installation, the DAG is correctly updated in the
worker container and the Airflow dashboard show up the DAF **==> OK**
- If I update the DAG by changing its name or description and push it to the
tag (v1.8.0 in this case)
```python
dag = DAG('hello_world2', description='Hello World2 DAG',
schedule_interval='0 * * * *',
start_date=datetime(2017, 3, 20), catchup=False)
```
- I relaunch the helm command and the old DAG is still here without the
updated name/description. **==> KO**
In the Kubernetes event, I can see that the image is pulled as intended
```shell
Successfully pulled image "myregistry/airflow:v1.8.0" in 1.882970769s
```
From here, the only way to refresh my updated DAG is to
- build a new container with a new tag (or use the SHA)
- OR kill workers & scheduler pods, to force de DAG to be refreshed.
### What you think should happen instead
DAG should be refreshed only using helm upgrade --install without the need
to kill worker/scheduler pods
### How to reproduce
- Use the official helm Chart Airflow apache/airflow:2.3.0
- build a container with DAGs inside with the tag v1.0.0
- run the `helm install` with the container and using pullPolicy to `Always`
- Change the dag a little
- Build the new container with the same tag
- run the `helm upgrade` command using pullPolicy to `Always`
### Anything else
This issue occurs everytime
### Are you willing to submit PR?
- [ ] Yes I am willing to submit a PR!
### Code of Conduct
- [X] I agree to follow this project's [Code of
Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]