Skip to content

cli: add buildtree checkout command#2129

Open
ownik wants to merge 1 commit into
apache:masterfrom
ownik:master
Open

cli: add buildtree checkout command#2129
ownik wants to merge 1 commit into
apache:masterfrom
ownik:master

Conversation

@ownik

@ownik ownik commented Jun 1, 2026

Copy link
Copy Markdown

This PR adds a "--use-buildtrees" option to "bst artifacts checkout", similar to the existing option in "bst shell".

The goal is to make it possible to check out build artifacts from the sandbox build tree when it is available.

Would be okay with adding this functionality, or are there reasons not to expose it through "bst artifacts checkout"? Or is there another way to get build artifacts from sandbox now?

@ownik

ownik commented Jun 8, 2026

Copy link
Copy Markdown
Author

@BenjaminSchubert @abderrahim @cs-shadow @gtristan @juergbi I've made changes to verify that buildtree exists in the cache, similar to the shell command. Could you please review, please?

@abderrahim

Copy link
Copy Markdown
Contributor

Looks like this is fixing #1822, please link the issue in your PR. Also please add a test for this behaviour.

I'll try to review it today.

@abderrahim

Copy link
Copy Markdown
Contributor

A few things need to be considered in the design of this feature:

  • Someone recently suggested to implement this as a flag to source checkout rather than artifact checkout. It kinda makes sense that the build tree is related to the source, but it's also stored as part of the artifact. Maybe it makes sense to move it to a separate toplevel command? something like bst buildtree checkout?
  • This is currently checking out the buildroot rather than what is traditionally considered a "build tree". This means it can work with both build elements and non-build-elements, but it also means we get a whole sandbox with the dependencies, the build tree, and even the artifact (if the build succeeded) which is probably not what people asking for the build tree are looking for.
  • if we go with a new toplevel command, we might want to expose options to checkout either the build tree or the build root.

Add a new `bst buildtree checkout` command for exporting buildtree stored in artifacts.

By default, the command checks out the buildtree. The
`--buildroot` option can be used to export the entire buildroot
sandbox instead.

Fixed apache#1822
@ownik

ownik commented Jun 9, 2026

Copy link
Copy Markdown
Author

@abderrahim Thanks for the feedback! I've reworked the implementation into a new bst buildtree checkout command. By default it checks out the buildtree, and a --buildroot option can be used to export the entire buildroot instead.

I've also added an integration test covering the new command and link the issue in PR.

@ownik ownik changed the title cli: add --use-buildtrees option for artifacts checkout cli: add buildtree checkout command Jun 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants