Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong command in ./01_install_requirements.sh script #1620

Open
mnietoji opened this issue Dec 18, 2023 · 6 comments
Open

Wrong command in ./01_install_requirements.sh script #1620

mnietoji opened this issue Dec 18, 2023 · 6 comments

Comments

@mnietoji
Copy link

+(./01_install_requirements.sh:102): yq -iy '.[3].dnf.nobest = "true"' /home/dev-scripts/metal3-dev-env/vm-setup/roles/packages_installation/tasks/centos_required_packages.yml
Error: unknown shorthand flag: 'y' in -y
Usage:
yq eval [expression] [yaml_file1]... [flags]

This line is wrong
yq -iy '.[3].dnf.nobest = "true"' ${METAL3_DEV_ENV_PATH}/vm-setup/roles/packages_installation/tasks/centos_required_packages.yml

@mnietoji
Copy link
Author

yq --version
yq (https://github.com/mikefarah/yq/) version v4.40.5

@mnietoji
Copy link
Author

I have seen that yq -iy works with yq 3.2.3 but fails with yq 4.40.5, but i think v4 is being installed here:
dev-scripts/metallb/deploy_operator.sh:go install -mod='' github.com/mikefarah/yq/v4@v4.13.3

mnietoji added a commit to mnietoji/dev-scripts that referenced this issue Dec 19, 2023
Option -y is not available in yq version 4 that
is the one being installed
openshift-metal3#1620
@bdlink
Copy link

bdlink commented Jun 17, 2024

yq v3 has not been supported since 2021, need to check all places yq is used and make sure they work for yq v4.18.1 and later versions.

@bdlink
Copy link

bdlink commented Jun 20, 2024

Issue here seems to be that yq 3.4.3 (which is installed by the script) is not installed if another version is already present. removing the offending option -y does not work, because later uses of yq will fail (as incompatable with yq v4).

@elfosardo
Copy link
Member

just left a comment in the related PR:
I beleive the latest available version in pypi is still 3.x
I'd rather pin yq version installed so when the new version comes out we don't break dev-scripts

@elfosardo
Copy link
Member

this should help #1668
when 4.x is available on pypi we can think about updating the command

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants