Hey @cosmic quiver ๐
The best way would be to logically link them in the engine's dag. What I mean is - getToken() probably returns something to the client? Why not feed it directly into callApi() instead (or in addition to the client, if you need it on the client for other reasons).
For example, if the token here is from the stdout of getToken(), in that pipeline you can have:
func getToken() ... {
...
WithExec([]string{"the command that outputs the token"},
dagger.ContainerWithExecOpts{
RedirectStdout: "/token",
}
).
...
}
and then in the callApi() pipeline:
func callApi() ... {
...
WithMountedFile('/token', tokenPipeline.File('/token')).
...
}
By making callApi() dependent on getToken(), you also no longer need to call getToken() directly, unless you also need other information from that pipeline of course.
Does this map at all to the logic in your pipeline? If not I can give another way if you let me know more about the pipeline ๐