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

Tidy up JGF match writer support #520

Merged
merged 7 commits into from
Oct 2, 2019
Merged

Commits on Oct 2, 2019

  1. resource: Use correct typedefs

    Change the use of ggv_t to vtx_t. ggv_t is the data type of
    a vertex of a graph generation recipe graph whereas vxt_t
    is the data type of a vertex of the actual resource graph.
    
    Found a few sites where ggv_t type is used when vtx_t
    should have been used during a code review and fix them.
    dongahn committed Oct 2, 2019
    Configuration menu
    Copy the full SHA
    3d6ee5f View commit details
    Browse the repository at this point in the history
  2. writer: Drop pretty print support for JSON based writers

    Problem: It is becoming difficult to maintain two difference
    versions (pretty vs. unpretty) of writers of the same type.
    Further the value of the pretty versions is marginal as the
    output from a unpretty writer can easily be made
    human readable by piping to the jq command.
    
    Drop the pretty writer support for JSON-based writers.
    
    Adjust testing coverage accordingly.
    
    Will consider to add back this support when we convert
    our JSON writers to use either the Jansson library
    or its C++ equivalent.
    
    If and when this is revived, the implementation should be added
    such that pretty writers will be supported without
    having to introduce their own classses that contain
    duplicate codes with unpretty versions.
    dongahn committed Oct 2, 2019
    Configuration menu
    Copy the full SHA
    df94fdb View commit details
    Browse the repository at this point in the history
  3. writer: Bug fix to dectect unmatch cases correctly

    Correctly detect the unmatch case to write nothing.
    
    Wasn't taking into account a new-line character
    in detecting unmatch cases, and as a result these
    writers were writing header information (e.g.,
    version key and execution key) with no match data!
    dongahn committed Oct 2, 2019
    Configuration menu
    Copy the full SHA
    879b26e View commit details
    Browse the repository at this point in the history
  4. writer: Use uniq_id as the JGF vertex id

    Problem: the old scheme uses the resource graph's
    vertex index to denote the unique id for
    each JGF vertex. As the resource graph's vertex
    index is the same as uniq_id at the top
    level Flux instance, this has not been a problem.
    It is "generated" from the graph's vertex index.
    However, this will become a problem to support
    general cases. For example, at a nested Flux instance,
    uniq_id will be "given" by the JGF object
    from its parent, the resource graph's vertex index
    and uniq_id will differ.
    Similarly, if an JGF object is constructed
    either manually or by Kubernetes, the same
    problem will occur.
    
    Use uniq_id as the JGF node id to generalize
    our JGF writer support.
    dongahn committed Oct 2, 2019
    Configuration menu
    Copy the full SHA
    a924412 View commit details
    Browse the repository at this point in the history
  5. writer: JGF writer now emits paths for each vertex

    Problem: The paths field was previously omited
    with a hope that the paths can be reconstructed
    by the future JGF reader.
    But it appears that this would require lots of code
    at the reader side and would be inefficient regardless.
    
    Modify the JGF writer code to emit the paths of each
    graph vertex within each subsystem.
    (Doing this in the writer side is simpler
    at the expense of using more memory/storage).
    
    Will consider JGF schema compression as part of
    future optimization phase.
    dongahn committed Oct 2, 2019
    Configuration menu
    Copy the full SHA
    1788052 View commit details
    Browse the repository at this point in the history
  6. writer: avoid condense encoding of edge relationship

    Problem: The old scheme is to concatenate the edge's
    relationship information with respect to each subsystem
    using some delimiters. While this is condense, this
    can lead to unnecessary complexity in the future
    JGF reader code.
    
    Emit the relationship information for each subsystem
    that the edge represents as a unique sub-key within
    the name key.
    dongahn committed Oct 2, 2019
    Configuration menu
    Copy the full SHA
    a8495e5 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    03f95cc View commit details
    Browse the repository at this point in the history