hab pkg install
doesn't write/run install hooks to /hab/svc if /hab/pkgs already populated
#8226
Labels
hab pkg install
doesn't write/run install hooks to /hab/svc if /hab/pkgs already populated
#8226
In CI and test environments, it can be helpful to persist
/hab/pkgs
but not/hab/svc
, which seems to be in the spirit of Habitat's architecture --/hab/pkgs
is immutable and/hab/svc
is instance stateHowever, there does not seem to be any way to get
hab pkg install
to regenerate install hooks under/hab/svc
if a package already exists under/hab/pkgs
but/hab/svc
is starting fresh. The package must be fully uninstalled and then reinstalled to get the install hooks to exist and be run. In this way,/hab/pkgs
is being used to indicate the state of an instance which feels like a violation of Habitat's guarantees.Instead of existence of
/hab/pkgs
content for a package being the signal for whether a package has already been installed and needs its install hook ran, perhaps the rendered install hook under/hab/svc
should be used instead. The expected behavior would be that every timehab pkg install
is run, if the rendered install hook doesn't exist under/hab/svc
it gets rendered and executed.The text was updated successfully, but these errors were encountered: