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

deps: replace python-jose with pyjwt #6757

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

mdtro
Copy link
Member

@mdtro mdtro commented Jan 13, 2025

#6739

Take two of replacing python-jose with PyJWT. I did not include the cryptography dependency in the previous PR which lead to an InvalidAlgorithmError exception.

@mdtro mdtro requested a review from a team as a code owner January 13, 2025 18:35
Copy link
Member

@JoshFerge JoshFerge left a comment

Choose a reason for hiding this comment

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

any way to test this functionality?

@mdtro mdtro changed the title Mdtro/replace python jose with pyjwt deps: replace python-jose with pyjwt Jan 13, 2025
@mdtro
Copy link
Member Author

mdtro commented Jan 13, 2025

any way to test this functionality?

Totally missed adding my tests to the git commit. One sec.

@onkar
Copy link
Member

onkar commented Jan 13, 2025

We have #6749 to increase the coverage through tests but can you please make sure that snuba admin is not broken after this change?

Copy link

codecov bot commented Jan 14, 2025

❌ 1 Tests Failed:

Tests completed Failed Passed Skipped
2836 1 2835 7
View the top 1 failed tests by shortest run time
_integration-test.test_run::test_receive_event
Stack Traces | 67.6s run time
client_login = (<httpx.Client object at 0x7f4063a96900>, <Response [200 OK]>)

    #x1B[0m#x1B[94mdef#x1B[39;49;00m #x1B[92mtest_receive_event#x1B[39;49;00m(client_login):#x1B[90m#x1B[39;49;00m
        event_id = #x1B[94mNone#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
        client, _ = client_login#x1B[90m#x1B[39;49;00m
        #x1B[94mwith#x1B[39;49;00m sentry_sdk.init(dsn=get_sentry_dsn(client)):#x1B[90m#x1B[39;49;00m
            event_id = sentry_sdk.capture_exception(#x1B[96mException#x1B[39;49;00m(#x1B[33m"#x1B[39;49;00m#x1B[33ma failure#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m))#x1B[90m#x1B[39;49;00m
        #x1B[94massert#x1B[39;49;00m event_id #x1B[95mis#x1B[39;49;00m #x1B[95mnot#x1B[39;49;00m #x1B[94mNone#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
>       response = poll_for_response(#x1B[90m#x1B[39;49;00m
            #x1B[33mf#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m#x1B[33m{#x1B[39;49;00mSENTRY_TEST_HOST#x1B[33m}#x1B[39;49;00m#x1B[.../sentry/internal/events/#x1B[39;49;00m#x1B[33m{#x1B[39;49;00mevent_id#x1B[33m}#x1B[39;49;00m#x1B[33m/#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, client#x1B[90m#x1B[39;49;00m
        )#x1B[90m#x1B[39;49;00m

#x1B[1m#x1B[31m_integration-test/test_run.py#x1B[0m:129: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

request = 'http://localhost:.../internal/events/5f8ce3c6e14e4b049068f1957fc7f9c1/'
client = <httpx.Client object at 0x7f4063a96900>, validator = None

    #x1B[0m#x1B[94mdef#x1B[39;49;00m #x1B[92mpoll_for_response#x1B[39;49;00m(#x1B[90m#x1B[39;49;00m
        request: #x1B[96mstr#x1B[39;49;00m, client: httpx.Client, validator: Callable = #x1B[94mNone#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
    ) -> httpx.Response:#x1B[90m#x1B[39;49;00m
        #x1B[94mfor#x1B[39;49;00m i #x1B[95min#x1B[39;49;00m #x1B[96mrange#x1B[39;49;00m(TIMEOUT_SECONDS):#x1B[90m#x1B[39;49;00m
            response = client.get(#x1B[90m#x1B[39;49;00m
                request, follow_redirects=#x1B[94mTrue#x1B[39;49;00m, headers={#x1B[33m"#x1B[39;49;00m#x1B[33mReferer#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m: SENTRY_TEST_HOST}#x1B[90m#x1B[39;49;00m
            )#x1B[90m#x1B[39;49;00m
            #x1B[94mif#x1B[39;49;00m response.status_code == #x1B[94m200#x1B[39;49;00m:#x1B[90m#x1B[39;49;00m
                #x1B[94mif#x1B[39;49;00m validator #x1B[95mis#x1B[39;49;00m #x1B[94mNone#x1B[39;49;00m #x1B[95mor#x1B[39;49;00m validator(response.text):#x1B[90m#x1B[39;49;00m
                    #x1B[94mbreak#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
            time.sleep(#x1B[94m1#x1B[39;49;00m)#x1B[90m#x1B[39;49;00m
        #x1B[94melse#x1B[39;49;00m:#x1B[90m#x1B[39;49;00m
>           #x1B[94mraise#x1B[39;49;00m #x1B[96mAssertionError#x1B[39;49;00m(#x1B[90m#x1B[39;49;00m
                #x1B[33m"#x1B[39;49;00m#x1B[33mtimeout waiting for response status code 200 or valid data#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
            )#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mE           AssertionError: timeout waiting for response status code 200 or valid data#x1B[0m

#x1B[1m#x1B[31m_integration-test/test_run.py#x1B[0m:40: AssertionError

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

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.

4 participants