Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure consistent Seriailized DAG hashing #42517

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Commits on Sep 26, 2024

  1. Ensure consistent Seriailized DAG hashing

    The serialized DAG dictionary is not ordered correctly when creating hashes, and that causes inconsistent hashes, leading to
    frequent update of the serialized DAG table.
    
    Changes:
    
    Implemented sorting for serialized DAG dictionaries and nested structures to ensure consistent and predictable serialization order for hashing. Using `sort_keys` in `json.dumps` is not enough to sort the nested structures in the serialized DAG.
    
    Added serialize and deserialize methods for DagParam and ArgNotSet to allow for more structured serialization.
    
    Updated serialize_template_field to handle objects that implement the serialize method. This was done because of DagParam and ArgNotSet in the template fields. Previously, it produced an object, but with this change, it now serialises to a consistent object.
    ephraimbuddy committed Sep 26, 2024
    Configuration menu
    Copy the full SHA
    f8e6bac View commit details
    Browse the repository at this point in the history
  2. Move hashing to a method

    ephraimbuddy committed Sep 26, 2024
    Configuration menu
    Copy the full SHA
    5899bb3 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    59dcdef View commit details
    Browse the repository at this point in the history