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 wrong parameter for drawDagStatsForDag() in dags.html #13884

Merged
merged 1 commit into from
Jan 25, 2021

Conversation

XD-DENG
Copy link
Member

@XD-DENG XD-DENG commented Jan 24, 2021

I believe this is a typo. It should be states rather than stats.

Please refer to

and the signature of similar function drawTaskStatsForDag()

function drawTaskStatsForDag(dag_id, states) {

So far this is not causing any visible error/issue because of how scoping works in JavaScript.


^ 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.

@XD-DENG XD-DENG added the area:UI Related to UI/UX. For Frontend Developers. label Jan 24, 2021
@XD-DENG XD-DENG added this to the Airflow 2.0.1 milestone Jan 24, 2021
@boring-cyborg boring-cyborg bot added the area:webserver Webserver related Issues label Jan 24, 2021
@XD-DENG XD-DENG removed the area:webserver Webserver related Issues label Jan 24, 2021
@kaxil
Copy link
Member

kaxil commented Jan 25, 2021

cc @ryanahamilton

@ryanahamilton
Copy link
Contributor

This is certainly a typo. With and without the fix, I see no issues in the browser. Would take a bit more effort to determine if/why it is necessary to be there at all.

@XD-DENG
Copy link
Member Author

XD-DENG commented Jan 25, 2021

This is certainly a typo. With and without the fix, I see no issues in the browser. Would take a bit more effort to determine if/why it is necessary to be there at all.

Hi @ryanahamilton , yes you are right, there will be no issue without this fix. Because of the typo, this parameter is not useful/helpful at all. When .data(states) is called, it cannot find states in its current block, so it goes one level up, and states is available there

function dagStatsHandler(error, json) {
for(var dag_id in json) {
states = json[dag_id];
drawDagStatsForDag(dag_id, states);

This may become a potential source of error/confusion though in the future, so fixing it.

@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 Jan 25, 2021
@github-actions
Copy link

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 master or amend the last commit of the PR, and push it with --force-with-lease.

@XD-DENG XD-DENG merged commit 477a222 into apache:master Jan 25, 2021
@XD-DENG XD-DENG deleted the fix-js-function branch January 25, 2021 14:24
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. 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.

3 participants