concourse icon indicating copy to clipboard operation
concourse copied to clipboard

Feature request: opaque key in pipeline YAML (user-provided data)

Open marco-m-pix4d opened this issue 2 years ago • 0 comments

Today, although it is possible to add any key non belonging to the Concourse pipeline syntax to a pipeline YAML (for example for YAML anchors), fly set-pipeline will strip any such keys before uploading to Concourse.

What we propose is to agree on one top-level key name (example: userdata), that would be left alone by fly and accepted as an opaque blob by Concourse, so that a subsequent fly get-pipeline (or equivalent HTTP API call) would give back a pipeline YAML that preserves such key.

Rationale

We generate the pipelines programmatically. We would like to add metadata meaningful to us, such as Organization team name (as opposed to a Concourse team), so that we can perform further operations when processing the output of fly get-pipeline.

We believe that such userdata could be useful also for manually edited pipelines, although the more pipelines one has, the more the need of such feature becomes apparent.

Prior art

The concept of opaque "user data" or "context" is used both in operations (for example, cloud-init and its "user data") and in programming (for example the "context" passed to a callback function).

Offer to help

If this feature is consider useful, we will be happy to provide a PR.

marco-m-pix4d avatar Jun 15 '22 09:06 marco-m-pix4d