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

   ### Under which category would you file this issue?
   
   Airflow Core
   
   ### Apache Airflow version
   
   3.3.0rc1
   
   ### What happened and how to reproduce it?
   
   Use the dag below:
   
   ```python
   from airflow.sdk import DAG
   from airflow.decorators import task
   from airflow.providers.standard.operators.empty import EmptyOperator
   from airflow.utils.task_group import TaskGroup
   from datetime import datetime
   from dataclasses import dataclass
   from dataclasses_json import dataclass_json
   from random import seed, randint
   
   
   # I've seen, but been unable to recreate, a bug were data in a dataclass was 
getting truncated part way through a string
   # so lets make some string data and see if any of it gets lost
   @dataclass_json
   @dataclass
   class Payload:
   
       seed: int
       a: str
       b: str
       c: str
       d: str
   
       def make(i):
           return Payload(
               seed=i, a=str(i) * 5, b=str(i) * 10, c=str(i) * 15, d=str(i) * 20
           )
   
       def transform(self):
           self.a = str(int(int(self.a) / 5))
           self.b = str(int(int(self.a) / 10))
           self.c = str(int(int(self.a) / 15))
           self.d = str(int(int(self.a) / 20))
   
   
   @task
   def mk_payloads(i):
       return [Payload.make(j).to_dict() for j in range(1, i)]
   
   
   @task
   def transform(_payload):
       payload = Payload.from_dict(_payload)
       payload.transform()
       return payload.to_dict()
   
   
   @task
   def check_transformed(_payload):
       payload: Payload = Payload.from_dict(_payload)
       orig = Payload.make(payload.seed)
       orig.transform()
   
       # same transformation made to same data
       # results should be same, otherwise something got lost along the way
       assert orig == payload
   
   
   minmax_map_indices_per_lane = (5, 60)
   lanes = 10
   
   
   with DAG(
       dag_id="many_expand", schedule=None, start_date=datetime(1970, 1, 1), 
catchup=False,tags=["taskmap"]
   ) as dag:
   
       seed(42)  # be deterministic
   
       for i in range(lanes):
           with TaskGroup(group_id=f"lane{i+1}"):
               min_map, max_map = minmax_map_indices_per_lane
               mapped = randint(min_map, max_map)
               check_transformed.expand(
                   _payload=transform.expand(_payload=mk_payloads(mapped))
               )
   
   ``` 
   
   
https://github.com/user-attachments/assets/f18ccc65-1d5b-4a99-a5d2-736727c10a76
   
   ### What you think should happen instead?
   
   _No response_
   
   ### Operating System
   
   Linux
   
   ### Deployment
   
   None
   
   ### Apache Airflow Provider(s)
   
   _No response_
   
   ### Versions of Apache Airflow Providers
   
   _No response_
   
   ### Official Helm Chart version
   
   Not Applicable
   
   ### Kubernetes Version
   
   _No response_
   
   ### Helm Chart configuration
   
   _No response_
   
   ### Docker Image customizations
   
   _No response_
   
   ### 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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to