Replace dependency on mikefarah/yq build container in favour of kislyuk/yq (python wrapper for jq)
See original GitHub issueIs your task related to a problem? Please describe.
Today, che-operator uses yq from https://github.com/kislyuk/yq but the devfile and plugin registries use a DIFFERENT yq implementation from https://github.com/mikefarah/yq
And as demonstrated in https://github.com/eclipse/che-devfile-registry/pull/27 yaml processing may not always be required where a simple grep | sed
scriplet can be used.
Additionally, the mikefarah/yq implementation requires building go code (or using his Alpine based image) whereas the kislyuk/yq works with both python2 and 3 as a wrapper for jq.
I’ve already prototyped a container that we can use to prebuild/preinstall yq as a build container:
https://github.com/nickboldt/containers/blob/master/ubi8-yq/Dockerfile
I will extend this approach so I can use this image in Brew/OSBS for CRW builds (it requires that the python deps be prepulled and pushed as a tarball into pkgs.devel’s dist-git lookaside cache, as we do for the CRW 1.2 stacks’ lang server deps).
Describe the solution you’d like
-
migrate existing yq-dependent scripts in plugin and devfile registry to use python based kislyuk/yq instead (or even simpler
grep|curl
where possible, as in https://github.com/eclipse/che-devfile-registry/pull/27) -
update Dockerfiles to use https://quay.io/repository/nickboldt/ubi8-yq image or an official Eclipse Che (or we could just use this approach to install yq into the plugin registry image container if we need yq processing at runtime)
Issue Analytics
- State:
- Created 4 years ago
- Comments:24 (24 by maintainers)
Top GitHub Comments
@amisevsk PRs are ok for me. I have approved them.
Did some quick performance testing of the sed and yq options in devfile registry. Results suggest that we should use the golang yq instead of the python one as it’s much faster:
HOWEVER building this in Brew will be a bit challenging unless I just import the sources and compile it on the fly as a first stage build for the registries. Otherwise we need to maintain a 12th image container for CRW 2… or I start using cekit for templating these things.