Skip to content

Commit

Permalink
First class dagger shell (#1947)
Browse files Browse the repository at this point in the history
* One interface extends other

* Streamline module

* Retro-fit to serializer refactor

* Break out Dagger

* Conform

* Use class name

* Move to separate service

* Exclude Dagger shell

* Display relevant errors to user

* Make it easy to inspect normalized script

* Add .dag extension

* Add notebook

* Use node20 and export class

* Upgrade dagger module

* Fix tests

* Latest protos

* Use JSON encoding for e2e fixtures
  • Loading branch information
sourishkrout authored Feb 6, 2025
1 parent 9520ebe commit b68b02a
Show file tree
Hide file tree
Showing 38 changed files with 1,869 additions and 1,163 deletions.
7 changes: 4 additions & 3 deletions dagger.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
{
"name": "vscode-runme",
"engineVersion": "v0.15.3",
"sdk": "typescript",
"dependencies": [
{
"name": "golang",
"source": "github.com/purpleclay/daggerverse/golang@7e83bccc350fa981e975ac0c8619f92a1b729958"
"source": "github.com/purpleclay/daggerverse/golang@7e83bccc350fa981e975ac0c8619f92a1b729958",
"pin": "7e83bccc350fa981e975ac0c8619f92a1b729958"
}
],
"source": "dagger",
"engineVersion": "v0.11.4"
"source": "dagger"
}
2 changes: 2 additions & 0 deletions dagger/.gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
/sdk
/node_modules/**
/**/node_modules/**
/**/.pnpm-store/**
7 changes: 4 additions & 3 deletions dagger/Pipeline.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,12 @@ Let's use [github.com/purpleclay/daggerverse](https://daggerverse.dev/mod/github

```sh {"id":"01J04HR247XE1TK2MVB9SR4W51","name":"KERNEL_BINARY"}
dagger call \
-m golang \
--src ../runme \
-m golang \
--src ../runme \
build \
file \
--path runme
--path runme \
-o /tmp/runme-binary
```

### Grab the Presetup Script
Expand Down
4 changes: 2 additions & 2 deletions dagger/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ terminalRows: 16
## List available functions

```sh {"excludeFromRunAll":"true","id":"01HTNVRK3AJ2AT8M24TA996RCJ","terminalRows":"15"}
dagger -m vscode-runme functions
dagger functions
```

## Build Kernel Binary
Expand All @@ -35,5 +35,5 @@ dagger --progress=plain call \
--binary /tmp/runme/runme \
--presetup dagger/scripts/presetup.sh \
build-extension \
--github-token cmd:"gh auth token"
--github-token-secret cmd:"gh auth token"
```
37 changes: 37 additions & 0 deletions dagger/notebook/shell.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
---
runme:
id: 01JJDCG2SQSGV0DP55XCR55AYM
version: v3
shell: dagger shell
terminalRows: 20
---

# Compose Notebook Pipelines using the Dagger Shell

Let's get upstream artifacts ready. First, compile the Runme kernel binary.

```sh {"id":"01JJDCG2SPRDWGQ1F4Z6EH69EJ","name":"KERNEL_BINARY"}
github.com/purpleclay/daggerverse/golang $(git https://github.com/stateful/runme | head | tree) |
build |
file runme
```

Then, grab the presetup.sh script to provision the build container.

```sh {"id":"01JJDCG2SQSGV0DP55X86EJFSZ","name":"PRESETUP","terminalRows":"14"}
git https://github.com/stateful/vscode-runme |
head |
tree |
file dagger/scripts/presetup.sh
```

## Build the Runme VS Code Extension

Let's tie together above's artifacts via their respective cell names to build the Runme VS Code extension.

```sh {"id":"01JJDCG2SQSGV0DP55X8JVYDNR","name":"EXTENSION","terminalRows":"25"}
github.com/stateful/vscode-runme |
with-remote github.com/stateful/vscode-runme main |
with-container $(KERNEL_BINARY) $(PRESETUP) |
build-extension GITHUB_TOKEN
```
Loading

0 comments on commit b68b02a

Please sign in to comment.