Skip to content

Conversation

@github-actions
Copy link

@github-actions github-actions bot commented Dec 7, 2025

Dags using operators with dictionary values in template_fields (such as
env_vars) were getting different hashes on each parse, even when the
actual dictionary content was unchanged. This happened because
serialize_template_field converts dictionaries to string
using str(), which preserves insertion order. When dictionary ordering
varies between parses (e.g., when env_vars comes from os.environ.copy()),
the string representation differs, causing inconsistent hashing.

Prevents unnecessary Dag updates and reprocessing when only dictionary
ordering differs in template fields.
(cherry picked from commit d46a9d1)

Co-authored-by: Ephraim Anierobi splendidzigy24@gmail.com

…unordered dicts (#59091)

Dags using operators with dictionary values in template_fields (such as
env_vars) were getting different hashes on each parse, even when the
actual dictionary content was unchanged. This happened because
serialize_template_field converts dictionaries to string
using str(), which preserves insertion order. When dictionary ordering
varies between parses (e.g., when env_vars comes from os.environ.copy()),
the string representation differs, causing inconsistent hashing.

Prevents unnecessary Dag updates and reprocessing when only dictionary
ordering differs in template fields.
(cherry picked from commit d46a9d1)

Co-authored-by: Ephraim Anierobi <splendidzigy24@gmail.com>
@potiuk potiuk marked this pull request as ready for review December 7, 2025 21:11
@potiuk potiuk merged commit cacd138 into v3-1-test Dec 7, 2025
4 checks passed
@potiuk potiuk deleted the backport-d46a9d1-v3-1-test branch December 7, 2025 21:11
ephraimbuddy added a commit that referenced this pull request Dec 8, 2025
…unordered dicts (#59091) (#59175)

Dags using operators with dictionary values in template_fields (such as
env_vars) were getting different hashes on each parse, even when the
actual dictionary content was unchanged. This happened because
serialize_template_field converts dictionaries to string
using str(), which preserves insertion order. When dictionary ordering
varies between parses (e.g., when env_vars comes from os.environ.copy()),
the string representation differs, causing inconsistent hashing.

Prevents unnecessary Dag updates and reprocessing when only dictionary
ordering differs in template fields.
(cherry picked from commit d46a9d1)

Co-authored-by: Ephraim Anierobi <splendidzigy24@gmail.com>
ephraimbuddy added a commit that referenced this pull request Dec 8, 2025
…unordered dicts (#59091) (#59175)

Dags using operators with dictionary values in template_fields (such as
env_vars) were getting different hashes on each parse, even when the
actual dictionary content was unchanged. This happened because
serialize_template_field converts dictionaries to string
using str(), which preserves insertion order. When dictionary ordering
varies between parses (e.g., when env_vars comes from os.environ.copy()),
the string representation differs, causing inconsistent hashing.

Prevents unnecessary Dag updates and reprocessing when only dictionary
ordering differs in template fields.
(cherry picked from commit d46a9d1)

Co-authored-by: Ephraim Anierobi <splendidzigy24@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants