Skip to content

Let's take the Dagger module to the next level :) - #581

Merged
migmartri merged 1 commit into
chainloop-dev:mainfrom
shykes:dagger-improvements
Mar 9, 2024
Merged

Let's take the Dagger module to the next level :)#581
migmartri merged 1 commit into
chainloop-dev:mainfrom
shykes:dagger-improvements

Conversation

@shykes

@shykes shykes commented Mar 8, 2024

Copy link
Copy Markdown
Contributor

Proposed improvements to the chainloop module.

To experiment, start with:

dagger call init --help

Normally, the demo token you provided is used by default, but I'm getting an auth error.

@shykes
shykes force-pushed the dagger-improvements branch from d45ea67 to cc87285 Compare March 8, 2024 07:16

@migmartri migmartri left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is very cool, I can see where this is going :)

I added some feedback, but I don't want to block you with all the changes, so if you think my comments make sense, I'll be happy to merge your PR (ideally with the changed described below), and I'll iterate on those changes myself, whatever you prefer, just let me know.

Ideally, though, before merging this PR, I'd love to

  • remove the token default from the module
  • remove the dagger-demo directory
  • Look into potential, unnecessary autogenerated code added (internal/dagger) checked in.

Thank you for your contribution!

Credentials for development

You mentioned that the token we provided didn't work, could you try this one?

export CHAINLOOP_TOKEN=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJvcmdfaWQiOiI4NDJmNTkzMS0yMWE0LTRlMTctOThhNC05NzBlOTU5OTliMDgiLCJ3b3JrZmxvd19pZCI6IjIwMTIyMDkwLWViZTItNDU2Yi04YzBhLTJiMThlYTQ5NjViNyIsImlzcyI6ImNwLmNoYWlubG9vcCIsImF1ZCI6WyJhdHRlc3RhdGlvbnMuY2hhaW5sb29wIl0sImp0aSI6IjU3ZDM3NmNkLTViMmQtNGYwOS04MTZiLTJiNjQ0NGU4N2E1NyJ9.blZmEc1YGf0CHXDBwmfEhFOwe6h7wXj4w6nrdSD_QUI

dagger call --token env:CHAINLOOP_TOKEN init [subcommand]
# note that most subcommands will panic due to the marshalling issue I mentioned inline in the code but once you fix that, you should be able to do things like

dagger call --token env:CHAINLOOP_TOKEN init with-file --file ./extras/dagger/dagger-demo/sbom.cyclonedx-1.5.json --name sbom status 

I hope it helps

Comment thread dagger.json
Comment thread extras/dagger/main.go Outdated
Comment thread dagger.json Outdated
Comment thread extras/dagger/dagger-demo/dagger-demo-developer.sh Outdated
Comment thread extras/dagger/main.go
Comment thread extras/dagger/main.go
Comment thread extras/dagger/main.go Outdated
Comment thread extras/dagger/main.go
Comment thread extras/dagger/main.go Outdated
Comment thread extras/dagger/.gitignore Outdated
@shykes
shykes force-pushed the dagger-improvements branch 5 times, most recently from 1297ab9 to c048efa Compare March 9, 2024 00:10
@shykes
shykes requested a review from migmartri March 9, 2024 00:10

@migmartri migmartri left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!! 🚀

Thank you!

Comment thread extras/dagger/main.go
type Chainloop struct {}

// Resume an attestation from its identifier
func (m *Chainloop) Resume(

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I love this resume functionality!

Comment thread extras/dagger/main.go Outdated
- Make the module address shorter: github.com/chainloop-dev/chainloop
- New API takes advantage of chaining: do more in a single call, less glue scripts needed
- Add descriptions to each function and type

Signed-off-by: Solomon Hykes <solomon@dagger.io>
@shykes
shykes force-pushed the dagger-improvements branch from c048efa to 74eca82 Compare March 9, 2024 00:36
@migmartri
migmartri merged commit c8318b5 into chainloop-dev:main Mar 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants