Repository navigation
Guard against wrong dagger binary in TypeScript SDK - #3285
Conversation
👷 Deploy request for cloak-docs accepted.
|
This comment was marked as outdated.
This comment was marked as outdated.
|
The integration test that I imagine for this is not easy. Do you think it's worth adding it @sipsma? |
No I agree it's not worth it; manual test is fine for this given it's not straightforward to automate and is just handling a one-off event more or less, not like a feature we need to keep caring about indefinitely. |
This comment was marked as outdated.
This comment was marked as outdated.
|
While we have this context, I am fairly certain that there is nothing to do for the Go SDK - it doesn't invoke the binary. From my POV, it's just the Python one left: dagger/sdk/python/dagger/src/dagger/engine.py Lines 24 to 31 in 24ce323 Would you agree @sipsma? |
I bounced a few ideas of @helderco this morning, we have a simple solution that will work for both SDKs. Will be changing this PR shortly, and then following up with the Python one. |
This is meant to guard against running the "wrong" dagger. Versions prior to 0.3.x will not have commands that these SDKs depend on. This is the simplest & most straightforward check. Both happy & unhappy path work as expected now. Log output behaves as expected too. Why exit 127 instead of 1? https://tldp.org/LDP/abs/html/exitcodes.html Signed-off-by: Gerhard Lazu <[email protected]>

We want to fail if the "wrong" dagger is used. Versions prior to
0.3.xwill not have commands that these SDKs depend on.Follow-up to #3261
Part of #3176