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

Fix codecov coverage data upload #558

Merged
merged 3 commits into from Jun 3, 2020
Merged

Fix codecov coverage data upload #558

merged 3 commits into from Jun 3, 2020

Conversation

Kami
Copy link
Contributor

@Kami Kami commented Jun 3, 2020

This pull request fixes codecov coverage data uploads.

Background, Context

Codecov coverage upload started to fail with "400 bad request" error a couple of days ago (https://app.circleci.com/pipelines/github/scalyr/scalyr-agent-2/2930/workflows/05136b23-cf27-41ed-8b69-74bce5c4cdec/jobs/40054/parallel-runs/0/steps/0-108).

It looks like it's an issue with the version of the client we are currently using and a new one should fix it - codecov/codecov-python#268.

One of the reasons why we didn't spot this issue earlier was that we didn't consider "codecov data upload fatal" error as fatal.

I fixed that by adding --required flag to codecov binary which will make it return with non-zero if the upload fails. This way we will spot issues like that sooner.

@codecov
Copy link

codecov bot commented Jun 3, 2020

Codecov Report

Merging #558 into master will increase coverage by 6.79%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #558      +/-   ##
==========================================
+ Coverage   68.76%   75.55%   +6.79%     
==========================================
  Files         159      159              
  Lines       30882    30882              
  Branches     3591     3591              
==========================================
+ Hits        21234    23330    +2096     
+ Misses       8950     6947    -2003     
+ Partials      698      605      -93     
Impacted Files Coverage Δ
...s/unit/builtin_monitors/kubernetes_monitor_test.py 97.78% <0.00%> (ø)
scalyr_agent/util.py 86.27% <0.00%> (+2.57%) ⬆️
scalyr_agent/builtin_monitors/url_monitor.py 75.49% <0.00%> (+2.94%) ⬆️
scalyr_agent/scalyr_monitor.py 90.42% <0.00%> (+2.99%) ⬆️
scalyr_agent/config_util.py 86.72% <0.00%> (+3.12%) ⬆️
scalyr_agent/log_processing.py 89.11% <0.00%> (+3.27%) ⬆️
scalyr_agent/json_lib/objects.py 90.64% <0.00%> (+3.40%) ⬆️
scalyr_agent/builtin_monitors/shell_monitor.py 94.55% <0.00%> (+3.64%) ⬆️
scalyr_agent/profiler.py 65.07% <0.00%> (+3.83%) ⬆️
scalyr_agent/monitors_manager.py 88.89% <0.00%> (+3.92%) ⬆️
... and 24 more

@@ -22,7 +22,8 @@ RETRY_DELAY=${RETRY_DELAY:-5}

# Work around for temporary codecov API timing out
for (( i=0; i<$MAX_ATTEMPTS; ++i)); do
codecov --root=/home/circleci/scalyr-agent-2/ --disable gcov --file coverage.xml
# NOTE: We pass --required flag to the binary since we also want it to rAeturn non-zero if upload fails
Copy link
Contributor

Choose a reason for hiding this comment

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

typo

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yep, thanks, fixed in 78401f5.

@Kami Kami merged commit ceb809f into master Jun 3, 2020
@Kami Kami deleted the update_codecov_dependency branch June 3, 2020 10:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants