cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

Designer: Pretty JSON when exporting pipelines to assist with external version control systems

omair
Contributor

Use-case: I would like to use version control to store my pipeline assets. Organizational restrictions prevent the use of Github for version control. Right now the dev process is to export pipelines from designer and commit them to version control (Mercurial).

The Designer pipeline export operation, minifies the pipeline JSON to a single line. This makes it impossible to do any diff comparisons or review pipeline changes within a diffing tool.

Feature request: Pretty print JSON when exporting a pipeline from Designer:

image

1 REPLY 1

ForbinCSD
Contributor

I second this request!

And I think what he means by โ€œpretty printingโ€ is not so much โ€œformat it nicelyโ€ as it is a request that there be an option to export the pipelines in a JSON format with frequent line breaks, and with each JSON property or element sorted in some canonical order.

I do realize thatโ€™s far more complicated in practice than it is in theory!

It will probably take quite a bit of experimentation to determine what that โ€œcanonical orderโ€ ought to be.
I am guessing a good starting place is to sort multiple pipelines by their names in alphanumeric order; snaps within the pipeline might be output in the order they occur. Multiple entry or exit points might have to be arbitrarily sorted by their origin point on the GUI canvas (left to right and top to bottom), or another scheme may need to be developed. Branches and merges within a pipeline will obviously be particularly tricky.

The goal is that I should be able to run something like a Linux diff tool (or a comparison tool like BeyondCompare) on โ€œbeforeโ€ and โ€œafterโ€ exports. What I should see is not some confusing mismash of differences due to arbitrary (and changeable) JSON ordering (which is what happens currently). I should instead see only the actual changes I made: a couple of additions and deletions of fields to a mapper snap here, a couple of other snaps added there, and a whole set of snaps replaced by a child pipeline execution somewhere else. Hopefully you get the picture.

Again, I realize this is far more easily said, than done.

But itโ€™s a feature that will have a huge payoff for anyone who is self-hosting a revision control system like Mercurial, Git, or Subversion.