Skip to content

Allow artifact names in bst shell#1719

Merged
gtristan merged 5 commits into
masterfrom
tristan/shell-artifacts
Aug 17, 2022
Merged

Allow artifact names in bst shell#1719
gtristan merged 5 commits into
masterfrom
tristan/shell-artifacts

Conversation

@gtristan
Copy link
Copy Markdown
Contributor

Now that we cache the full tree when builds fail, it becomes more interesting to have a buildshell on a failed artifact without needing to reproduce the project data.

Fixes #1711

@gtristan
Copy link
Copy Markdown
Contributor Author

I've added some more testing to this branch (locally), as I was trying to see what happens when you try bst shell <artifact-name>, instead of using a build tree.

But I encountered:

Error launching shell: Error: '--deps run' is not supported for artifact names

This is correct because we don't encode runtime dependencies into artifacts (which necessary by design), so I conclude that we cannot support shelling into artifact names except for when running build shells.

I will add a more convenient user facing error in the case the user has attempted to launch a shell on an artifact name without specifying --build and --use-buildtree.

@gtristan
Copy link
Copy Markdown
Contributor Author

Updated, added a new test to ensure the correct error messaging when the user tries to use bst shell with artifact names but not using build trees.

$ bst shell test/autotools-amhello/847d23cd0e61c54a6beca9071b64643388ad2ab783191358b2a499fe77e86563 -- hello

Error launching shell: Only buildtrees are supported with artifact names

    Use the --build and --use-buildtree options to shell into a cached build tree

@gtristan gtristan changed the title WIP: Allow artifact names in bst shell Allow artifact names in bst shell Aug 16, 2022
Copy link
Copy Markdown

@ghost ghost left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks fine to me.

Comment thread tests/integration/shellbuildtrees.py Outdated
@gtristan gtristan force-pushed the tristan/shell-artifacts branch 2 times, most recently from 8ba4115 to fa45e59 Compare August 16, 2022 14:40
Now that we cache the full sandbox root for failed builds we can debug
builds directly on downloaded artifacts.

Fixes #1711
This will enable bash completions on artifact names for `bst shell`
… bst shell

Ensure we get a comprehensive message when the user tries to use `bst shell`
on an artifact name for anything other than shelling into a cached build tree.
@gtristan gtristan force-pushed the tristan/shell-artifacts branch from fa45e59 to d2cd5bc Compare August 17, 2022 06:42
@gtristan gtristan merged commit 7ba5126 into master Aug 17, 2022
@gtristan gtristan deleted the tristan/shell-artifacts branch August 17, 2022 07:07
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.

Support artifact names in bst shell --build --use-buildtree

1 participant