Skip to content

Retry code coverage upload 3 times and don't fail build #108

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

Merged
merged 8 commits into from
Aug 12, 2020

Conversation

brpowell
Copy link
Contributor

What does this PR do?

Since uploading code coverage to codecov.io can be flaky with connection issues, this script retries an additional 2 times which is often all it takes to succeed. If it fails after 3 tries the job will still exit 0 to not fail the build.

What issues does this PR fix or reference?

@W-7939127@

@brpowell brpowell requested a review from a team as a code owner August 11, 2020 23:34
message += ' - trying again...';
}
console.log(message);
console.log(e.message)
Copy link
Contributor

Choose a reason for hiding this comment

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

nit

Suggested change
console.log(e.message)
console.log(e.message);

@@ -0,0 +1,22 @@
const { execSilent } = require('./util');
Copy link
Contributor

Choose a reason for hiding this comment

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

shebang and wait for @lcampos for license comment :)

@@ -67,7 +67,7 @@
"local:install": "./scripts/localInstall.js install",
"local:link": "./scripts/localInstall.js link",
"local:unlink": "./scripts/localInstall.js unlink",
"test": "shx rm -rf ./test-results && nyc mocha && node ./scripts/verifyTestArtifacts",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed verifyTestArtifacts script because this used to help guard against silent compile errors in the test job. Now that we removed ts-node and compile tests in the build phase, we have that protection "built in" now.

@@ -0,0 +1,32 @@
#!/usr/bin/env node
Copy link
Contributor

Choose a reason for hiding this comment

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

We might want to change the perms on this file so it's executable, similar to the publish.js script (-rwxr-xr-x vs -rw-r--r--)

Copy link
Contributor

@lcampos lcampos left a comment

Choose a reason for hiding this comment

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

Left a small comment on file perm, everything else looks good.

@brpowell brpowell merged commit f20c9c6 into develop Aug 12, 2020
@brpowell brpowell deleted the bp/codeCovRetry branch August 12, 2020 16:28
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.

3 participants