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

added utility function to get an item from a nested dict #1358

Merged
merged 1 commit into from
Oct 13, 2021

Conversation

beniwohli
Copy link
Contributor

this was initially part of #1321

@apmmachine
Copy link
Contributor

💔 Tests Failed

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview preview

Expand to view the summary

Build stats

  • Start Time: 2021-10-13T12:02:42.082+0000

  • Duration: 28 min 7 sec

  • Commit: 4bbb521

Test stats 🧪

Test Results
Failed 40
Passed 9967
Skipped 8977
Total 18984

Test errors 40

Expand to view the tests failures

> Show only the first 10 test failures

Initializing / Test / Python-python-3.9-4 / test_httpx_instrumentation – tests.instrumentation.httpx_tests
    Expand to view the error details

     TypeError: get() got an unexpected keyword argument 'allow_redirects' 
    

    Expand to view the stacktrace

     instrument = None
    elasticapm_client = <tests.fixtures.TempStoreClient object at 0x7f7d3566e2b0>
    waiting_httpserver = <ContentServer(<class 'pytest_localserver.http.ContentServer'>, started 140175742744320)>
    
        def test_httpx_instrumentation(instrument, elasticapm_client, waiting_httpserver):
            waiting_httpserver.serve_content("")
            url = waiting_httpserver.url + "/hello_world"
            parsed_url = compat.urlparse.urlparse(url)
            elasticapm_client.begin_transaction("transaction.test")
            with capture_span("test_request", "test"):
    >           httpx.get(url, allow_redirects=False)
    E           TypeError: get() got an unexpected keyword argument 'allow_redirects'
    
    tests/instrumentation/httpx_tests.py:53: TypeError 
    

Initializing / Test / Python-python-3.9-4 / test_httpx_instrumentation_via_client – tests.instrumentation.httpx_tests
    Expand to view the error details

     TypeError: get() got an unexpected keyword argument 'allow_redirects' 
    

    Expand to view the stacktrace

     instrument = None
    elasticapm_client = <tests.fixtures.TempStoreClient object at 0x7f7d355af520>
    waiting_httpserver = <ContentServer(<class 'pytest_localserver.http.ContentServer'>, started 140175742744320)>
    
        def test_httpx_instrumentation_via_client(instrument, elasticapm_client, waiting_httpserver):
            waiting_httpserver.serve_content("")
            url = waiting_httpserver.url + "/hello_world"
            elasticapm_client.begin_transaction("transaction.test")
            with capture_span("test_request", "test"):
                c = httpx.Client()
    >           c.get(url, allow_redirects=False)
    E           TypeError: get() got an unexpected keyword argument 'allow_redirects'
    
    tests/instrumentation/httpx_tests.py:88: TypeError 
    

Initializing / Test / Python-python-3.9-4 / test_httpx_error[400] – tests.instrumentation.httpx_tests
    Expand to view the error details

     TypeError: get() got an unexpected keyword argument 'allow_redirects' 
    

    Expand to view the stacktrace

     instrument = None
    elasticapm_client = <tests.fixtures.TempStoreClient object at 0x7f7d35686970>
    waiting_httpserver = <ContentServer(<class 'pytest_localserver.http.ContentServer'>, started 140175742744320)>
    status_code = 400
    
        @pytest.mark.parametrize("status_code", [400, 500])
        def test_httpx_error(instrument, elasticapm_client, waiting_httpserver, status_code):
            waiting_httpserver.serve_content("", code=status_code)
            url = waiting_httpserver.url + "/hello_world"
            parsed_url = compat.urlparse.urlparse(url)
            elasticapm_client.begin_transaction("transaction")
            expected_sig = "GET {0}".format(parsed_url.netloc)
            url = "http://{0}/hello_world".format(parsed_url.netloc)
            with capture_span("test_name", "test_type"):
                c = httpx.Client()
    >           c.get(url, allow_redirects=False)
    E           TypeError: get() got an unexpected keyword argument 'allow_redirects'
    
    tests/instrumentation/httpx_tests.py:157: TypeError 
    

Initializing / Test / Python-python-3.9-4 / test_httpx_error[500] – tests.instrumentation.httpx_tests
    Expand to view the error details

     TypeError: get() got an unexpected keyword argument 'allow_redirects' 
    

    Expand to view the stacktrace

     instrument = None
    elasticapm_client = <tests.fixtures.TempStoreClient object at 0x7f7d35684520>
    waiting_httpserver = <ContentServer(<class 'pytest_localserver.http.ContentServer'>, started 140175742744320)>
    status_code = 500
    
        @pytest.mark.parametrize("status_code", [400, 500])
        def test_httpx_error(instrument, elasticapm_client, waiting_httpserver, status_code):
            waiting_httpserver.serve_content("", code=status_code)
            url = waiting_httpserver.url + "/hello_world"
            parsed_url = compat.urlparse.urlparse(url)
            elasticapm_client.begin_transaction("transaction")
            expected_sig = "GET {0}".format(parsed_url.netloc)
            url = "http://{0}/hello_world".format(parsed_url.netloc)
            with capture_span("test_name", "test_type"):
                c = httpx.Client()
    >           c.get(url, allow_redirects=False)
    E           TypeError: get() got an unexpected keyword argument 'allow_redirects'
    
    tests/instrumentation/httpx_tests.py:157: TypeError 
    

Initializing / Test / Python-python-3.9-4 / test_httpx_instrumentation – tests.instrumentation.asyncio_tests.httpx_tests
    Expand to view the error details

     TypeError: get() got an unexpected keyword argument 'allow_redirects' 
    

    Expand to view the stacktrace

     instrument = None
    elasticapm_client = <tests.fixtures.TempStoreClient object at 0x7f7d3569b070>
    waiting_httpserver = <ContentServer(<class 'pytest_localserver.http.ContentServer'>, started 140175742744320)>
    
        async def test_httpx_instrumentation(instrument, elasticapm_client, waiting_httpserver):
            waiting_httpserver.serve_content("")
            url = waiting_httpserver.url + "/hello_world"
            parsed_url = compat.urlparse.urlparse(url)
            elasticapm_client.begin_transaction("transaction.test")
            async with async_capture_span("test_request", "test"):
                async with httpx.AsyncClient() as client:
    >               await client.get(url, allow_redirects=False)
    E               TypeError: get() got an unexpected keyword argument 'allow_redirects'
    
    tests/instrumentation/asyncio_tests/httpx_tests.py:51: TypeError 
    

Initializing / Test / Python-python-3.9-4 / test_httpx_instrumentation_string_url – tests.instrumentation.asyncio_tests.httpx_tests
    Expand to view the error details

     TypeError: get() got an unexpected keyword argument 'allow_redirects' 
    

    Expand to view the stacktrace

     instrument = None
    elasticapm_client = <tests.fixtures.TempStoreClient object at 0x7f7d358205e0>
    waiting_httpserver = <ContentServer(<class 'pytest_localserver.http.ContentServer'>, started 140175742744320)>
    
        async def test_httpx_instrumentation_string_url(instrument, elasticapm_client, waiting_httpserver):
            waiting_httpserver.serve_content("")
            url = waiting_httpserver.url + "/hello_world"
            elasticapm_client.begin_transaction("transaction.test")
            async with async_capture_span("test_request", "test"):
                async with httpx.AsyncClient() as client:
    >               await client.get(url, allow_redirects=False)
    E               TypeError: get() got an unexpected keyword argument 'allow_redirects'
    
    tests/instrumentation/asyncio_tests/httpx_tests.py:87: TypeError 
    

Initializing / Test / Python-python-3.9-4 / test_httpx_error[400] – tests.instrumentation.asyncio_tests.httpx_tests
    Expand to view the error details

     TypeError: get() got an unexpected keyword argument 'allow_redirects' 
    

    Expand to view the stacktrace

     instrument = None
    elasticapm_client = <tests.fixtures.TempStoreClient object at 0x7f7d34b51e80>
    waiting_httpserver = <ContentServer(<class 'pytest_localserver.http.ContentServer'>, started 140175742744320)>
    status_code = 400
    
        @pytest.mark.parametrize("status_code", [400, 500])
        async def test_httpx_error(instrument, elasticapm_client, waiting_httpserver, status_code):
            waiting_httpserver.serve_content("", code=status_code)
            url = waiting_httpserver.url + "/hello_world"
            parsed_url = compat.urlparse.urlparse(url)
            elasticapm_client.begin_transaction("transaction")
            expected_sig = "GET {0}".format(parsed_url.netloc)
            url = "http://{0}/hello_world".format(parsed_url.netloc)
            async with async_capture_span("test_name", "test_type"):
                async with httpx.AsyncClient() as client:
    >               await client.get(url, allow_redirects=False)
    E               TypeError: get() got an unexpected keyword argument 'allow_redirects'
    
    tests/instrumentation/asyncio_tests/httpx_tests.py:158: TypeError 
    

Initializing / Test / Python-python-3.9-4 / test_httpx_error[500] – tests.instrumentation.asyncio_tests.httpx_tests
    Expand to view the error details

     TypeError: get() got an unexpected keyword argument 'allow_redirects' 
    

    Expand to view the stacktrace

     instrument = None
    elasticapm_client = <tests.fixtures.TempStoreClient object at 0x7f7d36166af0>
    waiting_httpserver = <ContentServer(<class 'pytest_localserver.http.ContentServer'>, started 140175742744320)>
    status_code = 500
    
        @pytest.mark.parametrize("status_code", [400, 500])
        async def test_httpx_error(instrument, elasticapm_client, waiting_httpserver, status_code):
            waiting_httpserver.serve_content("", code=status_code)
            url = waiting_httpserver.url + "/hello_world"
            parsed_url = compat.urlparse.urlparse(url)
            elasticapm_client.begin_transaction("transaction")
            expected_sig = "GET {0}".format(parsed_url.netloc)
            url = "http://{0}/hello_world".format(parsed_url.netloc)
            async with async_capture_span("test_name", "test_type"):
                async with httpx.AsyncClient() as client:
    >               await client.get(url, allow_redirects=False)
    E               TypeError: get() got an unexpected keyword argument 'allow_redirects'
    
    tests/instrumentation/asyncio_tests/httpx_tests.py:158: TypeError 
    

Initializing / Test / Python-python-3.10-rc-0 / test_httpx_instrumentation – tests.instrumentation.httpx_tests
    Expand to view the error details

     TypeError: get() got an unexpected keyword argument 'allow_redirects' 
    

    Expand to view the stacktrace

     instrument = None
    elasticapm_client = <tests.fixtures.TempStoreClient object at 0x7fabb6c4c220>
    waiting_httpserver = <ContentServer(<class 'pytest_localserver.http.ContentServer'>, started 140375482119936)>
    
        def test_httpx_instrumentation(instrument, elasticapm_client, waiting_httpserver):
            waiting_httpserver.serve_content("")
            url = waiting_httpserver.url + "/hello_world"
            parsed_url = compat.urlparse.urlparse(url)
            elasticapm_client.begin_transaction("transaction.test")
            with capture_span("test_request", "test"):
    >           httpx.get(url, allow_redirects=False)
    E           TypeError: get() got an unexpected keyword argument 'allow_redirects'
    
    tests/instrumentation/httpx_tests.py:53: TypeError 
    

Initializing / Test / Python-python-3.10-rc-0 / test_httpx_instrumentation_via_client – tests.instrumentation.httpx_tests
    Expand to view the error details

     TypeError: Client.get() got an unexpected keyword argument 'allow_redirects' 
    

    Expand to view the stacktrace

     instrument = None
    elasticapm_client = <tests.fixtures.TempStoreClient object at 0x7fabb6e4f5e0>
    waiting_httpserver = <ContentServer(<class 'pytest_localserver.http.ContentServer'>, started 140375482119936)>
    
        def test_httpx_instrumentation_via_client(instrument, elasticapm_client, waiting_httpserver):
            waiting_httpserver.serve_content("")
            url = waiting_httpserver.url + "/hello_world"
            elasticapm_client.begin_transaction("transaction.test")
            with capture_span("test_request", "test"):
                c = httpx.Client()
    >           c.get(url, allow_redirects=False)
    E           TypeError: Client.get() got an unexpected keyword argument 'allow_redirects'
    
    tests/instrumentation/httpx_tests.py:88: TypeError 
    

Steps errors 14

Expand to view the steps failures

Show only the first 10 steps failures

Shell Script
  • Took 0 min 23 sec . View more details here
  • Description: ./tests/scripts/docker/run_tests.sh python-3.8 httpx-newest
Shell Script
  • Took 0 min 23 sec . View more details here
  • Description: ./tests/scripts/docker/run_tests.sh python-3.8 httpx-newest
Shell Script
  • Took 0 min 23 sec . View more details here
  • Description: ./tests/scripts/docker/run_tests.sh python-3.9 httpx-newest
Shell Script
  • Took 0 min 22 sec . View more details here
  • Description: ./tests/scripts/docker/run_tests.sh python-3.9 httpx-newest
Shell Script
  • Took 0 min 23 sec . View more details here
  • Description: ./tests/scripts/docker/run_tests.sh python-3.10-rc httpx-newest
Shell Script
  • Took 0 min 22 sec . View more details here
  • Description: ./tests/scripts/docker/run_tests.sh python-3.10-rc httpx-newest
Shell Script
  • Took 2 min 32 sec . View more details here
  • Description: ./tests/scripts/docker/run_tests.sh pypy-3 httpx-newest
Shell Script
  • Took 2 min 32 sec . View more details here
  • Description: ./tests/scripts/docker/run_tests.sh pypy-3 httpx-newest
Archive the artifacts
  • Took 0 min 0 sec . View more details here
  • Description: [2021-10-13T12:30:46.488Z] Archiving artifacts Python-python-3.9-httpx-newest tests failed : hudson
Error signal
  • Took 0 min 0 sec . View more details here
  • Description: Python-python-3.6-httpx-newest tests failed : hudson.AbortException: script returned exit code 2

🐛 Flaky test report

❕ There are test failures but not known flaky tests.

Expand to view the summary

Genuine test errors 40

💔 There are test failures but not known flaky tests, most likely a genuine test failure.

  • Name: Initializing / Test / Python-python-3.9-4 / test_httpx_instrumentation – tests.instrumentation.httpx_tests
  • Name: Initializing / Test / Python-python-3.9-4 / test_httpx_instrumentation_via_client – tests.instrumentation.httpx_tests
  • Name: Initializing / Test / Python-python-3.9-4 / test_httpx_error[400] – tests.instrumentation.httpx_tests
  • Name: Initializing / Test / Python-python-3.9-4 / test_httpx_error[500] – tests.instrumentation.httpx_tests
  • Name: Initializing / Test / Python-python-3.9-4 / test_httpx_instrumentation – tests.instrumentation.asyncio_tests.httpx_tests
  • Name: Initializing / Test / Python-python-3.9-4 / test_httpx_instrumentation_string_url – tests.instrumentation.asyncio_tests.httpx_tests
  • Name: Initializing / Test / Python-python-3.9-4 / test_httpx_error[400] – tests.instrumentation.asyncio_tests.httpx_tests
  • Name: Initializing / Test / Python-python-3.9-4 / test_httpx_error[500] – tests.instrumentation.asyncio_tests.httpx_tests
  • Name: Initializing / Test / Python-python-3.10-rc-0 / test_httpx_instrumentation – tests.instrumentation.httpx_tests
  • Name: Initializing / Test / Python-python-3.10-rc-0 / test_httpx_instrumentation_via_client – tests.instrumentation.httpx_tests
  • Name: Initializing / Test / Python-python-3.10-rc-0 / test_httpx_error[400] – tests.instrumentation.httpx_tests
  • Name: Initializing / Test / Python-python-3.10-rc-0 / test_httpx_error[500] – tests.instrumentation.httpx_tests
  • Name: Initializing / Test / Python-python-3.10-rc-0 / test_httpx_instrumentation – tests.instrumentation.asyncio_tests.httpx_tests
  • Name: Initializing / Test / Python-python-3.10-rc-0 / test_httpx_instrumentation_string_url – tests.instrumentation.asyncio_tests.httpx_tests
  • Name: Initializing / Test / Python-python-3.10-rc-0 / test_httpx_error[400] – tests.instrumentation.asyncio_tests.httpx_tests
  • Name: Initializing / Test / Python-python-3.10-rc-0 / test_httpx_error[500] – tests.instrumentation.asyncio_tests.httpx_tests
  • Name: Initializing / Test / Python-python-3.7-4 / test_httpx_instrumentation – tests.instrumentation.httpx_tests
  • Name: Initializing / Test / Python-python-3.7-4 / test_httpx_instrumentation_via_client – tests.instrumentation.httpx_tests
  • Name: Initializing / Test / Python-python-3.7-4 / test_httpx_error[400] – tests.instrumentation.httpx_tests
  • Name: Initializing / Test / Python-python-3.7-4 / test_httpx_error[500] – tests.instrumentation.httpx_tests
  • Name: Initializing / Test / Python-python-3.7-4 / test_httpx_instrumentation – tests.instrumentation.asyncio_tests.httpx_tests
  • Name: Initializing / Test / Python-python-3.7-4 / test_httpx_instrumentation_string_url – tests.instrumentation.asyncio_tests.httpx_tests
  • Name: Initializing / Test / Python-python-3.7-4 / test_httpx_error[400] – tests.instrumentation.asyncio_tests.httpx_tests
  • Name: Initializing / Test / Python-python-3.7-4 / test_httpx_error[500] – tests.instrumentation.asyncio_tests.httpx_tests
  • Name: Initializing / Test / Python-python-3.6-4 / test_httpx_instrumentation – tests.instrumentation.httpx_tests
  • Name: Initializing / Test / Python-python-3.6-4 / test_httpx_instrumentation_via_client – tests.instrumentation.httpx_tests
  • Name: Initializing / Test / Python-python-3.6-4 / test_httpx_error[400] – tests.instrumentation.httpx_tests
  • Name: Initializing / Test / Python-python-3.6-4 / test_httpx_error[500] – tests.instrumentation.httpx_tests
  • Name: Initializing / Test / Python-python-3.8-0 / test_httpx_instrumentation – tests.instrumentation.httpx_tests
  • Name: Initializing / Test / Python-python-3.8-0 / test_httpx_instrumentation_via_client – tests.instrumentation.httpx_tests
  • Name: Initializing / Test / Python-python-3.8-0 / test_httpx_error[400] – tests.instrumentation.httpx_tests
  • Name: Initializing / Test / Python-python-3.8-0 / test_httpx_error[500] – tests.instrumentation.httpx_tests
  • Name: Initializing / Test / Python-python-3.8-0 / test_httpx_instrumentation – tests.instrumentation.asyncio_tests.httpx_tests
  • Name: Initializing / Test / Python-python-3.8-0 / test_httpx_instrumentation_string_url – tests.instrumentation.asyncio_tests.httpx_tests
  • Name: Initializing / Test / Python-python-3.8-0 / test_httpx_error[400] – tests.instrumentation.asyncio_tests.httpx_tests
  • Name: Initializing / Test / Python-python-3.8-0 / test_httpx_error[500] – tests.instrumentation.asyncio_tests.httpx_tests
  • Name: Initializing / Test / Python-pypy-3-2 / test_httpx_instrumentation – tests.instrumentation.httpx_tests
  • Name: Initializing / Test / Python-pypy-3-2 / test_httpx_instrumentation_via_client – tests.instrumentation.httpx_tests
  • Name: Initializing / Test / Python-pypy-3-2 / test_httpx_error[400] – tests.instrumentation.httpx_tests
  • Name: Initializing / Test / Python-pypy-3-2 / test_httpx_error[500] – tests.instrumentation.httpx_tests

🤖 GitHub comments

To re-run your PR in the CI, just comment with:

  • /test : Re-trigger the build.

@beniwohli
Copy link
Contributor Author

merging, the code has been reviewed in #1321, and the test failures are unrelated (breaking change in httpx 0.20)

@beniwohli beniwohli merged commit fc3b9b1 into elastic:master Oct 13, 2021
@beniwohli beniwohli deleted the nested-key-util branch October 13, 2021 13:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants