Project

General

Profile

action #88915

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

Added by cdywan 5 months ago. Updated 5 months ago.

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

0%

Estimated time:
Difficulty:

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

History

#1 Updated by okurz 5 months ago

  • Category set to Concrete Bugs
  • Priority changed from Normal to Urgent
  • Target version set to Ready

#2 Updated by kraih 5 months 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

#3 Updated by tinita 5 months 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.

#4 Updated by cdywan 5 months ago

  • Description updated (diff)
  • Status changed from New to In Progress
  • Assignee set to cdywan

#5 Updated by cdywan 5 months 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).

#6 Updated by cdywan 5 months ago

  • Description updated (diff)

#7 Updated by cdywan 5 months 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

#8 Updated by cdywan 5 months 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.

#9 Updated by cdywan 5 months 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.

#10 Updated by openqa_review 5 months ago

  • Due date set to 2021-03-09

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

#11 Updated by cdywan 5 months 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.

#12 Updated by okurz 5 months 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

#13 Updated by cdywan 5 months 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.

#14 Updated by okurz 5 months 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 :)

#15 Updated by okurz 5 months 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

#16 Updated by cdywan 5 months 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

#17 Updated by okurz 5 months ago

  • Priority changed from Urgent to Normal

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

#18 Updated by cdywan 5 months 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

#19 Updated by cdywan 5 months 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

#20 Updated by cdywan 5 months ago

  • Status changed from In Progress to Feedback

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

#21 Updated by cdywan 5 months ago

  • Status changed from Feedback to Resolved

No objections/ problems reported at this point

Also available in: Atom PDF