Project

General

Profile

Actions

action #88915

closed

Codecov always fails with 404 Not Found - Build has already finished, uploads rejected

Added by livdywan almost 4 years ago. Updated almost 4 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
Regressions/Crashes
Target version:
Start date:
2021-02-22
Due date:
2021-03-09
% Done:

0%

Estimated time:

Description

Observation

Several open PRs currently seem to fail with codecov issues like these ones in the write step:

Use of uninitialized value $report in ucfirst at /usr/bin/cover line 233.
Reading database from /home/squamata/project/cover_db_api
Merging database from cover_db_fullstack
Devel::Cover: Warning: can't open /home/squamata/os-autoinst/autotest.pm for MD5 digest: No such file or directory
Devel::Cover: Warning: can't open /home/squamata/os-autoinst/OpenQA/Isotovideo/Interface.pm for MD5 digest: No such file or directory
[...]
Devel::Cover: Warning: can't open /home/squamata/os-autoinst/signalblocker.pm for MD5 digest: No such file or directory
<80> does not match <35> - using later value at /usr/lib/perl5/vendor_perl/5.26.1/x86_64-linux-thread-multi/Devel/Cover/DB.pm line 325.
<80> does not match <39> - using later value at /usr/lib/perl5/vendor_perl/5.26.1/x86_64-linux-thread-multi/Devel/Cover/DB.pm line 325.
[...]
<80> does not match <121> - using later value at /usr/lib/perl5/vendor_perl/5.26.1/x86_64-linux-thread-multi/Devel/Cover/DB.pm line 325.
<80> does not match <122> - using later value at /usr/lib/perl5/vendor_perl/5.26.1/x86_64-linux-thread-multi/Devel/Cover/DB.pm line 325.
Writing database to cover_db
CircleCI received exit code 0

and these in the select_re step:

Reading database from /home/squamata/project/cover_db
Devel::Cover: Warning: can't locate structure for statement in /home/squamata/os-autoinst/OpenQA/Benchmark/Stopwatch.pm
[...]
lib/OpenQA/App.pm                                         100.0  100.0
[...]
404 Not Found {"detail":"Build has already finished, uploads rejected."}

Acceptance criteria

  • AC1:

Suggestion

  • The list of files reported seems to be unsorted but otherwise the same.
  • os-autoinst/openQA#3742 was the last successful codecov run
  • The errors are the same *except for the last message 404 Not Found {"detail":"Build has already finished, uploads rejected."} instead of 200 OK Coverage reports upload successfully
Actions #1

Updated by okurz almost 4 years ago

  • Category set to Regressions/Crashes
  • Priority changed from Normal to Urgent
  • Target version set to Ready
Actions #2

Updated by kraih almost 4 years ago

It is not possible to report the problem upstream, the issue tracker the module Devel::Cover::Report::Codecov links to is deactivated. https://github.com/codecov/codecov-perl/issues

Actions #3

Updated by tinita almost 4 years ago

I think the warning can't locate structure for statement is unrelated, also successful runs have warnings like that.

We should probably try to switch to codecov-bash.

Actions #4

Updated by livdywan almost 4 years ago

  • Description updated (diff)
  • Status changed from New to In Progress
  • Assignee set to livdywan
Actions #5

Updated by livdywan almost 4 years ago

tinita wrote:

I think the warning can't locate structure for statement is unrelated, also successful runs have warnings like that.

Yes, sadly. I was investigating the warnings, then thought to trace the last successful run to check the expected result and confirmed that all of these were there before. Except for the 404 in the end.

Incidentally HTML has been written despite not being mentioned. Nothing seems to be missing from the artifacts.

So my PR is probably not helping at all (or just fixes one of the unrelated errors).

Actions #6

Updated by livdywan almost 4 years ago

  • Description updated (diff)
Actions #7

Updated by livdywan almost 4 years ago

  • Subject changed from Devel::Cover: Warning: can't locate structure for statement in /home/squamata/os-autoinst/OpenQA/Benchmark/Stopwatch.pm to Codecov always fails with 404 Not Found - Build has already finished, uploads rejected
Actions #8

Updated by livdywan almost 4 years ago

tinita wrote:

We should probably try to switch to codecov-bash.

Do you think codecov-bash is better maintained? 🤔 I didn't spot any recent fixes there that could help us.

But it seems easy enough to try out. I actually like the friendly CLI output and it seems like it would be easier to debug than what we have now.

Actions #9

Updated by livdywan almost 4 years ago

cdywan wrote:

tinita wrote:

We should probably try to switch to codecov-bash.

Do you think codecov-bash is better maintained? 🤔 I didn't spot any recent fixes there that could help us.

Well, they apparently have the same problems.

Actions #10

Updated by openqa_review almost 4 years ago

  • Due date set to 2021-03-09

Setting due date based on mean cycle time of SUSE QE Tools

Actions #11

Updated by livdywan almost 4 years ago

  • Despite my earlier findings codecov-bash seems able to upload data successfully.
  • Devel::Cover::Report::Codecovbash is not currently packaged so I used it via CPAN in my PR.
Actions #12

Updated by okurz almost 4 years ago

Open points we can cover after the inital fix is merged:

  • Use properly packaged dependencies
  • Remove the explicit dependency for perl-JSON-MaybeXS
  • Consider adding back coverage-html: coverage in Makefile to ensure coverage analysis is done when the report generation is triggered
Actions #13

Updated by livdywan almost 4 years ago

okurz wrote:

Open points we can cover after the inital fix is merged:

  • Use properly packaged dependencies
  • Remove the explicit dependency for perl-JSON-MaybeXS

Looking into that atm, with some help from @tinita

  • Consider adding back coverage-html: coverage in Makefile to ensure coverage analysis is done when the report generation is triggered

As far as I can tell that target was unused. At least it didn't work for me locally. I would suggest that we prefer to maintain targets that we use in CI where possible.

Actions #14

Updated by okurz almost 4 years ago

I would suggest that we prefer to maintain targets that we use in CI where possible.

As far as we can do that I consider this a good idea. But a local developer likely prefers an HTML report over codecov format for readability :)

Actions #15

Updated by okurz almost 4 years ago

And now the problem is when I call manually I get:

$ make coverage-html
cover -select_re '^(lib|script|t)/' -report html_minimal
Can't open database /home/okurz/local/os-autoinst/openQA/cover_db
make: *** [Makefile:212: coverage-html] Error 2
Actions #16

Updated by livdywan almost 4 years ago

cdywan wrote:

okurz wrote:

Open points we can cover after the inital fix is merged:

  • Use properly packaged dependencies
  • Remove the explicit dependency for perl-JSON-MaybeXS

Looking into that atm, with some help from @tinita

See SR#874893

Actions #17

Updated by okurz almost 4 years ago

  • Priority changed from Urgent to Normal

great. Definitely you already tackled the "urgency" of the problem.

Actions #18

Updated by livdywan almost 4 years ago

  • Description updated (diff)

okurz wrote:

And now the problem is when I call manually I get:

$ make coverage-html
cover -select_re '^(lib|script|t)/' -report html_minimal
Can't open database /home/okurz/local/os-autoinst/openQA/cover_db
make: *** [Makefile:212: coverage-html] Error 2

https://github.com/os-autoinst/openQA/pull/3753

Actions #19

Updated by livdywan almost 4 years ago

cdywan wrote:

See SR#874893

The SR got accepted, so we can probably swap out cpanm for rpm here: https://github.com/os-autoinst/openQA/pull/3762

Actions #20

Updated by livdywan almost 4 years ago

  • Status changed from In Progress to Feedback

Follow-up PR was merged and seems to be working fine so far...

Actions #21

Updated by livdywan almost 4 years ago

  • Status changed from Feedback to Resolved

No objections/ problems reported at this point

Actions

Also available in: Atom PDF