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

Artifacts are downloaded on v0.183.0 only if at least a single failure occurred during the run #938

Closed
SmialyKot opened this issue Aug 20, 2024 · 2 comments
Labels
bug Something isn't working triage Needs triage

Comments

@SmialyKot
Copy link

SmialyKot commented Aug 20, 2024

Description

After updating to the latest saucectl in saucectl-run-action downloading artifacts became flaky - sometimes it downloads the artifacts as specified in config, usually it doesn't. We upload those artifacts to gh actions after finishing the test.

Config to reproduce

This is how we declare artifact download in config.yml:

artifacts:
  download:
    when: always
    match:
      - junit.xml
    directory: ./test-results/saucelabs-results/
  cleanup: true

And this is how we run our Espresso tests on real Android devices via Github Actions:

- name: Run tests
  uses: saucelabs/saucectl-run-action@v4
  env:
    GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
  with:
    timeout: 90m
    saucectl-version: v0.183.0

- name: Upload tests result
  if: ${{ (success() || failure()) }}
  uses: actions/upload-artifact@v4
  with:
    name: some_unique_name
    path: test-results/
    retention-days: 2
    overwrite: true

The following warning is issued by the upload-artifact step:

No files were found with the provided path: test-results/. No artifacts will be uploaded.

The interesting part is that sometimes results are downloaded - we run 6 jobs in parallel, some of them end up uploading results, most of them don't. They are not always the same jobs.

Desired behavior

After reverting saucectl to v0.182.0 everything goes back to normal - all test results are always downloaded and uploaded as expected. This is a regression strictly in v0.183.0 version.

Versions

  • saucectl-run-action@v4
  • saucectl v0.183.0
  • Ubuntu 20.04
@SmialyKot
Copy link
Author

After further investigation it turns out that download is not flaky, it's just that the junit.xml result is only downloaded if there was at least a single failure during testing - we use smartRetry for failed tests so the job itself was successful. Since we specify to always download test results it makes no sense that they are downloaded only if there was a failure during the run.

@SmialyKot SmialyKot changed the title Flaky artifacts download on v0.183.0 with Espresso tests Artifacts are downloaded on v0.183.0 only if at least a single failure occurred during the run Aug 21, 2024
@alexplischke alexplischke added triage Needs triage bug Something isn't working labels Aug 30, 2024
@alexplischke
Copy link
Contributor

Addressed via #943. Thank you for reporting this issue!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working triage Needs triage
Projects
None yet
Development

No branches or pull requests

2 participants