ibm-mas / cli

Maximo Application Suite command line interface
https://ibm-mas.github.io/cli/
Eclipse Public License 2.0
23 stars 17 forks source link

Incorrect yq version #1096

Closed xuchixc closed 2 months ago

xuchixc commented 3 months ago

In the laest version of MAS CLi container image, the yq version is not correct. I found there are two yq commands, the correct version of yq should be v4.35.1 which is located at /usr/bin/yq. The current found yq version is 3.2.2 which is located at /opt/app-root/bin/yq We need to keep the latest yq version v4.35.1 , otherwise some existing codes which dependent on yq v4.x will be failed.

[ibmmas/cli:10.0.5]mascli$ yq --version
yq 3.2.2
[ibmmas/cli:10.0.5]mascli$ which yq
/opt/app-root/bin/yq
[ibmmas/cli:10.0.5]mascli$ whereis yq
yq: /usr/bin/yq /opt/app-root/bin/yq
xuchixc commented 3 months ago

Did some tests, this issue was involved in 10.0.3

[ibmmas/cli:10.0.3]mascli$ which yq /opt/app-root/bin/yq

[ibmmas/cli:10.0.2]mascli$ which yq /usr/bin/yq

durera commented 3 months ago

@whitfiea It looks like the version of yq being installed via pypi in https://github.com/ibm-mas/cli-base/pull/8 is conflicting with the version of yq installed already via

whitfiea commented 3 months ago

It is different implementations of yq rather than just different versions. The version installed via pip is this one https://pypi.org/project/yq/ which is the kislyuk implementation. The yq installed via https://github.com/ibm-mas/cli-base/blob/b293e16a6adf22ee868c69391da7388e048ba9c1/image/cli-base/install/install-yq.sh is the mikefarah version.

The conflict is that we have code now in the cli that assumes that yq is the mikefarah version, and code in the gitops branch that assumes that yq is the kislyuk version.

We should standardise on the mikefarah version and actually have an issue on the backlog to do that https://jsw.ibm.com/browse/MASCORE-2119

whitfiea commented 2 months ago

PR to resolve this is here https://github.com/ibm-mas/cli-base/pull/9