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

feat(flags): Add unleashed audit-log provider #79659

Closed
wants to merge 40 commits into from

Conversation

aliu39
Copy link
Member

@aliu39 aliu39 commented Oct 24, 2024

@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Oct 24, 2024
Copy link

codecov bot commented Oct 24, 2024

❌ 1 Tests Failed:

Tests completed Failed Passed Skipped
22116 1 22115 218
View the top 1 failed tests by shortest run time
tests.sentry.flags.endpoints.test_hooks.OrganizationFlagsHooksEndpointTestCase test_post_invalid_token_control_silo
Stack Traces | 2.68s run time
#x1B[1m#x1B[31m.venv/lib/python3.12............/site-packages/urllib3/connection.py#x1B[0m:196: in _new_conn
    sock = connection.create_connection(
#x1B[1m#x1B[31m.venv/lib/python3.12.../urllib3/util/connection.py#x1B[0m:60: in create_connection
    for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM):
#x1B[1m#x1B[.../hostedtoolcache/Python/3.12.6............/x64/lib/python3.12/socket.py#x1B[0m:976: in getaddrinfo
    for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
#x1B[1m#x1B[31mE   socket.gaierror: [Errno -3] Temporary failure in name resolution#x1B[0m

#x1B[33mThe above exception was the direct cause of the following exception:#x1B[0m
#x1B[1m#x1B[31m.venv/lib/python3.12........./site-packages/urllib3/connectionpool.py#x1B[0m:789: in urlopen
    response = self._make_request(
#x1B[1m#x1B[31m.venv/lib/python3.12........./site-packages/urllib3/connectionpool.py#x1B[0m:495: in _make_request
    conn.request(
#x1B[1m#x1B[31m.venv/lib/python3.12............/site-packages/urllib3/connection.py#x1B[0m:398: in request
    self.endheaders()
#x1B[1m#x1B[.../hostedtoolcache/Python/3.12.6............/x64/lib/python3.12/http/client.py#x1B[0m:1331: in endheaders
    self._send_output(message_body, encode_chunked=encode_chunked)
#x1B[1m#x1B[.../hostedtoolcache/Python/3.12.6............/x64/lib/python3.12/http/client.py#x1B[0m:1091: in _send_output
    self.send(msg)
#x1B[1m#x1B[.../hostedtoolcache/Python/3.12.6............/x64/lib/python3.12/http/client.py#x1B[0m:1035: in send
    self.connect()
#x1B[1m#x1B[31m.venv/lib/python3.12............/site-packages/urllib3/connection.py#x1B[0m:236: in connect
    self.sock = self._new_conn()
#x1B[1m#x1B[31m.venv/lib/python3.12............/site-packages/urllib3/connection.py#x1B[0m:203: in _new_conn
    raise NameResolutionError(self.host, self, e) from e
#x1B[1m#x1B[31mE   urllib3.exceptions.NameResolutionError: <urllib3.connection.HTTPConnection object at 0x7feb68ce2300>: Failed to resolve 'testserver' ([Errno -3] Temporary failure in name resolution)#x1B[0m

#x1B[33mThe above exception was the direct cause of the following exception:#x1B[0m
#x1B[1m#x1B[31m.venv/lib/python3.12....../site-packages/requests/adapters.py#x1B[0m:486: in send
    resp = conn.urlopen(
#x1B[1m#x1B[31m.venv/lib/python3.12........./site-packages/urllib3/connectionpool.py#x1B[0m:843: in urlopen
    retries = retries.increment(
#x1B[1m#x1B[31m.venv/lib/python3.12.../urllib3/util/retry.py#x1B[0m:519: in increment
    raise MaxRetryError(_pool, url, reason) from reason  # type: ignore[arg-type]
#x1B[1m#x1B[31mE   urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='testserver', port=80): Max retries exceeded with url: .../launchdarkly/token/wrong/ (Caused by NameResolutionError("<urllib3.connection.HTTPConnection object at 0x7feb68ce2300>: Failed to resolve 'testserver' ([Errno -3] Temporary failure in name resolution)"))#x1B[0m

#x1B[33mDuring handling of the above exception, another exception occurred:#x1B[0m
#x1B[1m#x1B[.../flags/endpoints/test_hooks.py#x1B[0m:236: in test_post_invalid_token_control_silo
    self._test_post_invalid_token()
#x1B[1m#x1B[.../flags/endpoints/test_hooks.py#x1B[0m:205: in _test_post_invalid_token
    response = self.client.post(url, {})
#x1B[1m#x1B[31m.venv/lib/python3.12.............../site-packages/rest_framework/test.py#x1B[0m:295: in post
    response = super().post(
#x1B[1m#x1B[31m.venv/lib/python3.12.............../site-packages/rest_framework/test.py#x1B[0m:209: in post
    return self.generic('POST', path, data, content_type, **extra)
#x1B[1m#x1B[31m.venv/lib/python3.12.............../site-packages/rest_framework/test.py#x1B[0m:233: in generic
    return super().generic(
#x1B[1m#x1B[31m.venv/lib/python3.12.../django/test/client.py#x1B[0m:676: in generic
    return self.request(**r)
#x1B[1m#x1B[31m.venv/lib/python3.12.............../site-packages/rest_framework/test.py#x1B[0m:285: in request
    return super().request(**kwargs)
#x1B[1m#x1B[31m.venv/lib/python3.12.............../site-packages/rest_framework/test.py#x1B[0m:237: in request
    request = super().request(**kwargs)
#x1B[1m#x1B[31m.venv/lib/python3.12.../django/test/client.py#x1B[0m:1092: in request
    self.check_exception(response)
#x1B[1m#x1B[31m.venv/lib/python3.12.../django/test/client.py#x1B[0m:805: in check_exception
    raise exc_value
#x1B[1m#x1B[31m.venv/lib/python3.12.../core/handlers/exception.py#x1B[0m:55: in inner
    response = get_response(request)
#x1B[1m#x1B[31m.venv/lib/python3.12.../core/handlers/base.py#x1B[0m:185: in _get_response
    response = middleware_method(
#x1B[1m#x1B[31m.venv/lib/python3.12.../integrations/django/middleware.py#x1B[0m:107: in sentry_wrapped_method
    return old_method(*args, **kwargs)
#x1B[1m#x1B[.../hybridcloud/apigateway/middleware.py#x1B[0m:28: in process_view
    proxy_response = proxy_request_if_needed(request, view_func, view_kwargs)
#x1B[1m#x1B[.../hybridcloud/apigateway/apigateway.py#x1B[0m:75: in proxy_request_if_needed
    return proxy_request(request, org_id_or_slug, url_name)
#x1B[1m#x1B[.../hybridcloud/apigateway/proxy.py#x1B[0m:100: in proxy_request
    return proxy_region_request(request, region, url_name)
#x1B[1m#x1B[.../hybridcloud/apigateway/proxy.py#x1B[0m:204: in proxy_region_request
    resp = external_request(
#x1B[1m#x1B[31m.venv/lib/python3.12.../site-packages/requests/api.py#x1B[0m:59: in request
    return session.request(method=method, url=url, **kwargs)
#x1B[1m#x1B[31m.venv/lib/python3.12....../site-packages/requests/sessions.py#x1B[0m:589: in request
    resp = self.send(prep, **send_kwargs)
#x1B[1m#x1B[31m.venv/lib/python3.12....../site-packages/requests/sessions.py#x1B[0m:703: in send
    r = adapter.send(request, **kwargs)
#x1B[1m#x1B[31m.venv/lib/python3.12....../site-packages/requests/adapters.py#x1B[0m:519: in send
    raise ConnectionError(e, request=request)
#x1B[1m#x1B[31mE   requests.exceptions.ConnectionError: HTTPConnectionPool(host='testserver', port=80): Max retries exceeded with url: .../launchdarkly/token/wrong/ (Caused by NameResolutionError("<urllib3.connection.HTTPConnection object at 0x7feb68ce2300>: Failed to resolve 'testserver' ([Errno -3] Temporary failure in name resolution)"))#x1B[0m

To view individual test run time comparison to the main branch, go to the Test Analytics Dashboard

@aliu39 aliu39 changed the title Initial serializer, supported events, and handle_unleashed_event feat(flags): Add unleashed audit-log provider Oct 24, 2024
)
createdBy = serializers.EmailField(required=True)

createdByUserId = serializers.IntegerField(required=False)
Copy link
Member Author

Choose a reason for hiding this comment

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

Note to self: unused fields can be dropped, the serializer will just skip them.

@aliu39 aliu39 force-pushed the aliu/unleashed-provider branch from 4939443 to 409791f Compare October 24, 2024 19:02
Base automatically changed from mz/ld-provider to master October 28, 2024 13:30
@getsantry
Copy link
Contributor

getsantry bot commented Nov 19, 2024

This issue has gone three weeks without activity. In another week, I will close it.

But! If you comment or otherwise update it, I will reset the clock, and if you remove the label Waiting for: Community, I will leave it alone ... forever!


"A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀

@getsantry getsantry bot added Stale and removed Stale labels Nov 19, 2024
@getsantry
Copy link
Contributor

getsantry bot commented Dec 12, 2024

This issue has gone three weeks without activity. In another week, I will close it.

But! If you comment or otherwise update it, I will reset the clock, and if you remove the label Waiting for: Community, I will leave it alone ... forever!


"A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀

@getsantry getsantry bot added Stale and removed Stale labels Dec 12, 2024
@cmanallen cmanallen closed this Dec 18, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Jan 3, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Scope: Backend Automatically applied to PRs that change backend components
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants