codecov-api icon indicating copy to clipboard operation
codecov-api copied to clipboard

update shared

Open adrian-codecov opened this issue 1 year ago • 5 comments
trafficstars

Update shared to latest

Legal Boilerplate

Look, I get it. The entity doing business as "Sentry" was incorporated in the State of Delaware in 2015 as Functional Software, Inc. In 2022 this entity acquired Codecov and as result Sentry is going to need some rights from me in order to utilize my contributions in this PR. So here's the deal: I retain all rights, title and interest in and to my contributions, and by keeping this boilerplate intact I confirm that Sentry can use, modify, copy, and redistribute my contributions, under Sentry's choice of terms.

adrian-codecov avatar Oct 09 '24 19:10 adrian-codecov

This PR includes changes to shared. Please review them here: https://github.com/codecov/shared/compare/88117b96a4b420d88549b8df2649c3eb9c61c2a5...b9e83b2c2f072749bae36c18b80d384b8cc50d94

github-actions[bot] avatar Oct 09 '24 19:10 github-actions[bot]

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

:white_check_mark: All tests successful. No failed tests found.

:loudspeaker: Thoughts on this report? Let us know!

codecov-staging[bot] avatar Oct 09 '24 19:10 codecov-staging[bot]

:x: 2 Tests Failed:

Tests completed Failed Passed Skipped
2569 2 2567 6
View the top 2 failed tests by shortest run time
services.tests.test_report.ReportServiceTest test_build_report_from_commit_with_flags
Stack Traces | 0.034s run time
self = <services.tests.test_report.ReportServiceTest testMethod=test_build_report_from_commit_with_flags>
read_chunks_mock = <MagicMock name='read_chunks' id='139824081424544'>

    @patch("services.archive.ArchiveService.read_chunks")
    def test_build_report_from_commit_with_flags(self, read_chunks_mock):
        f = open(current_file.parent / "samples" / "chunks.txt", "r")
        read_chunks_mock.return_value = f.read()
        commit = CommitWithReportFactory.create(message="aaaaa", commitid="abf6d4d")
        report = build_report_from_commit(commit)
        res = report.flags["integrations"].report
        assert len(res.report._chunks) == 3
        assert len(res.files) == 3
>       file_1, file_2, file_3 = sorted(res.file_reports(), key=lambda x: x.name)
E       AttributeError: 'FilteredReport' object has no attribute 'file_reports'

services/tests/test_report.py:216: AttributeError
services.tests.test_report.ReportServiceTest test_build_report_from_commit_with_non_carried_forward_flags
Stack Traces | 0.039s run time
self = <services.tests.test_report.ReportServiceTest testMethod=test_build_report_from_commit_with_non_carried_forward_flags>
read_chunks_mock = <MagicMock name='read_chunks' id='139824081004704'>

    @patch("services.archive.ArchiveService.read_chunks")
    def test_build_report_from_commit_with_non_carried_forward_flags(
        self, read_chunks_mock
    ):
        f = open(current_file.parent / "samples" / "chunks.txt", "r")
        read_chunks_mock.return_value = f.read()
        commit = CommitWithReportFactory.create(
            message="another test",
            commitid="asdfbhasdf89",
        )
        commit_report = commit.reports.first()
        session = commit_report.sessions.filter(order_number=1).first()
        session.upload_type = "carriedforward"
        session.upload_extras = {
            "carriedforward_from": "56e05fced214c44a37759efa2dfc25a65d8ae98d"
        }
        session.save()
    
        report = build_report_from_commit(commit)
        res = report.flags["integrations"].report
        assert len(res.report._chunks) == 3
        assert len(res.files) == 3
>       file_1, file_2, file_3 = sorted(res.file_reports(), key=lambda x: x.name)
E       AttributeError: 'FilteredReport' object has no attribute 'file_reports'

services/tests/test_report.py:248: AttributeError

To view individual test run time comparison to the main branch, go to the Test Analytics Dashboard

codecov-qa[bot] avatar Oct 09 '24 19:10 codecov-qa[bot]

Test Failures Detected: Due to failing tests, we cannot provide coverage reports at this time.

:x: Failed Test Results:

Completed 2575 tests with 2 failed, 2567 passed and 6 skipped.

View the full list of failed tests

pytest

  • Class name: services.tests.test_report.ReportServiceTest
    Test name: test_build_report_from_commit_with_flags

    self = <services.tests.test_report.ReportServiceTest testMethod=test_build_report_from_commit_with_flags>
    read_chunks_mock = <MagicMock name='read_chunks' id='139824081424544'>

    @patch("services.archive.ArchiveService.read_chunks")
    def test_build_report_from_commit_with_flags(self, read_chunks_mock):
    f = open(current_file.parent / "samples" / "chunks.txt", "r")
    read_chunks_mock.return_value = f.read()
    commit = CommitWithReportFactory.create(message="aaaaa", commitid="abf6d4d")
    report = build_report_from_commit(commit)
    res = report.flags["integrations"].report
    assert len(res.report._chunks) == 3
    assert len(res.files) == 3
    > file_1, file_2, file_3 = sorted(res.file_reports(), key=lambda x: x.name)
    E AttributeError: 'FilteredReport' object has no attribute 'file_reports'

    services/tests/test_report.py:216: AttributeError
  • Class name: services.tests.test_report.ReportServiceTest
    Test name: test_build_report_from_commit_with_non_carried_forward_flags

    self = <services.tests.test_report.ReportServiceTest testMethod=test_build_report_from_commit_with_non_carried_forward_flags>
    read_chunks_mock = <MagicMock name='read_chunks' id='139824081004704'>

    @patch("services.archive.ArchiveService.read_chunks")
    def test_build_report_from_commit_with_non_carried_forward_flags(
    self, read_chunks_mock
    ):
    f = open(current_file.parent / "samples" / "chunks.txt", "r")
    read_chunks_mock.return_value = f.read()
    commit = CommitWithReportFactory.create(
    message="another test",
    commitid="asdfbhasdf89",
    )
    commit_report = commit.reports.first()
    session = commit_report.sessions.filter(order_number=1).first()
    session.upload_type = "carriedforward"
    session.upload_extras = {
    "carriedforward_from": "56e05fced214c44a37759efa2dfc25a65d8ae98d"
    }
    session.save()

    report = build_report_from_commit(commit)
    res = report.flags["integrations"].report
    assert len(res.report._chunks) == 3
    assert len(res.files) == 3
    > file_1, file_2, file_3 = sorted(res.file_reports(), key=lambda x: x.name)
    E AttributeError: 'FilteredReport' object has no attribute 'file_reports'

    services/tests/test_report.py:248: AttributeError

codecov-public-qa[bot] avatar Oct 09 '24 19:10 codecov-public-qa[bot]

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 96.29%. Comparing base (d5ca070) to head (73c4af1). Report is 73 commits behind head on main.

:white_check_mark: All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #877   +/-   ##
=======================================
  Coverage   96.29%   96.29%           
=======================================
  Files         823      823           
  Lines       19185    19185           
=======================================
  Hits        18475    18475           
  Misses        710      710           
Flag Coverage Δ
unit 92.65% <ø> (-0.02%) :arrow_down:
unit-latest-uploader 92.65% <ø> (-0.02%) :arrow_down:

Flags with carried forward coverage won't be shown. Click here to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar Oct 09 '24 19:10 codecov[bot]