You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2022/08/09 07:17:24 UTC

[GitHub] [airflow] MatrixManAtYrService opened a new issue, #25616: grid view: first mapped task logs link points to map index: -1, should point to 0

MatrixManAtYrService opened a new issue, #25616:
URL: https://github.com/apache/airflow/issues/25616

   ### Apache Airflow version
   
   main (development)
   
   ### What happened
   
   Any mapped task will do, but here's a DAG with two:
   
   ```python3
   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](https://user-images.githubusercontent.com/5834582/183587689-2487d3b2-85ea-4b23-89f2-7dacbeebb895.png)
   
   
   ### 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
   
   - [X] I agree to follow this project's [Code of Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [airflow] bbovenzi closed issue #25616: grid view: first mapped task logs link points to map index: -1, should point to 0

Posted by GitBox <gi...@apache.org>.
bbovenzi closed issue #25616: grid view: first mapped task logs link points to map index: -1, should point to 0
URL: https://github.com/apache/airflow/issues/25616


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [airflow] bbovenzi commented on issue #25616: grid view: first mapped task logs link points to map index: -1, should point to 0

Posted by GitBox <gi...@apache.org>.
bbovenzi commented on issue #25616:
URL: https://github.com/apache/airflow/issues/25616#issuecomment-1209435755

   Good catch. We're about to update mapped task logs in https://github.com/apache/airflow/pull/25610. We can fix it as part of that.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [airflow] pierrejeambrun commented on issue #25616: grid view: first mapped task logs link points to map index: -1, should point to 0

Posted by GitBox <gi...@apache.org>.
pierrejeambrun commented on issue #25616:
URL: https://github.com/apache/airflow/issues/25616#issuecomment-1209525779

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


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org