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

fix: Add missing service GQL error defn #1123

Merged
merged 6 commits into from
Feb 5, 2025
Merged

fix: Add missing service GQL error defn #1123

merged 6 commits into from
Feb 5, 2025

Conversation

JerrySentry
Copy link
Contributor

@JerrySentry JerrySentry commented Feb 3, 2025

Reduce noisy errors that occurs when the user sends requests without service param provided. This will no longer raise these unhandled errors, leading to Sentry spams.

First one:

Second one:

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 Feb 3, 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 Feb 3, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.97%. Comparing base (e885187) to head (3bd830d).
Report is 2 commits behind head on main.

✅ All tests successful. No failed tests found.

Copy link
Contributor

github-actions bot commented Feb 3, 2025

✅ All tests successful. No failed tests were found.

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

Copy link

codecov bot commented Feb 3, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.07%. Comparing base (e885187) to head (3bd830d).
Report is 2 commits behind head on main.

✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1123   +/-   ##
=======================================
  Coverage   96.07%   96.07%           
=======================================
  Files         837      837           
  Lines       19849    19851    +2     
=======================================
+ Hits        19069    19071    +2     
  Misses        780      780           
Flag Coverage Δ
unit 95.97% <100.00%> (-0.01%) ⬇️
unit-latest-uploader 95.97% <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.

@JerrySentry JerrySentry marked this pull request as ready for review February 3, 2025 17:58
@JerrySentry JerrySentry requested a review from a team as a code owner February 3, 2025 17:58
Copy link

❌ 1 Tests Failed:

Tests completed Failed Passed Skipped
2720 1 2719 6
View the top 1 failed tests by shortest run time
graphql_api/tests/test_owner.py::TestOwnerType::test_owner_query_with_no_service
Stack Traces | 0.386s run time
self = <graphql_api.tests.test_owner.TestOwnerType testMethod=test_owner_query_with_no_service>

    def test_owner_query_with_no_service(self):
        current_org = OwnerFactory(
            username="random-plan-user",
            service="github",
        )
        query = """{
            owner(username: "%s") {
                username
            }
        }
        """ % (current_org.username)
    
        res = self.gql_request(query, provider="", with_errors=True)
    
>       assert res["errors"][0]["message"] == MissingService.message
E       KeyError: 'errors'

graphql_api/tests/test_owner.py:711: KeyError

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

Copy link
Contributor

@ajay-sentry ajay-sentry left a comment

Choose a reason for hiding this comment

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

Nice!

@JerrySentry JerrySentry added this pull request to the merge queue Feb 5, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Feb 5, 2025
@JerrySentry JerrySentry added this pull request to the merge queue Feb 5, 2025
Merged via the queue into main with commit ca253c1 Feb 5, 2025
18 of 19 checks passed
@JerrySentry JerrySentry deleted the feb_03_gql_error branch February 5, 2025 19:35
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