From fa10cb4787e153bdb748ddeea4310f36897bb93c Mon Sep 17 00:00:00 2001 From: Safeer Jiwan Date: Tue, 8 Oct 2024 14:09:27 -0700 Subject: [PATCH] fix --- .github/workflows/smoketest.yml | 52 ++++++++++++++----------- smoketest/exemplar_smoke_test.go | 2 +- smoketest/smoketest_integration_test.go | 2 +- 3 files changed, 31 insertions(+), 25 deletions(-) diff --git a/.github/workflows/smoketest.yml b/.github/workflows/smoketest.yml index 252b40654d..4966a7c313 100644 --- a/.github/workflows/smoketest.yml +++ b/.github/workflows/smoketest.yml @@ -21,33 +21,21 @@ jobs: run: | latest_release=$(git tag --sort=-v:refname | grep -v v1 | head -n 1) echo "Latest release: $latest_release" - echo "LATEST_RELEASE=$latest_release" >> "$GITHUB_ENV" + echo "LATEST_VERSION=${latest_release#v}" >> "$GITHUB_ENV" - name: Check out the last tagged release uses: actions/checkout@v4 with: - ref: ${{ env.LATEST_RELEASE }} + ref: v${{ env.LATEST_VERSION }} fetch-depth: 1 fetch-tags: true - - name: Download the release images - uses: dsaltares/fetch-gh-release-asset@master - with: - repo: TBD54566975/ftl.git - version: tags/${{ env.LATEST_RELEASE }} - file: ftl-${{ env.LATEST_RELEASE:1 }}.linux-arm64.tar.gz - token: ${{ secrets.GITHUB_TOKEN }} - target: last-release.linux-arm64.tar.gz - - name: Replace deployment with release images - run: | - set -euo pipefail - ls -al . - mkdir -p last-release - tar -xzf last-release.linux-arm64.tar.gz -C last-release - if [ ! -f last-release/ftl ]; then - echo "Error: 'ftl' binary not found in the extracted files." - exit 1 - fi - cp last-release/ftl ./build/devel/ftl - cp last-release/ftl ./build/release/ftl + # - name: Download the release images + # uses: dsaltares/fetch-gh-release-asset@master + # with: + # repo: TBD54566975/ftl.git + # version: tags/v${{ env.LATEST_VERSION }} + # file: ftl-${{ env.LATEST_VERSION }}.linux-arm64.tar.gz + # token: ${{ secrets.GITHUB_TOKEN }} + # target: last-release.linux-arm64.tar.gz - name: Check out the current smoke test uses: actions/checkout@v4 with: @@ -76,7 +64,25 @@ jobs: echo "Replacing released exemplar with current exemplar" rm -r ./smoketest && mv ./tmpsmoketest/smoketest ./smoketest && rm -r ./tmpsmoketest echo "Running current smoke test on the tagged release" - go test -v -tags smoketest -run '^Test' ./smoketest + go test -v -tags integration -run '^Test' ./smoketest + - name: Download the last tagged release asset + run: | + set -euo pipefail + release_url="https://github.com/TBD54566975/ftl/releases/download/v${{ env.LATEST_VERSION }}/ftl-${{ env.LATEST_VERSION }}.linux-amd64.tar.gz" + echo "Fetching latest release asset from: $release_url" + curl -L "$release_url" --output last-release.linux-amd64.tar.gz + - name: Replace deployment with release images + run: | + set -euo pipefail + ls -al . + mkdir -p last-release + tar -xzf last-release.linux-amd64.tar.gz -C last-release + if [ ! -f last-release/ftl ]; then + echo "Error: 'ftl' binary not found in the extracted files." + exit 1 + fi + cp last-release/ftl ./build/devel/ftl + cp last-release/ftl ./build/release/ftl # Next step is to build the FTL from HEAD, deploy it to the cluster, and run the smoke test - name: Archive Report uses: actions/upload-artifact@v4 diff --git a/smoketest/exemplar_smoke_test.go b/smoketest/exemplar_smoke_test.go index d2c8ce8d22..241013b417 100644 --- a/smoketest/exemplar_smoke_test.go +++ b/smoketest/exemplar_smoke_test.go @@ -1,4 +1,4 @@ -//go:build smoketest +//go:build integration package smoketest diff --git a/smoketest/smoketest_integration_test.go b/smoketest/smoketest_integration_test.go index 29b28b138c..9ee9c0704d 100644 --- a/smoketest/smoketest_integration_test.go +++ b/smoketest/smoketest_integration_test.go @@ -15,7 +15,7 @@ import ( in "github.com/TBD54566975/ftl/internal/integration" ) -func TestExemplar(t *testing.T) { +func DisabledTestExemplar(t *testing.T) { tmpDir := t.TempDir() logFilePath := filepath.Join(tmpDir, "smoketest.log")