Replies: 2 comments 6 replies
-
|
Oh yes, I am familiar with this pain. I have spent a little bit of time exploring this problem space and played around with Cue for a while to see if there was something there. I haven't heard of Pkl before your post here, but it seems great as well and possibly a better choice over Cue at least in the features department. The language bindings are great to have! The package support level is what I had in mind when I was playing with Cue. Though given the language bindings with Pkl, I think you're right that it wouldn't be too hard to add support in the The native level of support is probably too much effort. It's unclear to me what the project or end users would gain if we did the work for native support that we don't also get with the prior options. Maybe I'm not thinking creatively enough here? So yes, this idea really excites me because OMG 1000+ line YAML files suck so much. I'd like more discussion on the configuration language we should support. Pkl seems great, but I really don't know any of the other languages in this space. Dhall seems similar and has language bindings as well: https://dhall-lang.org/ I'm curious to know how your org settled on Pkl? What other options were considered?
Appreciate you clearly stating this. I really want something like what you're proposing, but TIME and PRIORITIES are limited 😅 I'm happy to help shepherd us to a solution as project maintainer. Other thought I had, it would be nice if Pkl or any of these config languages had a |
Beta Was this translation helpful? Give feedback.
-
In my head, I saw Concourse doing the Pkl transformation on the server side, and storing the Pkl that was submitted. That way it could provide direct Pkl-to-Pkl diffs, and it could remove the mental translation from Pkl to YAML and back when comparing and fixing diffs. Also, the Pkl bindings require that the Pkl binary be available in I agree it comes with additional complexity, though. Least of all from one Pkl file being able to import another: it'd need to accept an archive of the files involved, in their relative paths. Pkl can also pull packages from the internet, so there would need to be consideration for installations which don't allow internet egress too.
We've just been through a discovery process for a new language to do all sorts of previously YAML-based config in - not just Concourse. We evaluated each of these with some slightly woolly criteria like standard library support, IDE support, and third-party package libraries. Of those, we decided to try out KCL, Pkl, and Go. KCL was like a less mature, less featured rich version of Pkl, and the amount of effort required to do it well in Go made us worry about how different the implementations could end up being - plus the additional language version and dependency maintenance burden. We chose Pkl because we tried it and liked it, and we knew another team was already using it successfully. To quote our internal ADR on Cue: I can quote it for the other ones too if you need.
I agree it would be nice. I'd be surprised if any of them did (and I know Pkl doesn't), because the question quickly becomes "how? what should the code look like?" If Concourse had an official Pkl library with strong opinions, it feels feasible to write something that converts the YAML pipelines to Pkl. At least as a starting point for teams. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi @taylorsilva
As I'm sure you've experienced, and heard from users often enough, writing and maintaining YAML for big pipelines isn't a great experience, especially when they can grow to be thousands of lines long. Would you be interested in supporting a second way of declaring pipelines, namely Pkl?
Pkl is a configuration language built, supported, and used by Apple. To quote its own website, Pkl aims to be "configuration that is Programmable, Scalable, and Safe". It's also uses the same license as Concourse (Apache 2.0).
The team behind GOV.UK Pay, a payments service inside the UK government, is already using Pkl to define Concourse pipelines, and the teams behind https://gov.uk/ will begin doing the same in the near future. There is also interest in using Pkl for this purpose from other teams in the organization.
How does it work for Pkl users today?
The teams using Pkl for Concourse pipelines today have built out a Pkl module that matches the Concourse pipeline YAML structure, and published it under the MIT license. They extend and use that module to generate full pipelines, and have Pkl serialize them as YAML which is passed to Concourse.
They've done all of this without the support of the Concourse project, and can of course continue to do so quite happily.
What's the opportunity?
There's general dissatisfaction with YAML across the industry, especially when it grows to a large number of lines (citation needed; it's a bit hard to evidence this, but I'm trusting you've experienced it too).
I think by adding native support for Pkl, there are a number of potential benefits for Concourse:
What levels of support could there be?
Concourse could support Pkl at a few different levels. It doesn't need to be all or nothing.
Package support
Concourse could produce and maintain its own Pkl package, with useful helpers, good documentation etc. Users of the package can generate YAML from Pkl themselves and pass it to
flyflysupportPkl has Go bindings which
flycan use to turn Pkl configuration into YAML itself. I've done just this in a proof of concept branch. It's a reasonably small change toflyin all. If you were to support Pkl at this level, publishing an official package would be a sensible move too.Native support
Pkl's Go bindings also allow it to read Pkl code and create Go structs. Concourse could fully support Pkl an equal sibling of YAML in ATC, with diffs for Pkl in the same way it has for YAML. If you were to support Pkl at this level, publishing an official package would be a sensible move too.
Support offered
It would obviously be quite rude to ask you if you're interested in supporting this and then ask you to build it! I'd be very happy to work on this as an individual (I'm not raising this on behalf of my org, just citing our uses)
Beta Was this translation helpful? Give feedback.
All reactions