Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In a previous PR, #783, I had a first attempt at providing better encapsulation for CEKit modules.
The current implementation, as I see it, has a major flaw. It is not enough to reference a module name in e.g. an image descriptor and expect that module to be added to the image. If the module depends on a docker image to do some of it's work (e.g. to build an artefact), when adding that module to an image descriptor, one has to know that module also requires a "builder image" be defined in the top level image descriptor and what it should contain. It would make much more sense for that module to include within its definition the required builder image, and for CEKit to handle ensuring that builder image is available in the image build.
Again, I am very keen to hear the input of the maintainers/other users on this direction, and whether it makes sense.
This does not pass all tests, and is not quite complete, but we are actively using it for some proof of design work. Many of the failing tests are related to internal RedHat functionality—which I will not investigate.
Work that would be required to get this "release ready" is to improve the handling of the ModuleRegistry(s). Changes here mean that CEKit could silently fail if two different module definitions share the same name. Also repository definitions for modules within modules should perhaps leverage the parent module's repository (see second commit that "fixes" the test, a change that should probably not be required).