Skip to content
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

Add dag re-parsing request endpoint #39138

Merged
merged 44 commits into from
May 14, 2024
Merged

Conversation

utkarsharma2
Copy link
Contributor

@utkarsharma2 utkarsharma2 commented Apr 19, 2024

API endpoint to request reparsing of DAG.

The API is useful in cases when users have lots of dags and want to prioritize the parsing of a particular dag. We record the requests in the DB table and rearrange the file_path_queue variable such that the requested DAG is prioritized over other dags in the queue.

@boring-cyborg boring-cyborg bot added area:API Airflow's REST/HTTP API area:db-migrations PRs with DB migration area:Scheduler including HA (high availability) scheduler area:UI Related to UI/UX. For Frontend Developers. area:webserver Webserver related Issues kind:documentation labels Apr 19, 2024
@utkarsharma2 utkarsharma2 added this to the Airflow 2.10.0 milestone Apr 19, 2024
Co-authored-by: Tzu-ping Chung <uranusjr@gmail.com>
Copy link
Member

@uranusjr uranusjr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good enough

@utkarsharma2 utkarsharma2 merged commit 6bcec90 into apache:main May 14, 2024
41 checks passed
@utkarsharma2 utkarsharma2 deleted the DagReparsing branch May 14, 2024 12:15
utkarsharma2 added a commit to astronomer/airflow that referenced this pull request May 15, 2024
utkarsharma2 added a commit that referenced this pull request May 22, 2024
* UI changes for DAG Reparsing feature

releated: #39138

* Add correct permission for UI

* Fix JS

* Update airflow/www/static/js/main.js

* Add a wrapper arounf REST DAG Reparsing API

* Move file_token from dag object to a separate field

* Fix CI issue

* Change icons
romsharon98 pushed a commit to romsharon98/airflow that referenced this pull request Jul 26, 2024
* Add dag re-parsing request endpoint

* Fix migration files

* Fix test_file_paths_in_queue_sorted_by_priority test

* Fix database cleanup issue

* Change http method to post

* Fix static checks

* Remove created object from response

* Fix testcases

* Fix testcases

* Change http response status for duplicate request

* Fix tests

* Changed the airflow version in migration file

* Update airflow/api_connexion/openapi/v1.yaml

Co-authored-by: Tzu-ping Chung <uranusjr@gmail.com>

* Update airflow/api_connexion/openapi/v1.yaml

Co-authored-by: Tzu-ping Chung <uranusjr@gmail.com>

* Update airflow/models/dagbag.py

Co-authored-by: Wei Lee <weilee.rx@gmail.com>

* Update airflow/dag_processing/manager.py

Co-authored-by: Wei Lee <weilee.rx@gmail.com>

* Better exception handling

* Addressed PR comments

* Fix tests

* Update airflow/api_connexion/openapi/v1.yaml

Co-authored-by: Jed Cunningham <66968678+jedcunningham@users.noreply.github.com>

* Update airflow/api_connexion/endpoints/dag_parsing.py

Co-authored-by: Jed Cunningham <66968678+jedcunningham@users.noreply.github.com>

* Update airflow/api_connexion/openapi/v1.yaml

Co-authored-by: Jed Cunningham <66968678+jedcunningham@users.noreply.github.com>

* Update airflow/models/dagbag.py

Co-authored-by: Jed Cunningham <66968678+jedcunningham@users.noreply.github.com>

* Apply the suggestion from PR comments

* Remove __eq__ magic method

* Remove get_requests() method

* Optimize database request

* Update airflow/dag_processing/manager.py

Co-authored-by: Tzu-ping Chung <uranusjr@gmail.com>

* Fix test

* Change return status code

* Fix test

* Fix static checks

---------

Co-authored-by: Tzu-ping Chung <uranusjr@gmail.com>
Co-authored-by: Wei Lee <weilee.rx@gmail.com>
Co-authored-by: Jed Cunningham <66968678+jedcunningham@users.noreply.github.com>
romsharon98 pushed a commit to romsharon98/airflow that referenced this pull request Jul 26, 2024
* UI changes for DAG Reparsing feature

releated: apache#39138

* Add correct permission for UI

* Fix JS

* Update airflow/www/static/js/main.js

* Add a wrapper arounf REST DAG Reparsing API

* Move file_token from dag object to a separate field

* Fix CI issue

* Change icons
kosteev pushed a commit to GoogleCloudPlatform/composer-airflow that referenced this pull request Nov 9, 2024
* UI changes for DAG Reparsing feature

releated: apache/airflow#39138

* Add correct permission for UI

* Fix JS

* Update airflow/www/static/js/main.js

* Add a wrapper arounf REST DAG Reparsing API

* Move file_token from dag object to a separate field

* Fix CI issue

* Change icons

GitOrigin-RevId: 2250a1a228f30d13ae3c481b059e05bbd29d3839
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:API Airflow's REST/HTTP API area:db-migrations PRs with DB migration area:Scheduler including HA (high availability) scheduler area:UI Related to UI/UX. For Frontend Developers. area:webserver Webserver related Issues kind:documentation type:new-feature Changelog: New Features
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants