-
Notifications
You must be signed in to change notification settings - Fork 14.3k
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
AIP 84: Migrate GET one ASSET legacy API to fast API #43825
base: main
Are you sure you want to change the base?
AIP 84: Migrate GET one ASSET legacy API to fast API #43825
Conversation
Co-authored-by: Jed Cunningham <[email protected]>
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.
@pierrejeambrun a note for you
"/{uri:path}", | ||
responses=create_openapi_http_exception_doc([401, 403, 404]), |
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.
Since we can pass uri in the path parameters and fastAPI encodes and decodes it, for fastAPI to be able to recognise the uri's properly, following starlette's path convertor here.
The {uri:path} portion specifies that the uri part of the path is a variable that can contain any sequence of characters, including slashes (/), making it a path parameter.
{uri:path}
uri is the name of the path parameter.
:path
tells fastAPi that this parameter should capture everything in the path.
References:
@@ -0,0 +1,66 @@ | |||
# Licensed to the Apache Software Foundation (ASF) under one |
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.
This should now move to airflow/api_fastapi/core_api/datamodels/assets.py
after we merged PR: #43823
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.
A few common comments from the previous PR that this work is based off.
Otherwise looks good, I'll do a final in depth review once the previous PR is merged.
NOTE TO REVIEWERS
Only last 2 commits are relevant
Depends on #43783
related: #42370
Migrating the connexion API for GET one ASSETS to fastAPI.
Testing performed:
API responses:
Legacy:
FastAPI:
Swagger Spec:
^ 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.