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

GitHub Actions Workflow #2284

Open
igor-ritual opened this issue Mar 13, 2024 · 1 comment
Open

GitHub Actions Workflow #2284

igor-ritual opened this issue Mar 13, 2024 · 1 comment
Assignees

Comments

@igor-ritual
Copy link

igor-ritual commented Mar 13, 2024

Background & motivation

I am looking to run tests for a kurtosis package repository using GitHub Actions. A couple of issues arise:

  • How to stop and tear down the enclave from within the package script?
  • How to signal any errors back to the workflow if any tests fail?

Desired behaviour

The kurtosis cli should support run and block while running a package and terminate with an error number given the package script.

How important is this to you?

Critical; Kurtosis is unusable for me without it.

What area of the product does this pertain to?

CLI: the Command Line Interface

@galenmarchetti
Copy link
Contributor

hey @igor-ritual thanks for filing this! this is a great use case for kurtosis and I'd love to make this work for you. The way most folks are doing this right now is via a combination of the CLI and using our Golang or TS SDKs for interacting with the kurtosis engine to handle testing assertions and teardowns. I'll give some thoughts on each bullet point you mentioned:

With regards to stopping and tearing down an enclave from within the package script - we've designed the enclave stop and enclave rm functionality to happen outside of the packaging system, meaning they're called from either the CLI or directly from the Engine & APIC protobuf apis (https://docs.kurtosis.com/engine-apic-reference), for which we have a TS client library and a Golang client library.

So typically in a workflow like a github actions workflow, users write either a bash script that uses the CLI to stop and tear down enclaves, or they call into the TS or Golang client libraries to run tests in those languages, and tear down the enclaves at that layer as well.

Do those options work for handling the first issue of "how to stop an tear down the enclave from within the package script"? or am I missing something about your use case that requires stopping and tearing down the enclave within the package script specifically - is there a reason it has to happen within the script?

With regards to the second bulletpoint "How to signal any errors back to the workflow if any tests fail?" - how are you running assertions from your tests? If you use the TS or Golang client libraries then your test assertions would be in the language specific testing libraries and you would be able to use those SDKs to trigger shutdown of the enclaves.


I might be totally off the mark in understanding your workflow and what you're trying to do here, so please let me know if the above context was helpful in achieving your workflows, or if it's not, could you elaborate on how the "run and block in the CLI, along with error codes" will unblock your testing use case so I can understand better?

@galenmarchetti galenmarchetti self-assigned this Mar 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants