kcphila commented on issue #42136:
URL: https://github.com/apache/airflow/issues/42136#issuecomment-3049398413

   Hi friends - I am testing out migrating from 2.10 to 3.0 and ran into this 
issue when doing tests with a dockerized LocalExecutor. I ran into this error 
(and a couple others) and have finally diagnosed them.  
   
   Here are a few comments:
   
   ## Issue 1: `base_url`
   
   I ended up setting an empty `base_url`, e.g. this line in the `airflow.cfg`: 
   
   ```conf
   [api]
   base_url =
   ```
   
   Note that Airflow's config manager does not treat a non-existent config key 
and an empty config key the same, and so I had to comment this out `# base_url` 
or LocalExecutor failed to resolve the correct url. This seems unintended, and 
so I also opened up an [issue](https://github.com/apache/airflow/issues/53033) 
related to it.
   
   ## Issue 2: The new `execution_api_server_url`
   
   There's a new config variable in Airflow 3, 
[`execution_api_server_url`](https://airflow.apache.org/docs/apache-airflow/stable/configurations-ref.html#execution-api-server-url),
 which defaults to `http://localhost:8080/execution/`
   
   In my dockerized deployment in which the scheduler runs in a different 
container than the api-server, I had to point this to the API container (with 
container name "airflow-apiserver") and not localhost. This does not affect the 
`base_url`
   
   ```conf
   execution_api_server_url = http://airflow-apiserver:8080/execution/
   ```
   
   ## Issue 3: Log file format
   
   I don't know if something changed, but I had a custom log filename format 
that specified the **try_number** as `{{ try_number }}`. This is no longer a 
valid identifier, but can be accessed through the task instance, e.g.
   
   From this in 2.10:
   
   ```
   log_filename_template = dags/{{ ti.dag_id }}/{{ ti.run_id }}/{{ ti.task_id 
}}/{{ try_number }}.log
   ```
   
   TO 
   
   ```
   log_filename_template = dags/{{ ti.dag_id }}/{{ ti.run_id }}/{{ ti.task_id 
}}/{{ ti.try_number }}.log
   ```
   
   Otherwise, the logs all get saved to hidden file `.log` because try_number 
is no longer a valid template option, and the apiserver can't find them


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

Reply via email to