Hacker News new | ask | show | jobs
by shykes 1324 days ago
> A) Why async in the user code? Is it really necessary?

We support both sync and async mode. The Python ecosystem is in a state of flux at the moment between sync and async, so it seemed like the best approach to offer both and let developers choose.

> B) Can you mock pipeline events?

Could you share a bit more details on what you mean, to make sure I understand correctly?

2 comments

>We support both sync and async mode. The Python ecosystem is in a state of flux at the moment between sync and async, so it seemed like the best approach to offer both and let developers choose.

Correct me if I'm wrong but it doesn't seem like async will really offer anything a pipeline framework might need?

>Could you share a bit more details on what you mean, to make sure I understand correctly?

I often find myself debugging pipeline complex release workflows that get triggered by a git tag or something.

If I use this thing with github, how can I debug that workflow when it fails?

Related question - as pipelines are not python programs - it would be nice to be able to write unit tests to pipelines code :) And that's where mock pipelines/tasks could be helpful
You can absolutely test Dagger pipelines, in the same way you test the rest of your code. Just use the dagger library in your tests files, the way you would use any other library. It should work the way you expect.