From 56fc13f3726cf5339b9fddc537cc23528a85705a Mon Sep 17 00:00:00 2001 From: Eduardo Apolinario Date: Mon, 13 May 2024 15:47:54 -0700 Subject: [PATCH 01/17] Add f-release.yml Signed-off-by: Eduardo Apolinario --- .github/workflows/f-release.yaml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 .github/workflows/f-release.yaml diff --git a/.github/workflows/f-release.yaml b/.github/workflows/f-release.yaml new file mode 100644 index 0000000000..0abf8094bb --- /dev/null +++ b/.github/workflows/f-release.yaml @@ -0,0 +1,15 @@ +name: release + +on: + push: + tags: + - abc/v*.*.* # stable release like, v0.19.2 + +jobs: + release: + runs-on: ubuntu-22.04 + steps: + - name: test1 + run: | + echo ${GITHUB_REF#refs/tags/} + From 8c95c27822124dd32be8f19c9783da8a663a8434 Mon Sep 17 00:00:00 2001 From: Eduardo Apolinario Date: Mon, 13 May 2024 16:41:18 -0700 Subject: [PATCH 02/17] Add goreleaser Signed-off-by: Eduardo Apolinario --- .github/workflows/f-release.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/f-release.yaml b/.github/workflows/f-release.yaml index 0abf8094bb..c93d50320c 100644 --- a/.github/workflows/f-release.yaml +++ b/.github/workflows/f-release.yaml @@ -12,4 +12,9 @@ jobs: - name: test1 run: | echo ${GITHUB_REF#refs/tags/} + - name: Run GoReleaser + uses: goreleaser/goreleaser-action@v5 + with: + distribution: goreleaser + args: release --rm-dist From 92d37ce40afb8a57dd0a533a1831a1e2c345e929 Mon Sep 17 00:00:00 2001 From: Eduardo Apolinario Date: Tue, 14 May 2024 09:59:47 -0700 Subject: [PATCH 03/17] Pipe github token Signed-off-by: Eduardo Apolinario --- .github/workflows/f-release.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/f-release.yaml b/.github/workflows/f-release.yaml index c93d50320c..1ad0f0bcf0 100644 --- a/.github/workflows/f-release.yaml +++ b/.github/workflows/f-release.yaml @@ -17,4 +17,5 @@ jobs: with: distribution: goreleaser args: release --rm-dist - + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 660bfdf38349b305998fedf95c9ca0ac29f0af3a Mon Sep 17 00:00:00 2001 From: Eduardo Apolinario Date: Tue, 14 May 2024 10:29:21 -0700 Subject: [PATCH 04/17] Checkout repo Signed-off-by: Eduardo Apolinario --- .github/workflows/f-release.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/f-release.yaml b/.github/workflows/f-release.yaml index 1ad0f0bcf0..ea088ebb58 100644 --- a/.github/workflows/f-release.yaml +++ b/.github/workflows/f-release.yaml @@ -12,6 +12,9 @@ jobs: - name: test1 run: | echo ${GITHUB_REF#refs/tags/} + - uses: actions/checkout@v4 + with: + fetch-depth: "0" - name: Run GoReleaser uses: goreleaser/goreleaser-action@v5 with: From 277ad5080fb05a4dc9aac68e730936225294ec40 Mon Sep 17 00:00:00 2001 From: Eduardo Apolinario Date: Tue, 14 May 2024 10:44:21 -0700 Subject: [PATCH 05/17] Add f/.goreleaser.yml Signed-off-by: Eduardo Apolinario --- .github/workflows/f-release.yaml | 6 +++--- f/.goreleaser.yml | 28 ++++++++++++++++++++++++++++ 2 files changed, 31 insertions(+), 3 deletions(-) create mode 100644 f/.goreleaser.yml diff --git a/.github/workflows/f-release.yaml b/.github/workflows/f-release.yaml index ea088ebb58..95501cfaba 100644 --- a/.github/workflows/f-release.yaml +++ b/.github/workflows/f-release.yaml @@ -18,7 +18,7 @@ jobs: - name: Run GoReleaser uses: goreleaser/goreleaser-action@v5 with: - distribution: goreleaser - args: release --rm-dist + distribution: goreleaser-pro + args: release --rm-dist -f f/.goreleaser.yml env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }} diff --git a/f/.goreleaser.yml b/f/.goreleaser.yml new file mode 100644 index 0000000000..372bd239a2 --- /dev/null +++ b/f/.goreleaser.yml @@ -0,0 +1,28 @@ +project_name: eapolinario-flyte + +monorepo: + tag_prefix: abc/ + dir: f + +builds: + - skip: true +release: + github: + owner: eapolinario + name: flyte + draft: false + prerelease: auto + discussion_category_name: General + name_template: "Flyte v{{.Version}} milestone release" + disable: false + extra_files: + - glob: ./release/* +git: + ignore_tags: + - "datacatalog/*" + - "flyteadmin/*" + - "flytecopilot/*" + - "flyteidl/*" + - "flyteplugins/*" + - "flytepropeller/*" + - "flytestdlib/*" From f4736731c8a2d54b4bb1343d218927fae3cb7b20 Mon Sep 17 00:00:00 2001 From: Eduardo Apolinario Date: Tue, 14 May 2024 10:47:22 -0700 Subject: [PATCH 06/17] Add github token Signed-off-by: Eduardo Apolinario --- .github/workflows/f-release.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/f-release.yaml b/.github/workflows/f-release.yaml index 95501cfaba..4092b14fa7 100644 --- a/.github/workflows/f-release.yaml +++ b/.github/workflows/f-release.yaml @@ -21,4 +21,5 @@ jobs: distribution: goreleaser-pro args: release --rm-dist -f f/.goreleaser.yml env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }} From eb5c6b9dd4eb114678af9db58330298e1877bfb9 Mon Sep 17 00:00:00 2001 From: Eduardo Apolinario Date: Tue, 14 May 2024 10:57:45 -0700 Subject: [PATCH 07/17] Add sample gh workflow that skips a job if tag has a certain prefix Signed-off-by: Eduardo Apolinario --- .github/workflows/g-release.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 .github/workflows/g-release.yml diff --git a/.github/workflows/g-release.yml b/.github/workflows/g-release.yml new file mode 100644 index 0000000000..36ccd8c2c6 --- /dev/null +++ b/.github/workflows/g-release.yml @@ -0,0 +1,24 @@ +name: Release Workflow + +on: + release: + types: [published] + +jobs: + job1: + runs-on: ubuntu-latest + if: "!startsWith(github.event.release.tag_name, 'abc/')" + steps: + - name: Checkout repository + uses: actions/checkout@v2 + - name: Run a script + run: echo "This job runs unless the tag starts with 'abc/'" + + job2: + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v2 + - name: Always run this job + run: echo "This job always runs regardless of the tag prefix" + From 9bd9816b1399d9b78f3c96b1a86ac282c5e4ccca Mon Sep 17 00:00:00 2001 From: Eduardo Apolinario Date: Wed, 22 May 2024 11:09:22 -0700 Subject: [PATCH 08/17] Add flytectl install script Signed-off-by: Eduardo Apolinario --- .github/workflows/flytectl-install.yml | 27 ++ flytectl/install.sh | 558 +++++++++++++------------ 2 files changed, 328 insertions(+), 257 deletions(-) create mode 100644 .github/workflows/flytectl-install.yml diff --git a/.github/workflows/flytectl-install.yml b/.github/workflows/flytectl-install.yml new file mode 100644 index 0000000000..79eba5d964 --- /dev/null +++ b/.github/workflows/flytectl-install.yml @@ -0,0 +1,27 @@ +name: Flytectl-specific checks + +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + +on: + pull_request: + push: + branches: + - master + +jobs: + install-script: + name: Install script + runs-on: ${{ matrix.os }} + strategy: + os: + - ubuntu-latest + - macos-latest + - windows-latest + steps: + - uses: actions/checkout@v4 + - run: | + chmod +x ./flytectl/install.sh + ./flytectl/install.sh + diff --git a/flytectl/install.sh b/flytectl/install.sh index 3b46741391..f5c7ead82c 100755 --- a/flytectl/install.sh +++ b/flytectl/install.sh @@ -1,123 +1,132 @@ #!/bin/sh set -e -# Code generated by godownloader on 2021-10-24T11:29:26Z. DO NOT EDIT. +# Code generated by godownloader on 2021-10-24T11:29:26Z. +# ### WARNING +# Since godownloader is deprecated, we had to manually update the script to download the flytectl binary from the flyteorg/flyte repository. +# ### WARNING # usage() { - this=$1 - cat </dev/null + command -v "$1" >/dev/null } + echoerr() { - echo "$@" 1>&2 + echo "$@" 1>&2 } + log_prefix() { - echo "$0" + echo "$0" } + _logp=6 log_set_priority() { - _logp="$1" + _logp="$1" } + log_priority() { - if test -z "$1"; then - echo "$_logp" - return - fi - [ "$1" -le "$_logp" ] + if test -z "$1"; then + echo "$_logp" + return + fi + [ "$1" -le "$_logp" ] } + log_tag() { - case $1 in - 0) echo "emerg" ;; - 1) echo "alert" ;; - 2) echo "crit" ;; - 3) echo "err" ;; - 4) echo "warning" ;; - 5) echo "notice" ;; - 6) echo "info" ;; - 7) echo "debug" ;; - *) echo "$1" ;; - esac + case $1 in + 0) echo "emerg" ;; + 1) echo "alert" ;; + 2) echo "crit" ;; + 3) echo "err" ;; + 4) echo "warning" ;; + 5) echo "notice" ;; + 6) echo "info" ;; + 7) echo "debug" ;; + *) echo "$1" ;; + esac } + log_debug() { - log_priority 7 || return 0 - echoerr "$(log_prefix)" "$(log_tag 7)" "$@" + log_priority 7 || return 0 + echoerr "$(log_prefix)" "$(log_tag 7)" "$@" } + log_info() { - log_priority 6 || return 0 - echoerr "$(log_prefix)" "$(log_tag 6)" "$@" + log_priority 6 || return 0 + echoerr "$(log_prefix)" "$(log_tag 6)" "$@" } + log_err() { - log_priority 3 || return 0 - echoerr "$(log_prefix)" "$(log_tag 3)" "$@" + log_priority 3 || return 0 + echoerr "$(log_prefix)" "$(log_tag 3)" "$@" } + log_crit() { - log_priority 2 || return 0 - echoerr "$(log_prefix)" "$(log_tag 2)" "$@" + log_priority 2 || return 0 + echoerr "$(log_prefix)" "$(log_tag 2)" "$@" } + uname_os() { - os=$(uname -s | tr '[:upper:]' '[:lower:]') - case "$os" in - cygwin_nt*) os="windows" ;; - mingw*) os="windows" ;; - msys_nt*) os="windows" ;; - esac - echo "$os" + os=$(uname -s | tr '[:upper:]' '[:lower:]') + case "$os" in + cygwin_nt*) os="windows" ;; + mingw*) os="windows" ;; + msys_nt*) os="windows" ;; + esac + echo "$os" } + uname_arch() { - arch=$(uname -m) - case $arch in - x86_64) arch="amd64" ;; - x86) arch="386" ;; - i686) arch="386" ;; - i386) arch="386" ;; - aarch64) arch="arm64" ;; - armv5*) arch="armv5" ;; - armv6*) arch="armv6" ;; - armv7*) arch="armv7" ;; - esac - echo ${arch} + arch=$(uname -m) + case $arch in + x86_64) arch="amd64" ;; + x86) arch="386" ;; + i686) arch="386" ;; + i386) arch="386" ;; + aarch64) arch="arm64" ;; + armv5*) arch="armv5" ;; + armv6*) arch="armv6" ;; + armv7*) arch="armv7" ;; + esac + echo ${arch} } + uname_os_check() { - os=$(uname_os) - case "$os" in - darwin) return 0 ;; - dragonfly) return 0 ;; - freebsd) return 0 ;; - linux) return 0 ;; - android) return 0 ;; - nacl) return 0 ;; - netbsd) return 0 ;; - openbsd) return 0 ;; - plan9) return 0 ;; - solaris) return 0 ;; - windows) return 0 ;; - esac - log_crit "uname_os_check '$(uname -s)' got converted to '$os' which is not a GOOS value. Please file bug at https://github.com/client9/shlib" - return 1 + os=$(uname_os) + case "$os" in + darwin) return 0 ;; + dragonfly) return 0 ;; + freebsd) return 0 ;; + linux) return 0 ;; + android) return 0 ;; + nacl) return 0 ;; + netbsd) return 0 ;; + openbsd) return 0 ;; + plan9) return 0 ;; + solaris) return 0 ;; + windows) return 0 ;; + esac + log_crit "uname_os_check '$(uname -s)' got converted to '$os' which is not a GOOS value. Please file bug at https://github.com/client9/shlib" + return 1 } + uname_arch_check() { - arch=$(uname_arch) - case "$arch" in - 386) return 0 ;; - amd64) return 0 ;; - arm64) return 0 ;; - armv5) return 0 ;; - armv6) return 0 ;; - armv7) return 0 ;; - ppc64) return 0 ;; - ppc64le) return 0 ;; - mips) return 0 ;; - mipsle) return 0 ;; - mips64) return 0 ;; - mips64le) return 0 ;; - s390x) return 0 ;; - amd64p32) return 0 ;; - esac - log_crit "uname_arch_check '$(uname -m)' got converted to '$arch' which is not a GOARCH value. Please file bug report at https://github.com/client9/shlib" - return 1 + arch=$(uname_arch) + case "$arch" in + 386) return 0 ;; + amd64) return 0 ;; + arm64) return 0 ;; + armv5) return 0 ;; + armv6) return 0 ;; + armv7) return 0 ;; + ppc64) return 0 ;; + ppc64le) return 0 ;; + mips) return 0 ;; + mipsle) return 0 ;; + mips64) return 0 ;; + mips64le) return 0 ;; + s390x) return 0 ;; + amd64p32) return 0 ;; + esac + log_crit "uname_arch_check '$(uname -m)' got converted to '$arch' which is not a GOARCH value. Please file bug report at https://github.com/client9/shlib" + return 1 } + untar() { - tarball=$1 - case "${tarball}" in - *.tar.gz | *.tgz) tar --no-same-owner -xzf "${tarball}" ;; - *.tar) tar --no-same-owner -xf "${tarball}" ;; - *.zip) unzip "${tarball}" ;; - *) - log_err "untar unknown archive format for ${tarball}" - return 1 - ;; - esac + tarball=$1 + case "${tarball}" in + *.tar.gz | *.tgz) tar --no-same-owner -xzf "${tarball}" ;; + *.tar) tar --no-same-owner -xf "${tarball}" ;; + *.zip) unzip "${tarball}" ;; + *) + log_err "untar unknown archive format for ${tarball}" + return 1 + ;; + esac } + http_download_curl() { - local_file=$1 - source_url=$2 - header=$3 - if [ -z "$header" ]; then - code=$(curl -w '%{http_code}' -sL -o "$local_file" "$source_url") - else - code=$(curl -w '%{http_code}' -sL -H "$header" -o "$local_file" "$source_url") - fi - if [ "$code" != "200" ]; then - log_debug "http_download_curl received HTTP status $code" - return 1 - fi - return 0 + local_file=$1 + source_url=$2 + header=$3 + if [ -z "$header" ]; then + code=$(curl -w '%{http_code}' -sL -o "$local_file" "$source_url") + else + code=$(curl -w '%{http_code}' -sL -H "$header" -o "$local_file" "$source_url") + fi + if [ "$code" != "200" ]; then + log_debug "http_download_curl received HTTP status $code" + return 1 + fi + return 0 } + http_download_wget() { - local_file=$1 - source_url=$2 - header=$3 - if [ -z "$header" ]; then - wget -q -O "$local_file" "$source_url" - else - wget -q --header "$header" -O "$local_file" "$source_url" - fi + local_file=$1 + source_url=$2 + header=$3 + if [ -z "$header" ]; then + wget -q -O "$local_file" "$source_url" + else + wget -q --header "$header" -O "$local_file" "$source_url" + fi } + http_download() { - log_debug "http_download $2" - if is_command curl; then - http_download_curl "$@" - return - elif is_command wget; then - http_download_wget "$@" - return - fi - log_crit "http_download unable to find wget or curl" - return 1 + log_debug "http_download $2" + if is_command curl; then + http_download_curl "$@" + return + elif is_command wget; then + http_download_wget "$@" + return + fi + log_crit "http_download unable to find wget or curl" + return 1 } + http_copy() { - tmp=$(mktemp) - http_download "${tmp}" "$1" "$2" || return 1 - body=$(cat "$tmp") - rm -f "${tmp}" - echo "$body" + tmp=$(mktemp) + http_download "${tmp}" "$1" "$2" || return 1 + # $tmp is an array of dicts where each dict contains a tag_name. + # Assume that we can pull the tag_name out of the json using `jq`. + # We want to filter out the elements that do not have a tag_name prefixed + # with `flytectl/`. + body=$(cat "$tmp" | jq 'map(select(.tag_name | startswith("flytectl/"))) | .[].tag_name') + rm -f "${tmp}" + echo "$body" } + github_release() { - owner_repo=$1 - version=$2 - test -z "$version" && version="latest" - giturl="https://github.com/${owner_repo}/releases/${version}" - json=$(http_copy "$giturl" "Accept:application/json") - test -z "$json" && return 1 - version=$(echo "$json" | tr -s '\n' ' ' | sed 's/.*"tag_name":"//' | sed 's/".*//') - test -z "$version" && return 1 - echo "$version" + owner_repo=$1 + version=$2 + test -z "$version" && version="latest" + giturl="https://api.github.com/repos/${owner_repo}/releases" + json=$(http_copy "$giturl" "Accept:application/json") + test -z "$json" && return 1 + if [ "$version" = "latest" ]; then + # Get the first element of the filtered json array + version=$(echo "$json" | head -n 1 | sed 's/"flytectl\///' | sed 's/"//') + else + # Get the element of the filtered json array that matches the version + version=$(echo "$json" | grep -oE '"flytectl/'"$version"'"' | sed 's/"flytectl\///' | sed 's/"//') + fi + test -z "$version" && return 1 + # Notice that we're prepending "flytectl/" to the found version. That prefix is part of the asset used + # to download the flytectl binary. + echo "flytectl/$version" } + hash_sha256() { - TARGET=${1:-/dev/stdin} - if is_command gsha256sum; then - hash=$(gsha256sum "$TARGET") || return 1 - echo "$hash" | cut -d ' ' -f 1 - elif is_command sha256sum; then - hash=$(sha256sum "$TARGET") || return 1 - echo "$hash" | cut -d ' ' -f 1 - elif is_command shasum; then - hash=$(shasum -a 256 "$TARGET" 2>/dev/null) || return 1 - echo "$hash" | cut -d ' ' -f 1 - elif is_command openssl; then - hash=$(openssl -dst openssl dgst -sha256 "$TARGET") || return 1 - echo "$hash" | cut -d ' ' -f a - else - log_crit "hash_sha256 unable to find command to compute sha-256 hash" - return 1 - fi + TARGET=${1:-/dev/stdin} + if is_command gsha256sum; then + hash=$(gsha256sum "$TARGET") || return 1 + echo "$hash" | cut -d ' ' -f 1 + elif is_command sha256sum; then + hash=$(sha256sum "$TARGET") || return 1 + echo "$hash" | cut -d ' ' -f 1 + elif is_command shasum; then + hash=$(shasum -a 256 "$TARGET" 2>/dev/null) || return 1 + echo "$hash" | cut -d ' ' -f 1 + elif is_command openssl; then + hash=$(openssl -dst openssl dgst -sha256 "$TARGET") || return 1 + echo "$hash" | cut -d ' ' -f a + else + log_crit "hash_sha256 unable to find command to compute sha-256 hash" + return 1 + fi } + hash_sha256_verify() { - TARGET=$1 - checksums=$2 - if [ -z "$checksums" ]; then - log_err "hash_sha256_verify checksum file not specified in arg2" - return 1 - fi - BASENAME=${TARGET##*/} - want=$(grep "${BASENAME}" "${checksums}" 2>/dev/null | tr '\t' ' ' | cut -d ' ' -f 1) - if [ -z "$want" ]; then - log_err "hash_sha256_verify unable to find checksum for '${TARGET}' in '${checksums}'" - return 1 - fi - got=$(hash_sha256 "$TARGET") - if [ "$want" != "$got" ]; then - log_err "hash_sha256_verify checksum for '$TARGET' did not verify ${want} vs $got" - return 1 - fi + TARGET=$1 + checksums=$2 + if [ -z "$checksums" ]; then + log_err "hash_sha256_verify checksum file not specified in arg2" + return 1 + fi + BASENAME=${TARGET##*/} + want=$(grep "${BASENAME}" "${checksums}" 2>/dev/null | tr '\t' ' ' | cut -d ' ' -f 1) + if [ -z "$want" ]; then + log_err "hash_sha256_verify unable to find checksum for '${TARGET}' in '${checksums}'" + return 1 + fi + got=$(hash_sha256 "$TARGET") + if [ "$want" != "$got" ]; then + log_err "hash_sha256_verify checksum for '$TARGET' did not verify ${want} vs $got" + return 1 + fi } + cat /dev/null < Date: Wed, 22 May 2024 11:10:47 -0700 Subject: [PATCH 09/17] Add matrix Signed-off-by: Eduardo Apolinario --- .github/workflows/flytectl-install.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/flytectl-install.yml b/.github/workflows/flytectl-install.yml index 79eba5d964..c749b856ac 100644 --- a/.github/workflows/flytectl-install.yml +++ b/.github/workflows/flytectl-install.yml @@ -15,10 +15,11 @@ jobs: name: Install script runs-on: ${{ matrix.os }} strategy: - os: - - ubuntu-latest - - macos-latest - - windows-latest + matrix: + os: + - ubuntu-latest + - macos-latest + - windows-latest steps: - uses: actions/checkout@v4 - run: | From 2c68d29ecc10fde474161e6eacaff34ed8cc1023 Mon Sep 17 00:00:00 2001 From: Eduardo Apolinario Date: Wed, 22 May 2024 11:12:07 -0700 Subject: [PATCH 10/17] Run flytectl version Signed-off-by: Eduardo Apolinario --- .github/workflows/flytectl-install.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/flytectl-install.yml b/.github/workflows/flytectl-install.yml index c749b856ac..c8fe7ea708 100644 --- a/.github/workflows/flytectl-install.yml +++ b/.github/workflows/flytectl-install.yml @@ -25,4 +25,5 @@ jobs: - run: | chmod +x ./flytectl/install.sh ./flytectl/install.sh + ./bin/flytectl version From 7ad2a0201c7c6b2181e17656bb5555ebd7a306c8 Mon Sep 17 00:00:00 2001 From: Eduardo Apolinario Date: Wed, 22 May 2024 11:14:50 -0700 Subject: [PATCH 11/17] Do not fail-fast Signed-off-by: Eduardo Apolinario --- .github/workflows/flytectl-install.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/flytectl-install.yml b/.github/workflows/flytectl-install.yml index c8fe7ea708..66567c62bb 100644 --- a/.github/workflows/flytectl-install.yml +++ b/.github/workflows/flytectl-install.yml @@ -15,6 +15,7 @@ jobs: name: Install script runs-on: ${{ matrix.os }} strategy: + fail-fast: false matrix: os: - ubuntu-latest From 5da2e8c9c5f79997f5d42de931b5ad4ce21276c9 Mon Sep 17 00:00:00 2001 From: Eduardo Apolinario Date: Wed, 22 May 2024 13:22:19 -0700 Subject: [PATCH 12/17] Test multiple versiosn Signed-off-by: Eduardo Apolinario --- .github/workflows/flytectl-install.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/flytectl-install.yml b/.github/workflows/flytectl-install.yml index 66567c62bb..2b34c09470 100644 --- a/.github/workflows/flytectl-install.yml +++ b/.github/workflows/flytectl-install.yml @@ -20,11 +20,15 @@ jobs: os: - ubuntu-latest - macos-latest - - windows-latest + version: + - v0.8.20 + - latest + # Test the case where no version is specified + - " " steps: - uses: actions/checkout@v4 - run: | chmod +x ./flytectl/install.sh - ./flytectl/install.sh + ./flytectl/install.sh ${{ matrix.version }} ./bin/flytectl version From 752123b3e7f98d6b1dea817d154ed95927ed11e5 Mon Sep 17 00:00:00 2001 From: Eduardo Apolinario Date: Wed, 22 May 2024 13:27:09 -0700 Subject: [PATCH 13/17] Only run these in PR if a flytectl file is modified Signed-off-by: Eduardo Apolinario --- .github/workflows/flytectl-install.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/flytectl-install.yml b/.github/workflows/flytectl-install.yml index 2b34c09470..d0fbfce67a 100644 --- a/.github/workflows/flytectl-install.yml +++ b/.github/workflows/flytectl-install.yml @@ -6,6 +6,8 @@ concurrency: on: pull_request: + paths: + - flytectly/** push: branches: - master From 29a8fea036b39faa7eb67705f4e02a4d5653620a Mon Sep 17 00:00:00 2001 From: Eduardo Apolinario Date: Wed, 22 May 2024 13:29:34 -0700 Subject: [PATCH 14/17] Fix typo in path Signed-off-by: Eduardo Apolinario --- .github/workflows/flytectl-install.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/flytectl-install.yml b/.github/workflows/flytectl-install.yml index d0fbfce67a..69dee616b8 100644 --- a/.github/workflows/flytectl-install.yml +++ b/.github/workflows/flytectl-install.yml @@ -7,7 +7,7 @@ concurrency: on: pull_request: paths: - - flytectly/** + - flytectl/** push: branches: - master From f5eaca3c94c079f593317e5173e553f87f663761 Mon Sep 17 00:00:00 2001 From: Eduardo Apolinario Date: Wed, 22 May 2024 13:32:07 -0700 Subject: [PATCH 15/17] Add retries Signed-off-by: Eduardo Apolinario --- .github/workflows/flytectl-install.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/flytectl-install.yml b/.github/workflows/flytectl-install.yml index 69dee616b8..01864b3ecb 100644 --- a/.github/workflows/flytectl-install.yml +++ b/.github/workflows/flytectl-install.yml @@ -33,4 +33,7 @@ jobs: chmod +x ./flytectl/install.sh ./flytectl/install.sh ${{ matrix.version }} ./bin/flytectl version + retry: + max-tries: 3 + delay: 5 From 4d1428b8caaa1254b62284f1630aca6f930ec278 Mon Sep 17 00:00:00 2001 From: Eduardo Apolinario Date: Wed, 22 May 2024 13:33:58 -0700 Subject: [PATCH 16/17] Set retries another way Signed-off-by: Eduardo Apolinario --- .github/workflows/flytectl-install.yml | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/.github/workflows/flytectl-install.yml b/.github/workflows/flytectl-install.yml index 01864b3ecb..3b9e6476b9 100644 --- a/.github/workflows/flytectl-install.yml +++ b/.github/workflows/flytectl-install.yml @@ -29,11 +29,12 @@ jobs: - " " steps: - uses: actions/checkout@v4 - - run: | - chmod +x ./flytectl/install.sh - ./flytectl/install.sh ${{ matrix.version }} - ./bin/flytectl version - retry: - max-tries: 3 - delay: 5 + - uses: nick-fields/retry@v3 + with: + timeout_seconds: 15 + max_attempts: 3 + command: | + chmod +x ./flytectl/install.sh + ./flytectl/install.sh ${{ matrix.version }} + ./bin/flytectl version From 09466b430c27aa113bb635e60983e50d6c91deef Mon Sep 17 00:00:00 2001 From: Eduardo Apolinario Date: Wed, 22 May 2024 13:37:33 -0700 Subject: [PATCH 17/17] Set retries yet another way Signed-off-by: Eduardo Apolinario --- .github/workflows/flytectl-install.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/flytectl-install.yml b/.github/workflows/flytectl-install.yml index 3b9e6476b9..1ac10edb49 100644 --- a/.github/workflows/flytectl-install.yml +++ b/.github/workflows/flytectl-install.yml @@ -33,8 +33,5 @@ jobs: with: timeout_seconds: 15 max_attempts: 3 - command: | - chmod +x ./flytectl/install.sh - ./flytectl/install.sh ${{ matrix.version }} - ./bin/flytectl version + command: chmod +x ./flytectl/install.sh && ./flytectl/install.sh ${{ matrix.version }} && ./bin/flytectl version