Skip to content
This repository was archived by the owner on Jun 13, 2025. It is now read-only.

Conversation

@rohitvinnakota-codecov
Copy link
Contributor

@rohitvinnakota-codecov rohitvinnakota-codecov commented Jan 27, 2025

Purpose/Motivation

Addressing https://github.com/codecov/internal-issues/issues/1144

The diff field is deprecated due to its flaky responses so we are going to add a patch field for changes in the patch coverage of a pull request

Screenshot 2025-01-28 at 9 12 59 AM

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.

@codecov-notifications
Copy link

codecov-notifications bot commented Jan 27, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

✅ All tests successful. No failed tests found.

📢 Thoughts on this report? Let us know!

@codecov-qa
Copy link

codecov-qa bot commented Jan 27, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.99%. Comparing base (e4924ba) to head (3f59af1).
Report is 1 commits behind head on main.

✅ All tests successful. No failed tests found.

@codecov-public-qa
Copy link

codecov-public-qa bot commented Jan 27, 2025

❌ 1 Tests Failed:

Tests completed Failed Passed Skipped
2719 1 2718 6
View the top 1 failed tests by shortest run time
api/public/v2/tests/test_api_pull_viewset.py::PullViewsetTests::test_retrieve_with_patch_coverage_no_commit_comparison
Stack Traces | 0.13s run time
self = <test_api_pull_viewset.PullViewsetTests testMethod=test_retrieve_with_patch_coverage_no_commit_comparison>
mock_cc_filter = <MagicMock name='filter' id='140151107159488'>
mock_comparison_report = <MagicMock name='ComparisonReport' id='140151112000928'>

    @patch("api.public.v2.pull.serializers.ComparisonReport")
    @patch("services.comparison.CommitComparison.objects.filter")
    def test_retrieve_with_patch_coverage_no_commit_comparison(
        self, mock_cc_filter, mock_comparison_report
    ):
        mock_cc_instance = MagicMock(is_processed=False)
        mock_cc_filter.return_value.select_related.return_value.first.return_value = (
            mock_cc_instance
        )
    
        mock_file = MagicMock()
        mock_file.patch_coverage.hits = 0
        mock_file.patch_coverage.misses = 0
        mock_file.patch_coverage.partials = 0
        mock_comparison_report.return_value.impacted_files = [mock_file]
    
        res = self.client.get(
            reverse(
                "api-v2-pulls-detail",
                kwargs={
                    "service": self.org.service,
                    "owner_username": self.org.username,
                    "repo_name": self.repo.name,
                    "pullid": self.pulls[0].pullid,
                },
            )
        )
        assert res.status_code == 200
        data = res.json()
>       assert data["patch"] == self.no_patch_response
E       AssertionError: assert None == {'coverage': 0.0, 'hits': 0, 'misses': 0, 'partials': 0}
E        +  where {'coverage': 0.0, 'hits': 0, 'misses': 0, 'partials': 0} = <test_api_pull_viewset.PullViewsetTests testMethod=test_retrieve_with_patch_coverage_no_commit_comparison>.no_patch_response

.../v2/tests/test_api_pull_viewset.py:418: AssertionError

To view more test analytics, go to the Test Analytics Dashboard
📢 Thoughts on this report? Let us know!

@github-actions
Copy link
Contributor

github-actions bot commented Jan 27, 2025

✅ All tests successful. No failed tests were found.

📣 Thoughts on this report? Let Codecov know! | Powered by Codecov

@codecov
Copy link

codecov bot commented Jan 28, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.08%. Comparing base (e4924ba) to head (3f59af1).
Report is 1 commits behind head on main.

✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1108   +/-   ##
=======================================
  Coverage   96.07%   96.08%           
=======================================
  Files         837      837           
  Lines       19657    19687   +30     
=======================================
+ Hits        18886    18916   +30     
  Misses        771      771           
Flag Coverage Δ
unit 95.99% <100.00%> (+<0.01%) ⬆️
unit-latest-uploader 95.99% <100.00%> (+<0.01%) ⬆️

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@rohitvinnakota-codecov rohitvinnakota-codecov marked this pull request as ready for review January 28, 2025 15:21
Copy link
Contributor

@JerrySentry JerrySentry left a comment

Choose a reason for hiding this comment

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

lgtm, just missing a test for the uncovered line :P

@rohitvinnakota-codecov rohitvinnakota-codecov added this pull request to the merge queue Feb 3, 2025
Merged via the queue into main with commit b7b6cbc Feb 3, 2025
18 of 19 checks passed
@rohitvinnakota-codecov rohitvinnakota-codecov deleted the rvinnakota/pull-endpoint-update branch February 3, 2025 15:19
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants