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

add retry in smoke test #288

Merged
merged 3 commits into from
Jun 23, 2021
Merged

add retry in smoke test #288

merged 3 commits into from
Jun 23, 2021

Conversation

wangzlei
Copy link
Contributor

Issue #, if available:
Github action might have random dependency downloading failure. Add retry to reduce false alarmm

Description of changes:

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@wangzlei
Copy link
Contributor Author

aws-otel-lambda canary failure has been solved by adding retry
https://github.com/aws-observability/aws-otel-lambda/actions/workflows/canary.yml

@@ -32,7 +32,11 @@ jobs:

- name: Run smoke tests
id: distribution-availability
run: ./gradlew :smoke-tests:check -PtestDistributionChannel=true
uses: nick-invision/retry@v2
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should avoid random third party actions if possible, especially in a distribution channel monitor. I think we can update the cache action to cache dependencies as well instead

Copy link
Contributor Author

@wangzlei wangzlei Jun 17, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Github action may occur downloading failure in anywhere, not only gradle.zip, if we cannot predict which part would get failure it is hard to add cache, now we just see an error then add cache on it. Also, adding more cache will inflate CI/CD code.

When we testing if the target binary/dependency is available, say xray-java-sdk in this case, we cannot add cache for it. Retry might be the only way to mitigate false download failure.

@wangzlei wangzlei requested a review from anuraaga June 22, 2021 22:59
Copy link
Contributor

@NathanielRN NathanielRN left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very slick use of shell commands :)

(echo "===== Attempt: 1 ====" && ./gradlew :smoke-tests:check -PtestDistributionChannel=true) || \
(echo "===== Attempt: 2 ====" && ./gradlew :smoke-tests:check -PtestDistributionChannel=true) || \
(echo "===== Attempt: 3 ====" && ./gradlew :smoke-tests:check -PtestDistributionChannel=true) || \
(echo "===== Failed ====" && exit 1)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
(echo "===== Failed ====" && exit 1)
(echo "===== No more retries. Failed. ====" && exit 1)

@codecov-commenter
Copy link

Codecov Report

Merging #288 (6f3729e) into master (836654a) will decrease coverage by 0.05%.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #288      +/-   ##
============================================
- Coverage     58.92%   58.86%   -0.06%     
  Complexity     1202     1202              
============================================
  Files           131      131              
  Lines          5056     5056              
  Branches        588      588              
============================================
- Hits           2979     2976       -3     
- Misses         1804     1807       +3     
  Partials        273      273              
Impacted Files Coverage Δ
...va/com/amazonaws/xray/entities/SubsegmentImpl.java 70.58% <0.00%> (-4.42%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 836654a...6f3729e. Read the comment docs.

@wangzlei wangzlei merged commit 5143932 into aws:master Jun 23, 2021
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

Successfully merging this pull request may close these issues.

4 participants