Will Builder rebuild my composite package via reverse-dependency builds from its depended packages?


#1

The use-case here is that I need my composite to build whenever one of its services rebuilds with the unstable channel tag.


#2

I suspect it will. It’s just a plan. Builder doesn’t care what kind of plan, and doesn’t look at pkg_type, afaik. The limitations on usage of composites are more around running and addressing the services. Incidentally I also have this use case, but I’ve not tested it yet, but it’s certainly near the top of my ‘try out’ list.


#3

I guess we will find out. pkg_services isn’t necessarily the same thing as pkg_deps from Builder’s point of view.


#4

I am pretty sure composite plans do not currently work with auto rebuilds on Builder - @christophermaier will know for sure


#5

It seems like doing export HAB_BUILDER_CHANNEL=“unstable” inside the composite’s plan.sh gives us what we want by building the composite always from the very latest packages for our services (those packages having hopefully been built by Builder already).


#6

Builder can likely build composites based on a manual triggering, but it’s not yet wired up for reverse-dependency builds. That is, if a service that your composite contains is rebuilt, the composite is not triggered for a rebuild.


#7

I suppose that a reverse-dependency build isn’t really need though, is it, if my composite service members are have an update strategy enabled?


#8

@bixu I think we have since talked in person about this, but just for posterity, I’ll post here.

Composites, as they currently exist, are not a totally complete feature. For them to be complete, we’d want to be able to address them at runtime as a single thing. That way, when you say “update this composite”, it would be able to update individual services that compose it. Those services are installed now using the fully-qualified identifiers that were resolved when the composite package was created. This ensures that that collection of services work together, and are exactly the set that the composite was built with. As a result, though, they cannot update themselves individually, because they are using fully-qualified identifiers, which by definition cannot update.