-
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 Add Lists Jobs with Filters API #43859
base: main
Are you sure you want to change the base?
AIP-84 Add Lists Jobs with Filters API #43859
Conversation
Hey @jason810496, That’s a good question, and I’m glad you raised it! @rawwar and I had a similar discussion, and it seems we all have similar concerns. At first, I thought keeping Thanks for raising this! I am happy to keep the discussion going if others have thoughts on this approach. Otherwise, let’s go ahead and merge it into one endpoint. |
@jason810496 I missed including this part in my previous answer. I responded from my mind but forgot to put it into text. :) I think it makes more sense to keep the endpoint under |
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.
Nice, looking good overall.
A couple of suggestions and we can merge.
03a5681
to
e23c805
Compare
e23c805
to
37c1f8d
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.
Tests need fixing, but looking god to me.
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.
Looks good! Thanks for the changes!
37c1f8d
to
0df5e51
Compare
I think rebasing went wrong on the genrated file part. When you have any conflicts on those (openapi spec, or front end generated code). You can just re-run manually the hooks to refresh the files:
|
76440f1
to
ba9f034
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.
Nice one minor thing need to be adjusted, then we can merge.
ba9f034
to
1f25c7b
Compare
Just fix the trailing endpoint naming. |
Well I just tried the |
Hi @pierrejeambrun , I have ran the pre-commit locally and didn't not encounter current CI issue, not sure about what cause the |
This is due to the recent pydantic release that breaks some stuff. Main lower bound has been added and should be better, you most likely not have the appropriate pydantic version locally. Now it should be |
Most likely the CI image used to run the pre-commit hook ( You can run: breeze ci-image build --python 3.9 To refresh the image. And you should get the appropriate generated spec locally then. |
64f1317
to
f10c594
Compare
Closes: #43660
Related: #43657
Feature
I’ve placed the endpoint in
airflow/api_fastapi/core_api/routes/public/job.py
, but I’m not certain if this is the most appropriate location—perhapsairflow/api_fastapi/core_api/routes/cli/job.py
would also fine ?The query parameters, response data models, and implementation are consistent with the rest of the public API, utilizing
common.parameters
andpaginated_select
.Tests
The test cases are refactored from the original airflow/tests/cli/commands/test_jobs_command.py, as the CLI should yield the same results when leveraging the API instead of direct DB access.
Question
Hi @bugraoz93, I’m curious about the distinction between this PR’s endpoint (List Jobs with filters) and #43661 (List Jobs), as both endpoints seem to provide job listings. From my perspective, calling this "List Jobs with filters" endpoint without query parameters would yield the same response as the "List Jobs" endpoint.
cc @josix