You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Long running task failing because of JWT token expiration #58775
If "Other Airflow 2/3 version" selected, which one?
No response
What happened?
If you have a task running more than [execution_api] jwt_expiration_time (by default 10 minutes), the task fails because the JWT token expires without getting refreshed.
jwt.exceptions.ExpiredSignatureError: Signature has expired
What you think should happen instead?
The token should be refreshed before the token expires, it was working as such before but #58524 introduced this bug.
How to reproduce
Have a task that takes more than [execution_api] jwt_expiration_time. It will fail before it completes.
Maybe we need to mark Depends(JWTReissuer(), scope="function") too for JWTRefresherDep.
Otherwise this piece of code is done after the response is returned, and therefore the header is not set. That's because of the new way fastapi handles the dependency teardown.
Activity
pierrejeambrun commentedon Nov 27, 2025
Maybe we need to mark
Depends(JWTReissuer(), scope="function")too forJWTRefresherDep.Otherwise this piece of code is done after the response is returned, and therefore the header is not set. That's because of the new way fastapi handles the dependency teardown.
pierrejeambrun commentedon Nov 27, 2025
I'll test this in a bit and report back