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

CI: Port Upgrade test to Rust #3108

Open
tjtelan opened this issue Mar 28, 2023 · 0 comments
Open

CI: Port Upgrade test to Rust #3108

tjtelan opened this issue Mar 28, 2023 · 0 comments
Labels
bug Something isn't working build-release CD DX/GENERAL Developer Experience General good first issue Good for newcomers technical debt

Comments

@tjtelan
Copy link
Contributor

tjtelan commented Mar 28, 2023

Related to #3003

The upgrade test is brittle. We assume upgrades succeed only if versions are different.

It relied on the comparing version updates using string length of versions (of a specific length) instead of comparing based on semver x.y.z.

When we started using prerelease (e.g. alpha, beta, dev), exposed this flaw of assuming the length of the version string.

readonly PRERELEASE=${2:-$(cat VERSION)-$(git rev-parse HEAD)}

if [[ ! -z "$USE_LATEST" ]];
then
# Use the "latest" fluvio channel
echo "Switch to \"latest\" channel CLI"
FLUVIO_BIN_ABS_PATH=${HOME}/.fluvio/bin/fluvio
$FLUVIO_BIN_ABS_PATH version switch latest
DEV_VERSION=$($FLUVIO_BIN_ABS_PATH update | grep "Downloading Fluvio" | grep -v "channel" | awk '{print $8}' | sed 's/[+]/-/')
# This is slicing the DEV_VERSION string that is expected to look like this (including the ...):
# ex. 0.9.17-f7e196f3c3c5cefd0339afb85543073a12db9c5d...
TARGET_VERSION=${DEV_VERSION::-44}
echo "Installed CLI version ${DEV_VERSION}"
echo "Upgrading cluster to ${DEV_VERSION}"
$FLUVIO_BIN_ABS_PATH cluster upgrade
echo "Wait for SPU to be upgraded. sleeping 1 minute"
else
echo "Test local image v${PRERELEASE}"
TARGET_VERSION=${PRERELEASE::-41}
# This should use the binary that the Makefile set
echo "Using Fluvio binary located @ ${FLUVIO_BIN_ABS_PATH}"
$FLUVIO_BIN_ABS_PATH cluster upgrade --develop
fi

I suspect job failure is due to evaluating this line

local FLUVIO_BIN_ABS_PATH=$(${READLINK} -f $FLUVIO_BIN)

Output

 readlink: missing operand
Try 'readlink --help' for more information.
-: OK

Logs from failed job in CD_Dev: https://github.com/infinyon/fluvio/actions/runs/4546452513/jobs/8015101349
logs_37217.zip

@tjtelan tjtelan added bug Something isn't working good first issue Good for newcomers build-release technical debt CD DX/GENERAL Developer Experience General labels Mar 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working build-release CD DX/GENERAL Developer Experience General good first issue Good for newcomers technical debt
Projects
None yet
Development

No branches or pull requests

1 participant