kurtosis-tech / kurtosis

A platform for packaging and launching ephemeral backend stacks with a focus on approachability for the average developer.
https://docs.kurtosistech.com/
Apache License 2.0
375 stars 53 forks source link

Provide `plan` syntactic sugar for processing YAML/JSON #1886

Open mieubrisse opened 11 months ago

mieubrisse commented 11 months ago

Background & motivation

Quite frequently, folks will need to do jq-like things on JSON or YAML output from a result of one of their run_sh steps. It would be a very nice convenience if we had a plan step that helped users do the extraction (without them needing to coordinate files artifact-mounting and everything themselves.

Desired behaviour

There is a plan step for extracting values from JSON/YAML. Bonus points if it can return a Starlark dict/struct object that has the keys the user expects.

How important is this to you?

Painful; the lack of this feature makes using Kurtosis frictionful.

What area of the product does this pertain to?

Other: anything not covered by the above

mieubrisse commented 11 months ago

Did a v0 of design here: https://www.notion.so/kurtosistech/YAML-Processing-Plan-Steps-8744a128765c4045a78402a1b752adf1?pvs=4