diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index dbb3e5b2c..2e3ddf5fc 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -272,31 +272,6 @@ jobs: --timeout 10m \ -r us-west-1 - apitest: - needs: build - runs-on: ubuntu-latest - # apitest is not publicly released so let's be a bit lax during pre-release - continue-on-error: true - env: - BUILD_ID: ${{ github.run_id }} - BUILD_ENV: GitHub Actions - - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Download saucectl Binary - uses: actions/download-artifact@v4 - with: - name: saucectlbin - - - name: Set permissions - run: chmod +x ./saucectl - - - name: Saucectl RUN - Config Driven - run: | - ./saucectl run -c .sauce/apitest.yml -r us-west-1 - playwright-cucumberjs: needs: build runs-on: ubuntu-latest diff --git a/.sauce/apitest.yml b/.sauce/apitest.yml deleted file mode 100644 index 319e616fc..000000000 --- a/.sauce/apitest.yml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: v1alpha -kind: apitest -sauce: - region: us-west-1 - metadata: - build: "$BUILD_ID" - # tunnel: - # name: tunnelname - # owner: tunnelowner - -suites: - - name: "Run all tests" - projectName: saucectl-example - useRemoteTests: true - - - name: "Run a tag for saucectl-example" - projectName: saucectl-example - useRemoteTests: true - tags: - - flakey - - - name: "Run a single test for saucectl-example" - projectName: saucectl-example - useRemoteTests: true - tests: - - 6308e6d4c08b875edeee138e diff --git a/internal/saucecloud/cloud.go b/internal/saucecloud/cloud.go index 150aac872..19047f931 100644 --- a/internal/saucecloud/cloud.go +++ b/internal/saucecloud/cloud.go @@ -314,8 +314,8 @@ func shouldRetryJob(jobData job.Job, skipped bool) bool { } // shouldRetry determines whether a job should be retried. -func shouldRetry(opts job.StartOptions, jobData job.Job, skipped bool) bool { - return belowRetryLimit(opts) && +func (r *CloudRunner) shouldRetry(opts job.StartOptions, jobData job.Job, skipped bool) bool { + return !r.Async && belowRetryLimit(opts) && (shouldRetryJob(jobData, skipped) || belowThreshold(opts)) } @@ -353,7 +353,7 @@ func (r *CloudRunner) runJobs(jobOpts chan job.StartOptions, results chan<- resu opts.CurrentPassCount++ } - if shouldRetry(opts, jobData, skipped) { + if r.shouldRetry(opts, jobData, skipped) { go r.JobService.DownloadArtifact(jobData, false) if !jobData.Passed { log.Warn().Err(err).Msg("Suite errored.")