From f430b82abdd9efa3211cc750bf1e17df86f9b4a2 Mon Sep 17 00:00:00 2001 From: James Harmison Date: Wed, 17 Feb 2021 15:50:28 -0500 Subject: [PATCH 1/3] Try to fix installation of script in GHA --- hack/operate.sh | 4 ++-- hack/requirements.txt | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) create mode 100644 hack/requirements.txt diff --git a/hack/operate.sh b/hack/operate.sh index 0d0c3ee..f1e2d54 100755 --- a/hack/operate.sh +++ b/hack/operate.sh @@ -308,9 +308,9 @@ function update_components() { # Ensure we have the things we need to work with the operator-sdk if [ -z "$components_updated" ]; then if [ "$VIRTUAL_ENV" ]; then - error_run "Updating the Operator SDK manager" pip install --upgrade osdk-manager || return 1 + error_run "Updating the Operator SDK manager" 'pip install --upgrade -r "$SCRIPT_ROOT/requirements.txt"' || return 1 else - error_run "Updating the Operator SDK manager" pip install --user --upgrade osdk-manager || return 1 + error_run "Updating the Operator SDK manager" 'pip install --user --upgrade -r "$SCRIPT_ROOT/requirements.txt"' || return 1 fi error_run "Updating the Operator SDK" 'sdk_version=$(osdk-manager osdk update -vvvv | cut -d" " -f 3)' || return 1 fi diff --git a/hack/requirements.txt b/hack/requirements.txt new file mode 100644 index 0000000..d98bb92 --- /dev/null +++ b/hack/requirements.txt @@ -0,0 +1 @@ +osdk-manager >= 0.3.1, == 0.3.* From 4946510e62aecbb8954e570d2c890496e4c141eb Mon Sep 17 00:00:00 2001 From: James Harmison Date: Wed, 17 Feb 2021 15:51:35 -0500 Subject: [PATCH 2/3] Add pip upgrade to workflows, too, as I think old pip is to blame --- .github/workflows/test-and-release.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/test-and-release.yml b/.github/workflows/test-and-release.yml index 62907c9..b50b2f4 100644 --- a/.github/workflows/test-and-release.yml +++ b/.github/workflows/test-and-release.yml @@ -68,9 +68,11 @@ jobs: password: ${{ secrets.QUAY_PASSWORD }} - name: Build, bundle, and push (develop) run: | + pip3 install --user --upgrade setuptools wheel pip hack/operate.sh --push-images --bundle --develop --verbose --formatter if: github.ref == 'refs/heads/develop' - name: Build, bundle, and push run: | + pip3 install --user --upgrade setuptools wheel pip hack/operate.sh --push-images --bundle --extra-tag=latest --verbose --formatter if: github.ref == 'refs/heads/main' From 01e6c6413d4d405b37319062b1476d2c2c772cf5 Mon Sep 17 00:00:00 2001 From: James Harmison Date: Wed, 17 Feb 2021 16:05:42 -0500 Subject: [PATCH 3/3] Force pip3 - I bet the runner has python2 and python3, the package is 3 and up only --- hack/operate.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hack/operate.sh b/hack/operate.sh index f1e2d54..42f6fd1 100755 --- a/hack/operate.sh +++ b/hack/operate.sh @@ -308,9 +308,9 @@ function update_components() { # Ensure we have the things we need to work with the operator-sdk if [ -z "$components_updated" ]; then if [ "$VIRTUAL_ENV" ]; then - error_run "Updating the Operator SDK manager" 'pip install --upgrade -r "$SCRIPT_ROOT/requirements.txt"' || return 1 + error_run "Updating the Operator SDK manager" 'pip3 install --upgrade -r "$SCRIPT_ROOT/requirements.txt"' || return 1 else - error_run "Updating the Operator SDK manager" 'pip install --user --upgrade -r "$SCRIPT_ROOT/requirements.txt"' || return 1 + error_run "Updating the Operator SDK manager" 'pip3 install --user --upgrade -r "$SCRIPT_ROOT/requirements.txt"' || return 1 fi error_run "Updating the Operator SDK" 'sdk_version=$(osdk-manager osdk update -vvvv | cut -d" " -f 3)' || return 1 fi