Skip to content
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

Update Rest API tests to no longer rely on FAB auth manager. Move tests specific to FAB permissions to FAB provider #42523

Merged
merged 26 commits into from
Oct 1, 2024

Conversation

vincbeck
Copy link
Contributor

@vincbeck vincbeck commented Sep 26, 2024

Many tests in tests/api_connexion/endpoints/ rely on FAB permission model. Since we want to get rid of FAB, we need to make these tests agnostic from FAB. In this PR, they are now using simple auth manager.

I did two things:

  • Any test that do not need granular permissions, keep them in tests/api_connexion/endpoints/ and make them agnostic from FAB
  • Any test using granular permissions, move them to FAB provider

This PR is quite big but I could not find a way to make it smaller. Here are some tips for a quicker review:

  • Code change in tests/api_connexion/endpoints/ is removing tests that use granular permissions
  • Code change in tests/providers/fab/auth_manager/api_endpoints/ is tests being copy pasted from tests/api_connexion/endpoints/ that use granular permissions (the ones that are removed in the previous step)

^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in a newsfragment file, named {pr_number}.significant.rst or {issue_number}.significant.rst, in newsfragments.

…ts specific to FAB permissions to FAB provider

This reverts commit 770c9db8fd2cdb6bcffd9cb951c916b4b25a9917.
Copy link
Contributor

@jscheffl jscheffl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two questions, once this is secured Okay for me to approve :-D

airflow/models/dagrun.py Outdated Show resolved Hide resolved
@vincbeck vincbeck merged commit 9536c98 into apache:main Oct 1, 2024
56 of 57 checks passed
@vincbeck vincbeck deleted the vincbeck/rest_api_tests branch October 1, 2024 13:59
@potiuk
Copy link
Member

potiuk commented Oct 1, 2024

WHOA! Fantastic.

joaopamaral pushed a commit to joaopamaral/airflow that referenced this pull request Oct 21, 2024
ellisms pushed a commit to ellisms/airflow that referenced this pull request Nov 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants