Hi Justin,

> From a development standpoint, we often need to be able to test against
> actual servers in case we can't reproduce over localhost.  I guess that we
> could export the build artifacts from the sandbox and run them
> locally...I'd have to think about what the workflow would look like...we'd
> often want to jump into a debugger which needs the objects and source paths
> - so, I don't think it's necessarily straightforward.  Or, am I missing a
> trick here?

Exporting the build artifacts would certainly be one option. But
depending on what you're trying to achieve, there may be other
alternatives too. `bst shell` in particular comes to mind.

The shell functionality already allows network access for purposes
like this, and comes in two variants - build shell and runtime shell.

The build shell will have all the build dependencies and sources for
the element in exactly the same way that they would be staged during a
`bst build`. It can be used to debug builds of the project, for
example, to iterate on various configuration options.

The runtime shell will provide access to the built artifacts  of the
element and all its runtime dependencies. As such, it is more useful
for testing the resulting binary.

Both the shells allow network access. As such, they are not meant to
produce deployable artifacts, but can be very useful for debugging
purposes. There are probably still many things that could be improved
in the shell experience. So, I'd be very interested for you to try the
shell functionality and let us know if that works for your use case.

One issue that I can already think of is that if we go with this
approach, you will also need to have a debugger available in the
BuildStream project and somehow add a dependency on it  for invoking
the build shell. This topic has been a recurring discussion item, but
we haven't solved it yet.
https://gitlab.com/BuildStream/buildstream/-/issues/422 has some
related background on this.

A couple of references below.

CLI docs: 
https://docs.buildstream.build/master/using_commands.html#invoking-shell
Shell in action:
https://docs.buildstream.build/master/tutorial/running-commands.html#run-the-hello-world-program

Cheers,
Chandan

Reply via email to