Open cbarrete opened 7 months ago
Great questions! Internally btd
is step 1 in a pipeline, where the next step takes configuration information (from the PACKAGE
files and the labels
attribute) and comes up with a plan of where to test what things. As an approximate example, if you write set_package_value("ci.spec", ["linux", "mac"])
then we'll get your code on Mac and Linux (with various layers of macros to make that more pleasant). We also run all jobs with --build-report
and --skip-incompatible-targets
. We do want to open source the second step of the pipeline, eventually, but at the moment it is full of Meta-specific hacks as it has a long history of being multiple systems we are only now consolidating around Buck2.
If your CI is small enough, it may be that --skip-incompatible-targets
and running all the targets on Windows/Mac/Linux is sufficient?
Thanks for the quick reply, this all makes a ton of sense!
--skip-incompatible-targets
may very well be enough for us for now, and --build-report
could come in handy to get better build results.
While I'm here, more of a buck2 question than a change detector one, but can you confirm that there is no way to get multiple configurations in a single dag/instantiation? Or even multiple commands such as build/test?
Basically, I'm trying to figure out how to optimally run the matrix of build/test number of configurations (especially when some configurations share most targets with no differences) potential other axes in the future (?). A single buck2
invocation with a single DAG would be ideal of course, but as I understand, this is not supported.
There is no easy way to do any of that today, as far as I know.
build
and a test
simultaneously isn't hard in theory. I imagine we need a --build
flag to test
, and then it would do both. Not much work.But what you describe is definitely reasonable.
Does this project somehow allow filtering by platform/applying different configurations to the targets, or is this something that should be done separately?
Concretely, using
targets
/btd
can return targets that are not supported by the default platform, which causes ourbuck2 build/test
invocations to fail with acheck the target's compatibility attributes
type error. The other side of that coin is that I do not know how to specifically get the targets for an alternative configuration.Using
-- --target-platforms //my/execution:platform
in thetargets
call does not seem to filter out the targets, and I couldn't see anything inbtd
that would help either.Any pointers would be appreciated!