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/05/06 21:42:13 UTC

[GitHub] [airflow] fritz-astronomer opened a new issue, #23550: Dynamic Task Mapping is Immutable within a Run

fritz-astronomer opened a new issue, #23550:
URL: https://github.com/apache/airflow/issues/23550

   ### Apache Airflow version
   
   2.3.0 (latest released)
   
   ### What happened
   
   Looks like mapped tasks are immutable, even when the source XCOM that created them changes. 
   
   This is a problem for things like Late Arriving Data and Data Reprocessing
   
   ### What you think should happen instead
   
   Mapped tasks should change in response to a change of input
   
   ### How to reproduce
   
   Here is a writeup and MVP DAG demonstrating the issue
   https://gist.github.com/fritz-astronomer/d159d0e29d57458af5b95c0f253a3361
   
   ### Operating System
   
   docker/debian
   
   ### Versions of Apache Airflow Providers
   
   _No response_
   
   ### Deployment
   
   Astronomer
   
   ### Deployment details
   
   _No response_
   
   ### Anything else
   
   Can look into a fix - but may not be able to submit a full PR
   
   ### 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] uranusjr commented on issue #23550: Dynamic Task Mapping is Immutable within a Run

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

   Ah OK, that makes sense. So I guess we “just” need to fix the REMOVED logic.


-- 
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] ephraimbuddy commented on issue #23550: Dynamic Task Mapping is Immutable within a Run

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

   > Ah OK, that makes sense. So I guess we “just” need to fix the REMOVED logic.
   
   I think fixing that would work if the dag file is edited. For a dynamically generated mapping args as in the issue, it won't get to the code because the dag_run.dag_hash would still match the latest serialized dag hash, right? https://github.com/apache/airflow/blob/7277122ae62305de19ceef33607f09cf030a3cd4/airflow/jobs/scheduler_job.py#L1188
   
   
   


-- 
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] ephraimbuddy commented on issue #23550: Dynamic Task Mapping is Immutable within a Run

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

   Just to mention that this works:
   ```python
   
       xarg = pull_messages()
   
       op = DatabricksRunNowOperator.partial(
           task_id = "new_job",
           job_id=42,
           notebook_params={"dry-run": "true"},
           python_params=["douglas adams", "42"],
           spark_submit_params=["--class", "org.apache.spark.examples.SparkPi"],
       ).expand(jar_params= xarg)
   ```


-- 
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] ephraimbuddy commented on issue #23550: Dynamic Task Mapping is Immutable within a Run

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

   > That’s interesting… I would assume it does not. Both examples go through XCom, and both should go through the same code path.
   
   I commented on the wrong post...the comment was meant for https://github.com/apache/airflow/issues/23642 and it's not working there as well...not thinking well today!


-- 
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] ephraimbuddy closed issue #23550: Dynamic Task Mapping is Immutable within a Run

Posted by GitBox <gi...@apache.org>.
ephraimbuddy closed issue #23550: Dynamic Task Mapping is Immutable within a Run
URL: https://github.com/apache/airflow/issues/23550


-- 
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] uranusjr commented on issue #23550: Dynamic Task Mapping is Immutable within a Run

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

   > Just to mention that this works
   
   That’s interesting… I would assume it does not. Both examples go through XCom, and both should go through the same code path.
   
   Regarding to the bug, I do currently have logic to mark existing expanded tasks as REMOVED if they are superfluous. Maybe that’s not working as intended.


-- 
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] ephraimbuddy commented on issue #23550: Dynamic Task Mapping is Immutable within a Run

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

   > That’s interesting… I would assume it does not. Both examples go through XCom, and both should go through the same code path.
   
   On trying it again, it failed....could be that I switched to pythonoperator without knowing. 


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