Add order_by parameter to GET /permissions for pagination consistency - #63418
Merged
vincbeck merged 1 commit intoMar 12, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds an order_by query parameter to GET /permissions in the FAB auth manager FastAPI API so pagination is deterministic and consistent with other list endpoints.
Changes:
- Add
order_bysupport to the permissions service query (including SQLORDER BY). - Add
order_byquery parameter to the/permissionsroute and pass it to the service. - Update/add unit tests and update the generated OpenAPI spec to include the new query parameter.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| providers/fab/src/airflow/providers/fab/auth_manager/api_fastapi/services/roles.py | Add ordering support to get_permissions() via build_ordering() and .order_by(...). |
| providers/fab/src/airflow/providers/fab/auth_manager/api_fastapi/routes/roles.py | Add order_by query param (default id) and pass through to the service. |
| providers/fab/src/airflow/providers/fab/auth_manager/api_fastapi/openapi/v2-fab-auth-manager-generated.yaml | Document the new order_by query parameter in OpenAPI. |
| providers/fab/tests/unit/fab/auth_manager/api_fastapi/services/test_roles.py | Update existing tests for new signature and add ordering/invalid-order tests. |
| providers/fab/tests/unit/fab/auth_manager/api_fastapi/routes/test_roles.py | Update route test expectations and add tests for passing order_by and limit clamping behavior. |
You can also share your feedback on Copilot code review. Take the survey.
GET /permissions lacked the order_by parameter present on other list endpoints (e.g. GET /roles), causing non-deterministic pagination.
henry3260
force-pushed
the
add-order-by-in-get-permission-route
branch
from
March 12, 2026 09:02
09444a9 to
7ac9089
Compare
vincbeck
approved these changes
Mar 12, 2026
Pyasma
pushed a commit
to Pyasma/airflow
that referenced
this pull request
Mar 13, 2026
…apache#63418) GET /permissions lacked the order_by parameter present on other list endpoints (e.g. GET /roles), causing non-deterministic pagination.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
GET /permissionslacked theorder_byparameter present on other list endpoints (e.g. GET /roles), causing non-deterministic pagination.Was generative AI tooling used to co-author this PR?
{pr_number}.significant.rst, in airflow-core/newsfragments. You can add this file in a follow-up commit after the PR is created so you know the PR number.