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

Fix blank dag dependencies view #17990

Merged
merged 2 commits into from
Sep 2, 2021

Conversation

bbovenzi
Copy link
Contributor

@bbovenzi bbovenzi commented Sep 2, 2021

When there is an issue with the scheduler max_last_updated may be older than last_refresh and therefore calculate_graph was never being called leaving the nodes and edges to be blank. Removing it allows us to calculate the nodes and edges even in that circumstance.

Update: I added a check to calculate the graph when there isn't already node or edge data.

Bonus: Make the last_refresh change with the app's timezone like all other dates.

Closes #16610


^ Add meaningful description above

Read the Pull Request Guidelines for more information.
In case of fundamental code change, Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in UPDATING.md.

@boring-cyborg boring-cyborg bot added area:UI Related to UI/UX. For Frontend Developers. area:webserver Webserver related Issues labels Sep 2, 2021
@bbovenzi bbovenzi requested a review from uranusjr September 2, 2021 13:54
@bbovenzi
Copy link
Contributor Author

bbovenzi commented Sep 2, 2021

P.S If this makes sense then we probably should remove the class method SerializedDAG.get_max_last_updated_datetime entirely. And I'm not sure if we should even bother with the last_refresh logic since I'm not sure when we would want to return empty data instead of trying to calculate the graph.

@ashb
Copy link
Member

ashb commented Sep 2, 2021

I would guess that the thinking here is that "if none of the serialized dags have changed, then there is no point recalculating the graph"

@bbovenzi
Copy link
Contributor Author

bbovenzi commented Sep 2, 2021

CC: @ms32035

@bbovenzi
Copy link
Contributor Author

bbovenzi commented Sep 2, 2021

Ok. Instead, I updated to calculate the graph when there isn't already node or edge data.

@github-actions github-actions bot added the okay to merge It's ok to merge this PR as it does not require more tests label Sep 2, 2021
@github-actions
Copy link

github-actions bot commented Sep 2, 2021

The PR is likely OK to be merged with just subset of tests for default Python and Database versions without running the full matrix of tests, because it does not modify the core of Airflow. If the committers decide that the full tests matrix is needed, they will add the label 'full tests needed'. Then you should rebase to the latest main or amend the last commit of the PR, and push it with --force-with-lease.

@bbovenzi bbovenzi merged commit f727635 into apache:main Sep 2, 2021
@bbovenzi bbovenzi deleted the fix-dag-dependencies-display branch September 2, 2021 21:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:UI Related to UI/UX. For Frontend Developers. area:webserver Webserver related Issues okay to merge It's ok to merge this PR as it does not require more tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Dag Dependency page not showing anything
2 participants