Juwon-Ogunseye commented on issue #73861:
URL: https://github.com/apache/airflow/issues/73861#issuecomment-5879911077

   Here's my proposed approach, which keeps #67657 fixed:
   
   When the Dag hash is unchanged but the bundle moved to a new commit, 
`write_dag` currently updates the latest `DagVersion.bundle_version` in place, 
even if that version already has task instances.
   
   `write_dag` already has a rule for the changed-hash case: update the latest 
version in place only if it has no task instances, otherwise create a new 
`DagVersion`. I'd apply the same rule to the unchanged-hash case:
   
   - No task instances on the latest version → refresh `bundle_version` in 
place (same as today).
   - Task instances exist → create a new `DagVersion` for the new commit.
   
   This way:
   - #67657 stays fixed, since new tasks still resolve the new commit.
   - Versions that already ran keep their commit, so old runs show the right 
commit and triggering at that commit works.
   
   Trade-off: #68336 intentionally avoided new versions on commit-only changes. 
With this approach, a new version is only created for a commit that follows a 
run of the current version, not on every commit.
   
   Does this direction sound OK? If so, I'll open a PR with tests covering both 
cases. @potiuk 


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