On 12/06/16 09:44, Tristan Van Berkom wrote:
After spending some time getting to the bottom of YBD issue 224, I
have
come to a conclusion that artifact splitting is broken in YBD and I
wonder if it's broken at an even deeper level.
Pasting my conclusion from the following comment:
https://github.com/devcurmudgeon/ybd/issues/224#issuecomment-225416380
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Artifact splitting needs to be implemented somewhere after system
integration commands are run, or alternatively, system integration
commands are not an option for split system artifacts.
Currently we do something like the following for each artifact we need
to build:
install_contents(component) // stages the dependencies
build(component) // runs commands to build the artifact
Here we have a special case in install_contents() which says, if we are
going to build a 'system' and splitting rules are active, then only
stage some of the system; this is wrong because we need the full
system, or an explicitly declared subset of the system which includes
everything we're going to need in order to run the system-integration
commands.
If system-integration commands need resources which are not included in
the target system after artifact splitting, then that seems to be a
problem with the way system integration commands are run to me.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This might not be completely broken in other definitions build
tooling,
but the above also leads me to suspect it is entirely broken, artifact
splitting should be performed on an existing system artifact possibly
as a part of the deployment.
As far as I know morph behaves the same way at system integration time
and only the contents of the split artifacts in the target system will
be present.
One detail in particular which stands out to me, is the cache key
for
a system artifact which was created with 'splits'
o Should we be caching artifacts of partial systems ? Why ?
Only complete artifacts are cached in ybd. The are retrieved as complete
artifacts and then split at system assembly time.
I think it would be possible to assemble a complete system with no
splitting, then run the system integration commands, and then do the
splitting stage. However, I could imagine this not covering all possible
cases. For instance, suppose the system-integration commands need a
python interpreter but there isn't one in the target system, even with
no splitting. It sounds like system integration needs something like
build dependencies, rather than splitting disabled to me.
Morph caches the split artifacts individually in contrast to ybd.
o Is the cache key for a 'runtime' of a system properly
created
based on which artifacts are declaratively included via splitting
options ? or do they differ arbitrarily because of some hash on
the current ybd configuration ?
See above, only the entire unsplit artifact is cached in ybd.
--
Richard Dale
Software Developer - Codethink