Skip to content

The command-line should provide access to artifacts

Background

BuildStream doesn't provide an interface to its artifact cache directly.

This hasn't been sufficient and has led to error-prone manual access to ~/.cache/buildstream.

See https://mail.gnome.org/archives/buildstream-list/2018-July/msg00051.html for the source discussion of this issue.

#234 (closed) is related in that this would provide an interface for reading logs in addition to its other requirements.

Acceptance Criteria

  • There is a bst artifact subcommand group for interacting with the cache.

  • bst artifact subcommands take artifact ref names.

  • Artifact ref names can be tab-completed.

  • A glob expression may be used instead of a name.

  • An element name may be used instead of an artifact ref name.

  • There are bst artifact subcommands to replace bst checkout, bst pull and bst push.

  • There is a bst artifact list command for listing existing artifacts, which takes a --long/-l option for more information as described in #416 (comment 83263225).

    Artifacts are listed in order of build date, display the build date in local time, list the size of the files portion of the artifact, and the name of the active workspace if it was created from a local workspace build.

  • There is a bst artifact log command for viewing logs in a pager.

  • There is a bst artifact delete command for deleting artifacts that match the specified pattern.

  • There is a bst artifact list-content command for listing the contents of an artifact. It should take a --long/-l option to show more information, like ls -l or tar -t [-f] -vv.

  • There is a bst artifact diff command for showing which files were added/removed/changed or are the same between artifacts.


Edited by Tristan Van Berkom
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information