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

grid view: first mapped task logs link points to map index: -1, should point to 0 #25616

Closed
1 of 2 tasks
MatrixManAtYrService opened this issue Aug 9, 2022 · 2 comments · Fixed by #25610
Closed
1 of 2 tasks
Assignees
Labels
affected_version:main_branch Issues Reported for main branch area:UI Related to UI/UX. For Frontend Developers. kind:bug This is a clearly a bug

Comments

@MatrixManAtYrService
Copy link
Contributor

Apache Airflow version

main (development)

What happened

Any mapped task will do, but here's a DAG with two:

with DAG(
    dag_id="zip_tf",
    schedule_interval=timedelta(days=30 * 365),
    start_date=datetime(1970, 1, 1),
) as zip_tf:

    @task
    def get_template():
        return ["hello {}", "goodbye {}"]

    @task
    def get_user():
        return ["foo", "bar"]

    @task
    def salutations(arg):
        print(arg[0].format(arg[1]))

    combined = get_template().zip(get_user())
    salutations.expand(arg=combined)

If you run it and navigate to the graph view, you can view the logs for both mapped tasks ("hello foo" and "goodbye bar"). But if you try to do the same thing via the grid view, you can only view the second one ("goodbye bar"). This is because the link to view the first one's logs is pointing to:

http://localhost:8080/log?dag_id=zip_tf&dag_id=zip_tf&task_id=salutations&execution_date=1970-01-01T00%3A00%3A00%2B00%3A00&map_index=-1

But -1 is used for when there are no mapped tasks, not for the first one. So when you follow the link, you don't see any logs at all.

neg

What you think should happen instead

the correct logs should appear

How to reproduce

see above

Operating System

NixOS (linux)

Versions of Apache Airflow Providers

n/a

Deployment

Virtualenv installation

Deployment details

LocalExecutor

Anything else

No response

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

@MatrixManAtYrService MatrixManAtYrService added area:core kind:bug This is a clearly a bug labels Aug 9, 2022
@uranusjr uranusjr added area:UI Related to UI/UX. For Frontend Developers. and removed area:core labels Aug 9, 2022
@bbovenzi
Copy link
Contributor

bbovenzi commented Aug 9, 2022

Good catch. We're about to update mapped task logs in #25610. We can fix it as part of that.

@pierrejeambrun
Copy link
Member

pierrejeambrun commented Aug 9, 2022

Thanks for reporting the bug. I think it had something to do with 0 beeing falsy. It is handled in #25610

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affected_version:main_branch Issues Reported for main branch area:UI Related to UI/UX. For Frontend Developers. kind:bug This is a clearly a bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants