You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, we can all agree that YAML at scale sucks.
Unfortunately Cirrus-CI with Starlark isn't that great either. There's no type system, code completion is bad. Not clear how to code navigate across load("some/module/somewhere-else") or how to run the main function locally. I often find myself doing repetitive try-and-error to figure out what parameters are valid in which context - especially when using Cirrus' Starlark pipelines, whose docs are rather sparse unfortunately.
I thought about this for a while - can we use TypeScript to define pipelines? I think it's great because of its static type system, IDE support and its similarity and compatibility with json and yaml.
One complaint people have about TypeScript is the effort to manage dependencies and the fact that arbitrary code execution can lead to strange and unsafe situations.
Now I came to believe that Deno.js solves this somewhat, by being able to constrain the runtime permissions and by making dependencies auto-installable+cacheable when running the code. It also has built-in TypeScript compilation.
Overall it's pretty nice to use it in constrained environments and Edge deployments.
Can we consider introducing Deno.js/TypeScript as a way to define Cirrus pipelines?
I know this is a big feature request, but I think it would greatly enhance the DX on defining complex pipelines in cirrus-ci.
Not sure how popular the starlark pipelines are, but maybe this could also replace the mid-term?
The text was updated successfully, but these errors were encountered:
geekflyer
changed the title
Define typescript programmatically in TypeScript via Deno
Define pipelines programmatically in TypeScript via Deno
Jul 5, 2023
Description
Hi, we can all agree that YAML at scale sucks.
Unfortunately Cirrus-CI with Starlark isn't that great either. There's no type system, code completion is bad. Not clear how to code navigate across
load("some/module/somewhere-else")
or how to run the main function locally. I often find myself doing repetitive try-and-error to figure out what parameters are valid in which context - especially when using Cirrus' Starlark pipelines, whose docs are rather sparse unfortunately.I thought about this for a while - can we use TypeScript to define pipelines? I think it's great because of its static type system, IDE support and its similarity and compatibility with json and yaml.
One complaint people have about TypeScript is the effort to manage dependencies and the fact that arbitrary code execution can lead to strange and unsafe situations.
Now I came to believe that Deno.js solves this somewhat, by being able to constrain the runtime permissions and by making dependencies auto-installable+cacheable when running the code. It also has built-in TypeScript compilation.
Overall it's pretty nice to use it in constrained environments and Edge deployments.
There are other projects - namely https://cicada.build/ (I know it's young, but the idea is neat) which embrace this. Slack's next-gen platform is using Deno to extend slack via functions deployed https://api.slack.com/start/overview#next-gen-platform. Supabase uses it for Edge functions.
TLDR
Can we consider introducing Deno.js/TypeScript as a way to define Cirrus pipelines?
I know this is a big feature request, but I think it would greatly enhance the DX on defining complex pipelines in cirrus-ci.
Not sure how popular the starlark pipelines are, but maybe this could also replace the mid-term?
The text was updated successfully, but these errors were encountered: