-
Notifications
You must be signed in to change notification settings - Fork 14.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Move generate_jwt_token
to test_common.test_utils
#47712
base: main
Are you sure you want to change the base?
Move generate_jwt_token
to test_common.test_utils
#47712
Conversation
518b485
to
e2d468d
Compare
e2d468d
to
b5e2169
Compare
3c72861
to
b022a62
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like this PR, I think it is a great idea. However, it will potentially conflict with #48498
b022a62
to
ca65747
Compare
:return: The JWT token | ||
""" | ||
Retry.DEFAULT_BACKOFF_MAX = 32 | ||
retry = Retry(total=10, backoff_factor=1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be good to add some status_forcelist
or provide a config? the default status_forcelist
is None
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just added 429
and common 5xx
server side error as status_forcelist
, thanks for the catch !
35d6fbd
to
58cd84d
Compare
58cd84d
to
37e712d
Compare
#48498 is now merged |
related slack discussion: https://apache-airflow.slack.com/archives/C06K9Q5G2UA/p1741769075107729
Why
Since AIP-84 | Add Auth for Dags #47433 introduces
get_jwt_token
with the new login flow for testing. To ensure consistency, this test utility should have a single source acrossclients/python/test_python_client.py
,docker_tests
, andkubernetes_tests
.How
generate_jwt_token
andRefreshJwtAdapter
as utility functions.get_jwt_token
togenerate_jwt_token
, as suggested by @ashb.