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

Intermittant Setup-Sam Failures #91

Closed
Bhutania opened this issue Dec 12, 2023 · 4 comments
Closed

Intermittant Setup-Sam Failures #91

Bhutania opened this issue Dec 12, 2023 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@Bhutania
Copy link

Hi 👋🏽 ,

Not sure if this is the right place to post this issue or in actions/runner (or runner-images), but I figured I would post here first to rule out issues with the action itself.

I am experiencing somewhat intermittent failures when trying to setup sam on an ubuntu-22.04 runner from github.

Action Setup:

name: Setup sam.

description: Sets up AWS SAM with retries.

runs:
  using: "composite"
  steps:
    - uses: aws-actions/setup-sam@v2
      id: setup1
      continue-on-error: true
      with:
        use-installer: true

    - run: echo "SAM Setup Failed, 10 Second Timeout" && sleep 10
      if: ${{ steps.setup1.outcome == 'failure' }}
      shell: bash

    - uses: aws-actions/setup-sam@v2
      id: setup2
      continue-on-error: true
      if: ${{ steps.setup1.outcome == 'failure' }}
      with:
        use-installer: true

    - run: echo "SAM Setup Failed, 10 Second Timeout" && sleep 10
      if: ${{ steps.setup2.outcome == 'failure' }}
      shell: bash

    - uses: aws-actions/setup-sam@v2
      id: setup3
      if: ${{ steps.setup2.outcome == 'failure' }}
      with:
        use-installer: true

Here is a copy of the runner info for the last failure:

  Image: ubuntu-22.04
  Version: 20231205.1.0

Error message and retries:

Run aws-actions/setup-sam@v2
Error: Error:
/usr/bin/unzip -o -q /home/runner/work/_temp/5416c708-9217-4057-8852-a01b225e1e32
Run echo "SAM Setup Failed, 10 Second Timeout" && sleep 10
SAM Setup Failed, 10 Second Timeout
Run aws-actions/setup-sam@v2
Error: Error:
/usr/bin/unzip -o -q /home/runner/work/_temp/4dc53d00-a7c1-471e-bd54-f43ae8e8dd0e
Run echo "SAM Setup Failed, 10 Second Timeout" && sleep 10
SAM Setup Failed, 10 Second Timeout
Run aws-actions/setup-sam@v2
Error: Error:
/usr/bin/unzip -o -q /home/runner/work/_temp/d4efffda-8428-4661-9417-b86ad0e9ab7b

Unfortunately because of the issue's intermittent nature, I haven't been able to reproduce with debug logging. I'll keep trying though.

Normally the setup task is fine and has an output like this:
image

I would appreciate it someone had any insight into this issue, or could point me in the right direction.

Thanks,
Arnav

@juho9000
Copy link

We're running into the same issue. Installing with Python seems to work, but we'd prefer not to do that. Running with debug logging does not give any more information, it shows you the unzip process and then the exact same failure. It seems to be able to unzip all files in the archive too based on the output.

@GavinZZ
Copy link
Contributor

GavinZZ commented Jan 2, 2024

Hi @Bhutania and @juho9000 , thanks for cutting an issue. After some investigation, this seems to be due to a recent change to support caching when not specifying the SAM CLI version number. I'll need to look into it a bit more to figure out the exact issue.

If the intermittant failure is bugging you, please specify a version for now as a workaround until I push a fix.

with:
    use-installer: true
    version: "1.105.0"
@GavinZZ
Copy link
Contributor

GavinZZ commented Jan 3, 2024

Pushed a fix in this PR. #93

When I enable caching when version is not specified in #91, I accidentally set the state to failed when failing to get latest SAM CLI release tag. Should just log the error and continue instead.

After the PR is merged, you do not need to use the workaround I mentioned above. Apologize for any inconvenience.

@GavinZZ GavinZZ self-assigned this Jan 3, 2024
@GavinZZ GavinZZ added the bug Something isn't working label Jan 3, 2024
@GavinZZ
Copy link
Contributor

GavinZZ commented Jan 3, 2024

Going to close this issue as I believe it's fixed. Feel free to open another issue if this is still happening.

@GavinZZ GavinZZ closed this as completed Jan 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
3 participants