Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

The /dags/{dag_id}/details endpoint returns less data than is documented #33482

Closed
1 of 2 tasks
RNHTTR opened this issue Aug 17, 2023 · 4 comments · Fixed by #34947
Closed
1 of 2 tasks

The /dags/{dag_id}/details endpoint returns less data than is documented #33482

RNHTTR opened this issue Aug 17, 2023 · 4 comments · Fixed by #34947
Labels
area:API Airflow's REST/HTTP API kind:bug This is a clearly a bug kind:documentation

Comments

@RNHTTR
Copy link
Contributor

RNHTTR commented Aug 17, 2023

What do you see as an issue?

The /dags/{dag_id}/details endpoint of the REST API does not return all of the keys that are listed in the documentation. If I run curl -X GET localhost:8080/api/v1/dags/{my_dag}/details, then compare the results with the results in the documentation, you can see the following missing keys:

>>> for key in docs.keys():
...     if not key in actual.keys():
...             print(key)
...
root_dag_id
last_parsed_time
last_pickled
last_expired
scheduler_lock
timetable_description
has_task_concurrency_limits
has_import_errors
next_dagrun
next_dagrun_data_interval_start
next_dagrun_data_interval_end
next_dagrun_create_after
template_search_path

Solving the problem

Either remove these keys from the documentation or fix the API endpoint

Anything else

No response

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

@RNHTTR RNHTTR added kind:bug This is a clearly a bug area:API Airflow's REST/HTTP API kind:documentation labels Aug 17, 2023
@pankajkoti pankajkoti self-assigned this Aug 18, 2023
@Taragolis
Copy link
Contributor

In OpenAI specification all of this fields marked as nullable, so I assume if no data exists for this fields (null) then this key doesn't exists in response. I'm not sure is it a bug or by design

@hussein-awala
Copy link
Member

In OpenAI specification all of this fields marked as nullable, so I assume if no data exists for this fields (null) then this key doesn't exists in response.

I don't think so, when I run the same query I get some fields with none values.

The problem is that we dump an instance of DAG class, but some of our fields exists in the DagModel class. I'm trying to find a solution, but IMHO it is not a bug in the documentation.

cc: @pankajkoti

@Taragolis
Copy link
Contributor

Oh, you right. I've also have a look, and found that there are different approaches to get data for DAGSchema (from DagModel) and DAGDetailsSchema (from DagBag)

@RNHTTR
Copy link
Contributor Author

RNHTTR commented Sep 11, 2023

So... all of the "missing" fields are attributes defined in DAGSchema that for some reason aren't propagating to DAGDetailSchema? Is that accurate...?

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
area:API Airflow's REST/HTTP API kind:bug This is a clearly a bug kind:documentation
Projects
None yet
4 participants