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

[fix] take first result on YB_RELEASE check #35

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jlisthood
Copy link

@jlisthood jlisthood commented Oct 29, 2024

Before running ./install_software.sh 2024.1.3.0 would have multi-line values for YB_RELEASE, YB_PACKAGE_URL, and YB_PACKAGE_NAME:

YB_RELEASE: 2024.1.3.0-b105
2024.1.3.0-b105
2024.1.3.0-b105
YB_PACKAGE_URL: https://downloads.yugabyte.com/releases/2024.1.3.0/yugabyte-2024.1.3.0-b105
2024.1.3.0-b105
2024.1.3.0-b105-linux-x86_64.tar.gz
YB_PACKAGE_NAME: yugabyte-2024.1.3.0-b105
2024.1.3.0-b105
2024.1.3.0-b105-linux-x86_64.tar.gz

This would cause the install script to fail since YB_PACKAGE_URL is not valid. wget would fail to grab https://downloads.yugabyte.com/releases/2024.1.3.0/yugabyte-2024.1.3.0-b105 above.

By taking the first result using | head -n 1 the install script works fine:

YB_RELEASE: 2024.1.3.0-b105
YB_PACKAGE_URL: https://downloads.yugabyte.com/releases/2024.1.3.0/yugabyte-2024.1.3.0-b105-linux-x86_64.tar.gz
YB_PACKAGE_NAME: yugabyte-2024.1.3.0-b105-linux-x86_64.tar.gz

In this case, wget https://downloads.yugabyte.com/releases/2024.1.3.0/yugabyte-2024.1.3.0-b105-linux-x86_64.tar.gz ends up succeeding

I believe the root cause is that we see these 3 versions mentioned in release tags:

  • 2024.1.3.0-b105
  • 2024.1.3.0-b105-aarch64
  • 2024.1.3.0-b105-x86_64

So the grep -Eo "2024.1.3.0-b[0-9]+" matches all 3 and returns 2024.1.3.0-b105 3 times.

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

Successfully merging this pull request may close these issues.

1 participant