Skip to content

Improve DAG ORM cleanup code#30614

Merged
uranusjr merged 2 commits into
apache:mainfrom
astronomer:dag-orm-refresh-refactor
Jun 26, 2023
Merged

Improve DAG ORM cleanup code#30614
uranusjr merged 2 commits into
apache:mainfrom
astronomer:dag-orm-refresh-refactor

Conversation

@uranusjr

@uranusjr uranusjr commented Apr 13, 2023

Copy link
Copy Markdown
Member

I identified when reviewing #30608 that the _refresh_dag_dir() function can use some cleanup, mainly to use a set instead of list to speed up lookup. To maintain backward comaptibility in type hints, the called functions are changed to use the Collection generic instead of the very narrow list type.

This somehow triggers a bunch of (legistimate) Mypy errors not emitted previously, mostly around mixing the os.PathLike generic and the pathlib.Path concrete type. I fixed those as well.

@boring-cyborg boring-cyborg Bot added area:Scheduler including HA (high availability) scheduler area:serialization labels Apr 13, 2023
@potiuk

potiuk commented Apr 22, 2023

Copy link
Copy Markdown
Member

Sounds legit. I think there was a transient error on that one though.

@github-actions

github-actions Bot commented Jun 7, 2023

Copy link
Copy Markdown
Contributor

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in 5 days if no further activity occurs. Thank you for your contributions.

@github-actions github-actions Bot added the stale Stale PRs per the .github/workflows/stale.yml policy file label Jun 7, 2023
@github-actions github-actions Bot closed this Jun 12, 2023
@uranusjr uranusjr reopened this Jun 21, 2023
@uranusjr
uranusjr force-pushed the dag-orm-refresh-refactor branch from dc113d2 to 553ca26 Compare June 21, 2023 05:18
@uranusjr uranusjr removed the stale Stale PRs per the .github/workflows/stale.yml policy file label Jun 21, 2023
uranusjr added 2 commits June 21, 2023 15:17
I identified when reviewing apache#30608 that the _refresh_dag_dir() function
can use some cleanup, mainly to use a set instead of list to speed up
lookup. To maintain backward comaptibility in typ hints, the called
functions are changed to use the Collection generic instead of the very
narrow list type.

This somehow triggers a bunch of (legistimate) Mypy errors not emitted
previously, mostly around mixing the os.PathLike generic and the
pathlib.Path concrete type. I fixed those as well.
@uranusjr
uranusjr force-pushed the dag-orm-refresh-refactor branch from 553ca26 to 4e5bf97 Compare June 21, 2023 07:20
@uranusjr
uranusjr merged commit 370ceb9 into apache:main Jun 26, 2023
@uranusjr
uranusjr deleted the dag-orm-refresh-refactor branch June 26, 2023 06:24
ferruzzi pushed a commit to aws-mwaa/upstream-to-airflow that referenced this pull request Jun 27, 2023
@ephraimbuddy ephraimbuddy added the type:improvement Changelog: Improvements label Jul 6, 2023
@ephraimbuddy ephraimbuddy added this to the Airflow 2.7.0 milestone Jul 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:Scheduler including HA (high availability) scheduler area:serialization type:improvement Changelog: Improvements

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants