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

Update shared for Upload DB index #1085

Merged
merged 1 commit into from
Jan 8, 2025
Merged

Update shared for Upload DB index #1085

merged 1 commit into from
Jan 8, 2025

Conversation

Swatinem
Copy link
Contributor

@Swatinem Swatinem commented Jan 8, 2025

This update primarily pulls in a DB migration to add a better index (concurrently) to Upload/ReportSession.

This update primarily pulls in a DB migration to add a better index (concurrently) to `Upload`/`ReportSession`.
@Swatinem Swatinem requested a review from a team January 8, 2025 09:33
@Swatinem Swatinem self-assigned this Jan 8, 2025
Copy link
Contributor

github-actions bot commented Jan 8, 2025

This PR includes changes to shared. Please review them here: codecov/shared@9a61a94...c3288a0

Copy link

codecov bot commented Jan 8, 2025

❌ 1 Tests Failed:

Tests completed Failed Passed Skipped
2674 1 2673 7
View the top 1 failed tests by shortest run time
api/public/v2/tests/test_api_commit_viewset.py::RepoCommitUploadsTestCase::test_commit_uploads_not_authenticated
Stack Traces | 0.072s run time
self = <test_api_commit_viewset.RepoCommitUploadsTestCase testMethod=test_commit_uploads_not_authenticated>
build_report_from_commit = <MagicMock name='build_report_from_commit' id='140358591804768'>
get_repo_permissions = <MagicMock name='get_repo_permissions' id='140358456632256'>

    @patch("shared.reports.api_report_service.build_report_from_commit")
    def test_commit_uploads_not_authenticated(
        self, build_report_from_commit, get_repo_permissions
    ):
        build_report_from_commit.return_value = MockReport()
        get_repo_permissions.return_value = (True, True)
    
        author = OwnerFactory()
        repo_public = RepositoryFactory(author=author, private=False)
        repo_private = RepositoryFactory(author=author, private=True)
        commit_public = CommitWithReportFactory(author=author, repository=repo_public)
        commit_private = CommitWithReportFactory(author=author, repository=repo_private)
    
        self.client.logout()
        response = self.client.get(
            reverse(
                "api-v2-commits-detail",
                kwargs={
                    "service": author.service,
                    "owner_username": author.username,
                    "repo_name": repo_public.name,
                    "commitid": commit_public.commitid,
                },
            )
        )
    
        # allows access to public repos
>       assert response.status_code == 200
E       assert 404 == 200
E        +  where 404 = <Response status_code=404, "application/json">.status_code

.../v2/tests/test_api_commit_viewset.py:396: AssertionError

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

@codecov-staging
Copy link

codecov-staging bot commented Jan 8, 2025

❌ 1 Tests Failed:

Tests completed Failed Passed Skipped
2675 1 2674 6
View the top 1 failed tests by shortest run time
api/public/v2/tests/test_api_commit_viewset.py::RepoCommitUploadsTestCase::test_commit_uploads_not_authenticated
Stack Traces | 0.072s run time
self = <test_api_commit_viewset.RepoCommitUploadsTestCase testMethod=test_commit_uploads_not_authenticated>
build_report_from_commit = <MagicMock name='build_report_from_commit' id='140358591804768'>
get_repo_permissions = <MagicMock name='get_repo_permissions' id='140358456632256'>

    @patch("shared.reports.api_report_service.build_report_from_commit")
    def test_commit_uploads_not_authenticated(
        self, build_report_from_commit, get_repo_permissions
    ):
        build_report_from_commit.return_value = MockReport()
        get_repo_permissions.return_value = (True, True)
    
        author = OwnerFactory()
        repo_public = RepositoryFactory(author=author, private=False)
        repo_private = RepositoryFactory(author=author, private=True)
        commit_public = CommitWithReportFactory(author=author, repository=repo_public)
        commit_private = CommitWithReportFactory(author=author, repository=repo_private)
    
        self.client.logout()
        response = self.client.get(
            reverse(
                "api-v2-commits-detail",
                kwargs={
                    "service": author.service,
                    "owner_username": author.username,
                    "repo_name": repo_public.name,
                    "commitid": commit_public.commitid,
                },
            )
        )
    
        # allows access to public repos
>       assert response.status_code == 200
E       assert 404 == 200
E        +  where 404 = <Response status_code=404, "application/json">.status_code

.../v2/tests/test_api_commit_viewset.py:396: AssertionError

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

@codecov-qa
Copy link

codecov-qa bot commented Jan 8, 2025

❌ 1 Tests Failed:

Tests completed Failed Passed Skipped
2674 1 2673 7
View the top 1 failed tests by shortest run time
api/public/v2/tests/test_api_commit_viewset.py::RepoCommitUploadsTestCase::test_commit_uploads_not_authenticated
Stack Traces | 0.072s run time
self = <test_api_commit_viewset.RepoCommitUploadsTestCase testMethod=test_commit_uploads_not_authenticated>
build_report_from_commit = <MagicMock name='build_report_from_commit' id='140358591804768'>
get_repo_permissions = <MagicMock name='get_repo_permissions' id='140358456632256'>

    @patch("shared.reports.api_report_service.build_report_from_commit")
    def test_commit_uploads_not_authenticated(
        self, build_report_from_commit, get_repo_permissions
    ):
        build_report_from_commit.return_value = MockReport()
        get_repo_permissions.return_value = (True, True)
    
        author = OwnerFactory()
        repo_public = RepositoryFactory(author=author, private=False)
        repo_private = RepositoryFactory(author=author, private=True)
        commit_public = CommitWithReportFactory(author=author, repository=repo_public)
        commit_private = CommitWithReportFactory(author=author, repository=repo_private)
    
        self.client.logout()
        response = self.client.get(
            reverse(
                "api-v2-commits-detail",
                kwargs={
                    "service": author.service,
                    "owner_username": author.username,
                    "repo_name": repo_public.name,
                    "commitid": commit_public.commitid,
                },
            )
        )
    
        # allows access to public repos
>       assert response.status_code == 200
E       assert 404 == 200
E        +  where 404 = <Response status_code=404, "application/json">.status_code

.../v2/tests/test_api_commit_viewset.py:396: AssertionError

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

Copy link
Contributor

github-actions bot commented Jan 8, 2025

✅ All tests successful. No failed tests were found.

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

Copy link

❌ 1 Tests Failed:

Tests completed Failed Passed Skipped
2674 1 2673 6
View the top 1 failed tests by shortest run time
api/public/v2/tests/test_api_commit_viewset.py::RepoCommitUploadsTestCase::test_commit_uploads_not_authenticated
Stack Traces | 0.072s run time
self = <test_api_commit_viewset.RepoCommitUploadsTestCase testMethod=test_commit_uploads_not_authenticated>
build_report_from_commit = <MagicMock name='build_report_from_commit' id='140358591804768'>
get_repo_permissions = <MagicMock name='get_repo_permissions' id='140358456632256'>

    @patch("shared.reports.api_report_service.build_report_from_commit")
    def test_commit_uploads_not_authenticated(
        self, build_report_from_commit, get_repo_permissions
    ):
        build_report_from_commit.return_value = MockReport()
        get_repo_permissions.return_value = (True, True)
    
        author = OwnerFactory()
        repo_public = RepositoryFactory(author=author, private=False)
        repo_private = RepositoryFactory(author=author, private=True)
        commit_public = CommitWithReportFactory(author=author, repository=repo_public)
        commit_private = CommitWithReportFactory(author=author, repository=repo_private)
    
        self.client.logout()
        response = self.client.get(
            reverse(
                "api-v2-commits-detail",
                kwargs={
                    "service": author.service,
                    "owner_username": author.username,
                    "repo_name": repo_public.name,
                    "commitid": commit_public.commitid,
                },
            )
        )
    
        # allows access to public repos
>       assert response.status_code == 200
E       assert 404 == 200
E        +  where 404 = <Response status_code=404, "application/json">.status_code

.../v2/tests/test_api_commit_viewset.py:396: AssertionError

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

@Swatinem Swatinem added this pull request to the merge queue Jan 8, 2025
Merged via the queue into main with commit 5433cb3 Jan 8, 2025
16 checks passed
@Swatinem Swatinem deleted the swatinem/upd-shared branch January 8, 2025 10:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants