Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Define pipelines programmatically in TypeScript via Deno #1187

Open
geekflyer opened this issue Jul 5, 2023 · 0 comments
Open

Define pipelines programmatically in TypeScript via Deno #1187

geekflyer opened this issue Jul 5, 2023 · 0 comments
Labels

Comments

@geekflyer
Copy link
Contributor

geekflyer commented 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?

@geekflyer geekflyer changed the title Define typescript programmatically in TypeScript via Deno Define pipelines programmatically in TypeScript via Deno Jul 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant