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

Retry_condition - composed condition not working? #176

Open
tiagogameiro-diconium opened this issue Nov 11, 2024 · 1 comment
Open

Retry_condition - composed condition not working? #176

tiagogameiro-diconium opened this issue Nov 11, 2024 · 1 comment

Comments

@tiagogameiro-diconium
Copy link

tiagogameiro-diconium commented Nov 11, 2024

Hi there, I am facing an issue when trying to use a composed condition on the retry_condition with command.

Here's an example:

Working scenario (only a single condition):

  - name: Step 1
    uses: Wandalen/wretry.action@8ceaefd717b7cdae4f2637f9a433242ade421a0a
    with:
      command: |
        chmod +x .github/scripts/test.sh
        .github/scripts/test.sh
      retry_condition: steps._this.outputs.status != 'FAILED'
      attempt_limit: 10
      attempt_delay: 2000

Non-Working scenario (composed condition):

  - name: Step 1
    uses: Wandalen/wretry.action@8ceaefd717b7cdae4f2637f9a433242ade421a0a
    with:
      command: |
        chmod +x .github/scripts/test.sh
        .github/scripts/test.sh
      retry_condition: steps._this.outputs.status != 'FAILED' && steps._this.outputs.status != 'WARN'
      attempt_limit: 10
      attempt_delay: 2000

in the scenario that works, the retries are interrupted when the status is FAILED, as expected.
My goal however, is that the retries are interrupted if the status is either FAILED or WARN, hence the composed condition, but it seems its not evaluating correctly the condition because it still retries the 10 times.

For reference, here's my test.sh script:

echo "Running check..."
echo "status=FAILED" >> "${GITHUB_OUTPUT}"
exit 1

Do you have any idea? Thanks in advance

@dmvict
Copy link
Collaborator

dmvict commented Nov 11, 2024

Hello @tiagogameiro-diconium

Thank you for your issue. I'll check it a bit later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants