You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "ephraimbuddy (via GitHub)" <gi...@apache.org> on 2025/09/16 12:24:24 UTC

[PR] Do not require dag_version_id in workload TI model [airflow]

ephraimbuddy opened a new pull request, #55717:
URL: https://github.com/apache/airflow/pull/55717

   Older TIs won't have the dag_version_id, so we shouldn't require it in workload's TI model.
   
   closes: https://github.com/apache/airflow/issues/55713
   
   


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


Re: [PR] Do not require dag_version_id in workload TI model [airflow]

Posted by "ephraimbuddy (via GitHub)" <gi...@apache.org>.
ephraimbuddy commented on code in PR #55717:
URL: https://github.com/apache/airflow/pull/55717#discussion_r2356121128


##########
airflow-core/src/airflow/executors/workloads.py:
##########
@@ -55,7 +55,6 @@ class TaskInstance(BaseModel):
     """Schema for TaskInstance with minimal required fields needed for Executors and Task SDK."""
 
     id: uuid.UUID
-    dag_version_id: uuid.UUID

Review Comment:
   I will experiment with this by reproducing this with a running TI



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


Re: [PR] Do not require dag_version_id in workload TI model [airflow]

Posted by "ephraimbuddy (via GitHub)" <gi...@apache.org>.
ephraimbuddy commented on code in PR #55717:
URL: https://github.com/apache/airflow/pull/55717#discussion_r2356037551


##########
airflow-core/src/airflow/executors/workloads.py:
##########
@@ -55,7 +55,6 @@ class TaskInstance(BaseModel):
     """Schema for TaskInstance with minimal required fields needed for Executors and Task SDK."""
 
     id: uuid.UUID
-    dag_version_id: uuid.UUID

Review Comment:
   No. dag bundle backend checks out dag bundle version: https://github.com/apache/airflow/blob/9bc58a20e58a8b8eee9cf2fbe679f40172abc55d/airflow-core/src/airflow/models/dagbundle.py#L47



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


Re: [PR] Do not require dag_version_id in workload TI model [airflow]

Posted by "ephraimbuddy (via GitHub)" <gi...@apache.org>.
ephraimbuddy commented on code in PR #55717:
URL: https://github.com/apache/airflow/pull/55717#discussion_r2362642755


##########
airflow-core/src/airflow/executors/workloads.py:
##########
@@ -55,7 +55,6 @@ class TaskInstance(BaseModel):
     """Schema for TaskInstance with minimal required fields needed for Executors and Task SDK."""
 
     id: uuid.UUID
-    dag_version_id: uuid.UUID

Review Comment:
   Alternative to this that's less disruptive: https://github.com/apache/airflow/pull/55884



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


Re: [PR] Do not require dag_version_id in workload TI model [airflow]

Posted by "ephraimbuddy (via GitHub)" <gi...@apache.org>.
ephraimbuddy commented on PR #55717:
URL: https://github.com/apache/airflow/pull/55717#issuecomment-3450473628

   Closing as the alternative has been merged


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


Re: [PR] Do not require dag_version_id in workload TI model [airflow]

Posted by "ephraimbuddy (via GitHub)" <gi...@apache.org>.
ephraimbuddy commented on code in PR #55717:
URL: https://github.com/apache/airflow/pull/55717#discussion_r2356040052


##########
airflow-core/src/airflow/executors/workloads.py:
##########
@@ -55,7 +55,6 @@ class TaskInstance(BaseModel):
     """Schema for TaskInstance with minimal required fields needed for Executors and Task SDK."""
 
     id: uuid.UUID
-    dag_version_id: uuid.UUID

Review Comment:
   And it's more about the dagrun than task instance



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


Re: [PR] Do not require dag_version_id in workload TI model [airflow]

Posted by "ashb (via GitHub)" <gi...@apache.org>.
ashb commented on code in PR #55717:
URL: https://github.com/apache/airflow/pull/55717#discussion_r2356082968


##########
airflow-core/src/airflow/executors/workloads.py:
##########
@@ -55,7 +55,6 @@ class TaskInstance(BaseModel):
     """Schema for TaskInstance with minimal required fields needed for Executors and Task SDK."""
 
     id: uuid.UUID
-    dag_version_id: uuid.UUID

Review Comment:
   Still -- aren't "all" DagRuns in airflow 3 meant to have a version? What is the case by which we end up without a dag version but the task in the executor?



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


Re: [PR] Do not require dag_version_id in workload TI model [airflow]

Posted by "ashb (via GitHub)" <gi...@apache.org>.
ashb commented on code in PR #55717:
URL: https://github.com/apache/airflow/pull/55717#discussion_r2355469912


##########
airflow-core/src/airflow/executors/workloads.py:
##########
@@ -55,7 +55,6 @@ class TaskInstance(BaseModel):
     """Schema for TaskInstance with minimal required fields needed for Executors and Task SDK."""
 
     id: uuid.UUID
-    dag_version_id: uuid.UUID

Review Comment:
   How can we execute a TI without a dag version? For it to be executed, doesn't it have to still exist, and this get reparsed to include a dag version?



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


Re: [PR] Do not require dag_version_id in workload TI model [airflow]

Posted by "ephraimbuddy (via GitHub)" <gi...@apache.org>.
ephraimbuddy commented on code in PR #55717:
URL: https://github.com/apache/airflow/pull/55717#discussion_r2356028983


##########
airflow-core/src/airflow/executors/workloads.py:
##########
@@ -55,7 +55,6 @@ class TaskInstance(BaseModel):
     """Schema for TaskInstance with minimal required fields needed for Executors and Task SDK."""
 
     id: uuid.UUID
-    dag_version_id: uuid.UUID

Review Comment:
   We can execute a TI without a dag_version since the RuntimeTaskInstance model doesn't include the dag_version_id: https://github.com/apache/airflow/blob/9bc58a20e58a8b8eee9cf2fbe679f40172abc55d/task-sdk/src/airflow/sdk/execution_time/task_runner.py#L129. I hope my understanding is correct? Main purpose of the dag_version_id is for display not for execution



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


Re: [PR] Do not require dag_version_id in workload TI model [airflow]

Posted by "ashb (via GitHub)" <gi...@apache.org>.
ashb commented on code in PR #55717:
URL: https://github.com/apache/airflow/pull/55717#discussion_r2356032469


##########
airflow-core/src/airflow/executors/workloads.py:
##########
@@ -55,7 +55,6 @@ class TaskInstance(BaseModel):
     """Schema for TaskInstance with minimal required fields needed for Executors and Task SDK."""
 
     id: uuid.UUID
-    dag_version_id: uuid.UUID

Review Comment:
   Isn't that  dag_version_id the one that the (git, etc) dag bundle backend is told to checkout?



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


Re: [PR] Do not require dag_version_id in workload TI model [airflow]

Posted by "ashb (via GitHub)" <gi...@apache.org>.
ashb commented on code in PR #55717:
URL: https://github.com/apache/airflow/pull/55717#discussion_r2356035440


##########
airflow-core/src/airflow/executors/workloads.py:
##########
@@ -55,7 +55,6 @@ class TaskInstance(BaseModel):
     """Schema for TaskInstance with minimal required fields needed for Executors and Task SDK."""
 
     id: uuid.UUID
-    dag_version_id: uuid.UUID

Review Comment:
   Ah no, bundle_info is what the dag bundle info is.
   
   I still wonder how it's actually possible to get to an executor with no dag_version set?



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


Re: [PR] Do not require dag_version_id in workload TI model [airflow]

Posted by "ephraimbuddy (via GitHub)" <gi...@apache.org>.
ephraimbuddy commented on PR #55717:
URL: https://github.com/apache/airflow/pull/55717#issuecomment-3300471530

   > Looks like API spec needs some updating, also should we have some tests added or at least updated to test this edgecase?
   
   Thanks, updated


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


Re: [PR] Do not require dag_version_id in workload TI model [airflow]

Posted by "ephraimbuddy (via GitHub)" <gi...@apache.org>.
ephraimbuddy closed pull request #55717: Do not require dag_version_id in workload TI model
URL: https://github.com/apache/airflow/pull/55717


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