Skip to content

Conversation

@jason810496
Copy link
Member

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 across clients/python/test_python_client.py, docker_tests, and kubernetes_tests.

How

  • Introduce generate_jwt_token and RefreshJwtAdapter as utility functions.
  • Rename get_jwt_token to generate_jwt_token, as suggested by @ashb.

@boring-cyborg boring-cyborg bot added area:API Airflow's REST/HTTP API area:production-image Production image improvements and fixes labels Mar 13, 2025
@jason810496 jason810496 force-pushed the refactor/make-generate-jwt-token-as-common-module branch from 518b485 to e2d468d Compare March 25, 2025 05:33
@jason810496 jason810496 added area:CI Airflow's tests and continious integration area:dev-env CI, pre-commit, pylint and other changes that do not change the behavior of the final code and removed area:dev-env CI, pre-commit, pylint and other changes that do not change the behavior of the final code labels Mar 25, 2025
@jason810496 jason810496 force-pushed the refactor/make-generate-jwt-token-as-common-module branch from e2d468d to b5e2169 Compare March 25, 2025 08:02
@jason810496 jason810496 marked this pull request as ready for review March 25, 2025 08:02
@jason810496 jason810496 force-pushed the refactor/make-generate-jwt-token-as-common-module branch 2 times, most recently from 3c72861 to b022a62 Compare March 25, 2025 11:54
@jason810496 jason810496 marked this pull request as draft March 26, 2025 08:23
Copy link
Contributor

@vincbeck vincbeck left a 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

@jason810496
Copy link
Member Author

I like this PR, I think it is a great idea. However, it will potentially conflict with #48498

Thanks for reminding the conflict @vincbeck !
It's not a big problems, I can rebase after #48498 being merged.

@jason810496 jason810496 force-pushed the refactor/make-generate-jwt-token-as-common-module branch from b022a62 to ca65747 Compare March 28, 2025 14:51
@jason810496 jason810496 force-pushed the refactor/make-generate-jwt-token-as-common-module branch 2 times, most recently from 58cd84d to 37e712d Compare March 29, 2025 14:31
@jason810496 jason810496 added the full tests needed We need to run full set of tests for this PR to merge label Mar 29, 2025
@jason810496 jason810496 reopened this Mar 29, 2025
@vincbeck
Copy link
Contributor

#48498 is now merged

@jason810496 jason810496 force-pushed the refactor/make-generate-jwt-token-as-common-module branch from a17701c to a6509f1 Compare April 9, 2025 08:20
@jason810496 jason810496 self-assigned this Apr 10, 2025
@jason810496 jason810496 marked this pull request as ready for review April 10, 2025 16:50
@jason810496 jason810496 changed the title Move generate_jwt_token to test_common.test_utils Move generate_access_token to test_common.test_utils Apr 10, 2025
@jason810496
Copy link
Member Author

Non-related test fail, ready to review.

@jason810496 jason810496 merged commit 89d8345 into apache:main Apr 11, 2025
95 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:API Airflow's REST/HTTP API area:CI Airflow's tests and continious integration area:production-image Production image improvements and fixes full tests needed We need to run full set of tests for this PR to merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants