-
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 | Public list tags API #42959
AIP-84 | Public list tags API #42959
Conversation
Hi, this PR should be marked with the |
Thanks for the contribution! w/o having a full review I assume you should mark the legacy API as being migrated like e.g. in https://github.com/apache/airflow/pull/42798/files#diff-df829fc289eeca0e932974a5110a8f2c21b1962e87db7c3a3b44dacf084f54a1R47 ? |
Okay, then if this is not a migration we should clarify if this really should get to be a public API. I'd think if it is used only in one place in the new UI then we should not make it a new public API. As there are other public APIs to retrieve the sme information (https://airflow.apache.org/docs/apache-airflow/stable/stable-rest-api-ref.html#operation/get_dag_details) |
Sure, that makes sense. I’ll go ahead and move this endpoint to the UI folder. |
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.
Thanks for the PR, a few suggestions before we can merge this.
I think this is a good addition to the public API because currently there is no way for a user to be able to retrieve all the Meaning that users of the API would have to know in advance tags to effectively filter on them. |
Based on all the above input, I believe the original intention of issue #42713 is to provide an endpoint to retrieve all tags across all DAGs for advanced filtering functionalities. I agree with the last comment by @pierrejeambrun, so this endpoint should remain in the {
"tags": ["tag_1", "tag_2"],
"total_entries": 2
} Additionally, the endpoint should support Please correct me if I have misunderstood anything. Thanks ! |
I think the response could be:
Basically we return serialized |
Is |
I’ll check the db modelling tomorrow, something I might have missesed. I suggested that dag_id was there because that’s how the sqlalchemy model is defined. But indeed from a business point of view this does not make sense. But on the other hand the name is the primary key and unique, so I guess there is something I need to double check. |
159218d
to
3ef4f5b
Compare
Update:The endpoint is placed in the
Example of the response schema: {
"tags": ["tag_1", "tag_2"],
"total_entries": 3
} For the SQL statement, the
While the Feature:
|
You will have to rebase and fix conflicts as we change how |
daa6678
to
da843b0
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.
Looking good
We need to remove the extra query parameter
to use the SortParam
and we should be good.
da843b0
to
2f1cb76
Compare
Update:Hi @pierrejeambrun, the Refactor:
|
Thanks @jason810496, Do you mind putting the refactoring part into its own PR so it does not block this one. |
Sure, so I should create a new branch on top of the current commit and rebase the current branch. |
Yes, you can checkout another branch from here (full with refactoring). Then in this branch you can drop them (the refactoring part) |
47646c9
to
74977b9
Compare
Resolved! I have removed the refactoring part. |
74977b9
to
8393650
Compare
Unrelated CI failure, merging. Thanks @jason810496 |
* AIP-84 | Public list tags API * refactor: upd resp schema, use paginated_select * refactor(test): move test to routers/public folder * refactor: remove OrderBy param, use SortParm
* AIP-84 | Public list tags API * refactor: upd resp schema, use paginated_select * refactor(test): move test to routers/public folder * refactor: remove OrderBy param, use SortParm
* AIP-84 | Public list tags API * refactor: upd resp schema, use paginated_select * refactor(test): move test to routers/public folder * refactor: remove OrderBy param, use SortParm
closes: #42713
Migrate from https://github.com/apache/airflow//blob/main/airflow/www/views.py#L1035-L1038