During development and testing one of the missing features on buildstream
for
me is the hability to specify "I want to bypass cache for this element", be
it
a local cache or remote cache (or soemtimes interchange that).

I'v proposed a new cli argument for the build subcommand: --ignore-cache-for
that should be used once per element that we want to bypass and force a
local
build.

so, instead of doing:
bst build ELEMENT
bst artifact delete ELEMENT
bst build ELEMENT

we dould do:
bst build --ignore-cache-for ELEMENT ELEMENT

The downside of this approach is that it adds a new command to the CLI,
arguments are that we are going to make the CLI fat and anything that is a
cli argument is  also a promise that it will stay there for the future, as
it's the entry point of buildstream and scripts using buidlstream need to
rely on the cli API. Also noting that the first approach does not really
removes cache as it's still possible to  download the cache via the cache
server.

the upside of this approach is that it's queryeable via `bst build --help`
with all of the help that `man bst` and `tldr bst` add, increasing the
semantic information provided by buildstream.

Of course I don't wan't to impose this on buildstream but to start a
discussion on what's the minimum API that we should provide without
bloating
the cli, and providing everything that is necessary for outer scripts in a
way that hacks around buildstream are minimal, and don't feel like a hack.

My current implementation for this is here:
https://gitlab.com/BuildStream/buildstream/-/issues/1381#note_398330697

Reply via email to