ashb commented on code in PR #60108:
URL: https://github.com/apache/airflow/pull/60108#discussion_r2980446069
##########
task-sdk/src/airflow/sdk/api/client.py:
##########
@@ -952,7 +952,10 @@ def __init__(self, *, base_url: str | None, dry_run: bool
= False, token: str, *
)
def _update_auth(self, response: httpx.Response):
- if new_token := response.headers.get("Refreshed-API-Token"):
+ if new_token := response.headers.get("X-Execution-Token"):
+ log.debug("Received execution token, swapping auth")
+ self.auth = BearerAuth(new_token)
+ elif new_token := response.headers.get("Refreshed-API-Token"):
Review Comment:
Nit: do we even need a new header? Couldn't we use `Refreshed-API-Token` in
both cases? Also if you do think a new header is worth it then remove the `X-`
prefix -- that is not recommended by HTTP standards anymore.
--
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]