You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@buildstream.apache.org by GitBox <gi...@apache.org> on 2022/08/15 08:01:20 UTC

[GitHub] [buildstream] gtristan opened a new pull request, #1719: WIP: Allow artifact names in bst shell

gtristan opened a new pull request, #1719:
URL: https://github.com/apache/buildstream/pull/1719

   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 
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@buildstream.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [buildstream] gtristan merged pull request #1719: Allow artifact names in bst shell

Posted by GitBox <gi...@apache.org>.
gtristan merged PR #1719:
URL: https://github.com/apache/buildstream/pull/1719


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@buildstream.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [buildstream] ssssam commented on a diff in pull request #1719: Allow artifact names in bst shell

Posted by GitBox <gi...@apache.org>.
ssssam commented on code in PR #1719:
URL: https://github.com/apache/buildstream/pull/1719#discussion_r946497164


##########
tests/integration/shellbuildtrees.py:
##########
@@ -326,6 +326,40 @@ def test_shell_pull_cached_buildtree(share_with_buildtrees, datafiles, cli, pull
     assert "Hi" in result.output
 
 
+#
+# Test behavior of shelling into a buildtree by its artifact name
+#
+@pytest.mark.datafiles(DATA_DIR)
+@pytest.mark.skipif(not HAVE_SANDBOX, reason="Only available with a functioning sandbox")
+def test_shell_pull_artifact_cached_buildtree(share_with_buildtrees, datafiles, cli):
+    project = str(datafiles)
+    artifact_name = "test/build-shell-buildtree/4a47c98a10df39e65e99d471f96edc5b58d4ea5b9b1f221d0be832a8124b8099"
+
+    cli.configure({"artifacts": {"servers": [{"url": share_with_buildtrees.repo}]}})
+
+    # Run the shell and request that required artifacts and buildtrees should be pulled
+    result = cli.run(
+        project=project,
+        args=[
+            "--pull-buildtrees",
+            "shell",
+            "--build",
+            "--use-buildtree",
+            artifact_name,
+            "--",
+            "cat",
+            # We don't preserve the working directory in artifacts, so we will executing be at /

Review Comment:
   "so we will executing be at /" -- word order / typo ?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@buildstream.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [buildstream] gtristan commented on pull request #1719: WIP: Allow artifact names in bst shell

Posted by GitBox <gi...@apache.org>.
gtristan commented on PR #1719:
URL: https://github.com/apache/buildstream/pull/1719#issuecomment-1216280977

   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
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@buildstream.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [buildstream] gtristan commented on pull request #1719: WIP: Allow artifact names in bst shell

Posted by GitBox <gi...@apache.org>.
gtristan commented on PR #1719:
URL: https://github.com/apache/buildstream/pull/1719#issuecomment-1216261907

   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`.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@buildstream.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org