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 async connector to use configurable rate limiter #108

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Update async connector to use configurable rate limiter

4be107b
Select commit
Loading
Failed to load commit list.
Sign in for the full log view
Open

Update async connector to use configurable rate limiter #108

Update async connector to use configurable rate limiter
4be107b
Select commit
Loading
Failed to load commit list.
GitHub Actions / Test Results failed Feb 13, 2024 in 0s

23 errors, 12 fail, 1 skipped, 135 pass in 50s

171 tests   135 ✅  50s ⏱️
  1 suites    1 💤
  1 files     12 ❌  23 🔥

Results for commit 4be107b.

Annotations

Check warning on line 0 in tests.test_trigger

See this annotation in the file changed.

@github-actions github-actions / Test Results

test_is_error_critical_errors (tests.test_trigger) failed

junit.xml [took 0s]
Raw output
IndexError: list index out of range
def test_is_error_critical_errors():
>       trigger = DummyTrigger()

tests/test_trigger.py:586: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
sekoia_automation/trigger.py:58: in __init__
    super().__init__(module, data_path)
sekoia_automation/module.py:343: in __init__
    self._setup_logging()
sekoia_automation/module.py:352: in _setup_logging
    sentry_sdk.set_tag("name", self.name)
.venv/lib/python3.11/site-packages/sentry_sdk/api.py:169: in set_tag
    return Hub.current.scope.set_tag(key, value)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <sentry_sdk.hub.Hub object at 0x7ff2e8d120d0>

    @property
    def scope(self):
        # type: () -> Scope
        """Returns the current scope on the hub."""
>       return self._stack[-1][1]
E       IndexError: list index out of range

.venv/lib/python3.11/site-packages/sentry_sdk/hub.py:320: IndexError

Check warning on line 0 in tests.test_trigger

See this annotation in the file changed.

@github-actions github-actions / Test Results

test_is_error_critical_time_since_last_event (tests.test_trigger) failed

junit.xml [took 0s]
Raw output
IndexError: list index out of range
def test_is_error_critical_time_since_last_event():
>       trigger = DummyTrigger()

tests/test_trigger.py:596: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
sekoia_automation/trigger.py:58: in __init__
    super().__init__(module, data_path)
sekoia_automation/module.py:343: in __init__
    self._setup_logging()
sekoia_automation/module.py:352: in _setup_logging
    sentry_sdk.set_tag("name", self.name)
.venv/lib/python3.11/site-packages/sentry_sdk/api.py:169: in set_tag
    return Hub.current.scope.set_tag(key, value)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <sentry_sdk.hub.Hub object at 0x7ff2e8d120d0>

    @property
    def scope(self):
        # type: () -> Scope
        """Returns the current scope on the hub."""
>       return self._stack[-1][1]
E       IndexError: list index out of range

.venv/lib/python3.11/site-packages/sentry_sdk/hub.py:320: IndexError

Check failure on line 0 in tests.aio.test_connector

See this annotation in the file changed.

@github-actions github-actions / Test Results

test_async_connector_rate_limiter (tests.aio.test_connector) with error

junit.xml [took 0s]
Raw output
failed on setup with "IndexError: list index out of range"
storage = PosixPath('/tmp/tmp1v_gd5lh')
mocked_trigger_logs = <requests_mock.mocker.Mocker object at 0x7ff2e41cc310>
faker = <faker.proxy.Faker object at 0x7ff2e69e2610>

    @pytest.fixture
    def async_connector(storage, mocked_trigger_logs, faker: Faker):
        with patch("sentry_sdk.set_tag"):
            async_connector = DummyAsyncConnector(data_path=storage)
    
            async_connector.trigger_activation = "2022-03-14T11:16:14.236930Z"
>           async_connector.configuration = {
                "intake_key": "",
                "intake_server": faker.uri(),
            }

tests/aio/test_connector.py:29: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
sekoia_automation/connector/__init__.py:77: in configuration
    sentry_sdk.set_context(
.venv/lib/python3.11/site-packages/sentry_sdk/api.py:175: in set_context
    return Hub.current.scope.set_context(key, value)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <sentry_sdk.hub.Hub object at 0x7ff2e8d120d0>

    @property
    def scope(self):
        # type: () -> Scope
        """Returns the current scope on the hub."""
>       return self._stack[-1][1]
E       IndexError: list index out of range

.venv/lib/python3.11/site-packages/sentry_sdk/hub.py:320: IndexError

Check failure on line 0 in tests.aio.test_connector

See this annotation in the file changed.

@github-actions github-actions / Test Results

test_async_connector_client_session (tests.aio.test_connector) with error

junit.xml [took 0s]
Raw output
failed on setup with "IndexError: list index out of range"
storage = PosixPath('/tmp/tmpixpv_3g4')
mocked_trigger_logs = <requests_mock.mocker.Mocker object at 0x7ff2e03345d0>
faker = <faker.proxy.Faker object at 0x7ff2e69e2610>

    @pytest.fixture
    def async_connector(storage, mocked_trigger_logs, faker: Faker):
        with patch("sentry_sdk.set_tag"):
            async_connector = DummyAsyncConnector(data_path=storage)
    
            async_connector.trigger_activation = "2022-03-14T11:16:14.236930Z"
>           async_connector.configuration = {
                "intake_key": "",
                "intake_server": faker.uri(),
            }

tests/aio/test_connector.py:29: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
sekoia_automation/connector/__init__.py:77: in configuration
    sentry_sdk.set_context(
.venv/lib/python3.11/site-packages/sentry_sdk/api.py:175: in set_context
    return Hub.current.scope.set_context(key, value)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <sentry_sdk.hub.Hub object at 0x7ff2e8d120d0>

    @property
    def scope(self):
        # type: () -> Scope
        """Returns the current scope on the hub."""
>       return self._stack[-1][1]
E       IndexError: list index out of range

.venv/lib/python3.11/site-packages/sentry_sdk/hub.py:320: IndexError

Check failure on line 0 in tests.aio.test_connector

See this annotation in the file changed.

@github-actions github-actions / Test Results

test_async_connector_push_single_event (tests.aio.test_connector) with error

junit.xml [took 0s]
Raw output
failed on setup with "IndexError: list index out of range"
storage = PosixPath('/tmp/tmpapdhlcp2')
mocked_trigger_logs = <requests_mock.mocker.Mocker object at 0x7ff2e3d94f50>
faker = <faker.proxy.Faker object at 0x7ff2e69e2610>

    @pytest.fixture
    def async_connector(storage, mocked_trigger_logs, faker: Faker):
        with patch("sentry_sdk.set_tag"):
            async_connector = DummyAsyncConnector(data_path=storage)
    
            async_connector.trigger_activation = "2022-03-14T11:16:14.236930Z"
>           async_connector.configuration = {
                "intake_key": "",
                "intake_server": faker.uri(),
            }

tests/aio/test_connector.py:29: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
sekoia_automation/connector/__init__.py:77: in configuration
    sentry_sdk.set_context(
.venv/lib/python3.11/site-packages/sentry_sdk/api.py:175: in set_context
    return Hub.current.scope.set_context(key, value)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <sentry_sdk.hub.Hub object at 0x7ff2e8d120d0>

    @property
    def scope(self):
        # type: () -> Scope
        """Returns the current scope on the hub."""
>       return self._stack[-1][1]
E       IndexError: list index out of range

.venv/lib/python3.11/site-packages/sentry_sdk/hub.py:320: IndexError

Check failure on line 0 in tests.aio.test_connector

See this annotation in the file changed.

@github-actions github-actions / Test Results

test_async_connector_push_multiple_events (tests.aio.test_connector) with error

junit.xml [took 0s]
Raw output
failed on setup with "IndexError: list index out of range"
storage = PosixPath('/tmp/tmp7jrfboa9')
mocked_trigger_logs = <requests_mock.mocker.Mocker object at 0x7ff2e03dd4d0>
faker = <faker.proxy.Faker object at 0x7ff2e69e2610>

    @pytest.fixture
    def async_connector(storage, mocked_trigger_logs, faker: Faker):
        with patch("sentry_sdk.set_tag"):
            async_connector = DummyAsyncConnector(data_path=storage)
    
            async_connector.trigger_activation = "2022-03-14T11:16:14.236930Z"
>           async_connector.configuration = {
                "intake_key": "",
                "intake_server": faker.uri(),
            }

tests/aio/test_connector.py:29: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
sekoia_automation/connector/__init__.py:77: in configuration
    sentry_sdk.set_context(
.venv/lib/python3.11/site-packages/sentry_sdk/api.py:175: in set_context
    return Hub.current.scope.set_context(key, value)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <sentry_sdk.hub.Hub object at 0x7ff2e8d120d0>

    @property
    def scope(self):
        # type: () -> Scope
        """Returns the current scope on the hub."""
>       return self._stack[-1][1]
E       IndexError: list index out of range

.venv/lib/python3.11/site-packages/sentry_sdk/hub.py:320: IndexError

Check failure on line 0 in tests.aio.test_connector

See this annotation in the file changed.

@github-actions github-actions / Test Results

test_async_connector_raise_error (tests.aio.test_connector) with error

junit.xml [took 0s]
Raw output
failed on setup with "IndexError: list index out of range"
storage = PosixPath('/tmp/tmpwh3t5vuw')
mocked_trigger_logs = <requests_mock.mocker.Mocker object at 0x7ff2e45d73d0>
faker = <faker.proxy.Faker object at 0x7ff2e69e2610>

    @pytest.fixture
    def async_connector(storage, mocked_trigger_logs, faker: Faker):
        with patch("sentry_sdk.set_tag"):
            async_connector = DummyAsyncConnector(data_path=storage)
    
            async_connector.trigger_activation = "2022-03-14T11:16:14.236930Z"
>           async_connector.configuration = {
                "intake_key": "",
                "intake_server": faker.uri(),
            }

tests/aio/test_connector.py:29: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
sekoia_automation/connector/__init__.py:77: in configuration
    sentry_sdk.set_context(
.venv/lib/python3.11/site-packages/sentry_sdk/api.py:175: in set_context
    return Hub.current.scope.set_context(key, value)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <sentry_sdk.hub.Hub object at 0x7ff2e8d120d0>

    @property
    def scope(self):
        # type: () -> Scope
        """Returns the current scope on the hub."""
>       return self._stack[-1][1]
E       IndexError: list index out of range

.venv/lib/python3.11/site-packages/sentry_sdk/hub.py:320: IndexError

Check warning on line 0 in tests.aio.test_connector

See this annotation in the file changed.

@github-actions github-actions / Test Results

test_session (tests.aio.test_connector) failed

junit.xml [took 0s]
Raw output
IndexError: list index out of range
@pytest.mark.asyncio
    async def test_session():
>       async with AsyncConnector.session() as session:

tests/aio/test_connector.py:229: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/opt/hostedtoolcache/Python/3.11.8/x64/lib/python3.11/contextlib.py:210: in __aenter__
    return await anext(self.gen)
sekoia_automation/aio/connector.py:100: in session
    cls._session = ClientSession()
.venv/lib/python3.11/site-packages/sentry_sdk/integrations/aiohttp.py:183: in init
    if hub.get_integration(AioHttpIntegration) is None:
.venv/lib/python3.11/site-packages/sentry_sdk/hub.py:304: in get_integration
    client = self.client
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <sentry_sdk.hub.Hub object at 0x7ff2e8d120d0>

    @property
    def client(self):
        # type: () -> Optional[Client]
        """Returns the current client on the hub."""
>       return self._stack[-1][0]
E       IndexError: list index out of range

.venv/lib/python3.11/site-packages/sentry_sdk/hub.py:314: IndexError

Check warning on line 0 in tests.aio.helpers.test_file_utils

See this annotation in the file changed.

@github-actions github-actions / Test Results

test_delete_file (tests.aio.helpers.test_file_utils) failed

junit.xml [took 0s]
Raw output
IndexError: list index out of range
tmp_path = PosixPath('/tmp/pytest-of-runner/pytest-0/test_delete_file0')
session_faker = <faker.proxy.Faker object at 0x7ff2e02b0450>
random_text = 'Try night decision. Structure arm everybody decide. Former she never dog low likely be himself. Building tend much. Class relationship despite.'

    @pytest.mark.asyncio
    async def test_delete_file(tmp_path, session_faker, random_text):
        """
        Test delete_file.
    
        Args:
            tmp_path: Path
            session_faker: Faker
            random_text: str
        """
        file_path = os.path.join(tmp_path, session_faker.word())
        with open(file_path, "w+") as file:
            file.write(random_text)
    
        assert os.path.exists(file_path)
    
>       await delete_file(file_path)

tests/aio/helpers/test_file_utils.py:61: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
sekoia_automation/aio/helpers/files/utils.py:13: in delete_file
    await aio_os.remove(file_name)
.venv/lib/python3.11/site-packages/aiofiles/ospath.py:13: in run
    return await loop.run_in_executor(executor, pfunc)
/opt/hostedtoolcache/Python/3.11.8/x64/lib/python3.11/asyncio/base_events.py:830: in run_in_executor
    executor.submit(func, *args), loop=self)
/opt/hostedtoolcache/Python/3.11.8/x64/lib/python3.11/concurrent/futures/thread.py:176: in submit
    self._adjust_thread_count()
/opt/hostedtoolcache/Python/3.11.8/x64/lib/python3.11/concurrent/futures/thread.py:199: in _adjust_thread_count
    t.start()
.venv/lib/python3.11/site-packages/sentry_sdk/integrations/threading.py:40: in sentry_start
    integration = hub.get_integration(ThreadingIntegration)
.venv/lib/python3.11/site-packages/sentry_sdk/hub.py:304: in get_integration
    client = self.client
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <sentry_sdk.hub.Hub object at 0x7ff2e8d120d0>

    @property
    def client(self):
        # type: () -> Optional[Client]
        """Returns the current client on the hub."""
>       return self._stack[-1][0]
E       IndexError: list index out of range

.venv/lib/python3.11/site-packages/sentry_sdk/hub.py:314: IndexError

Check warning on line 0 in tests.aio.helpers.test_file_utils

See this annotation in the file changed.

@github-actions github-actions / Test Results

test_csv_file_content (tests.aio.helpers.test_file_utils) failed

junit.xml [took 0s]
Raw output
IndexError: list index out of range
tmp_path = PosixPath('/tmp/pytest-of-runner/pytest-0/test_csv_file_content0')
session_faker = <faker.proxy.Faker object at 0x7ff2e02b0450>
csv_content = 'SAVE,EYE,ALWAYS\nagain,success,five\nimpact,gun,home\ngo,discover,third\nglass,address,similar\npeople,our,but\nyes,m...al,baby\nfast,in,son\nalmost,ten,manage\nwalk,lead,else\nalso,person,dog\nseveral,white,challenge\nfree,seek,knowledge'

    @pytest.mark.asyncio
    async def test_csv_file_content(tmp_path, session_faker, csv_content):
        """
        Test read file content as csv.
    
        Args:
            tmp_path: Path
            session_faker: Faker
            csv_content: str
        """
        file_path = os.path.join(tmp_path, session_faker.word())
        with open(file_path, "w+") as file:
            file.write(csv_content)
    
        result = []
>       async for row in csv_file_as_rows(file_path):

tests/aio/helpers/test_file_utils.py:81: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
sekoia_automation/aio/helpers/files/csv.py:26: in csv_file_as_rows
    async with aiofiles.open(file_path, encoding=encoding) as file:
.venv/lib/python3.11/site-packages/aiofiles/base.py:98: in __aenter__
    self._obj = await self._coro
.venv/lib/python3.11/site-packages/aiofiles/threadpool/__init__.py:94: in _open
    f = yield from loop.run_in_executor(executor, cb)
/opt/hostedtoolcache/Python/3.11.8/x64/lib/python3.11/asyncio/base_events.py:830: in run_in_executor
    executor.submit(func, *args), loop=self)
/opt/hostedtoolcache/Python/3.11.8/x64/lib/python3.11/concurrent/futures/thread.py:176: in submit
    self._adjust_thread_count()
/opt/hostedtoolcache/Python/3.11.8/x64/lib/python3.11/concurrent/futures/thread.py:199: in _adjust_thread_count
    t.start()
.venv/lib/python3.11/site-packages/sentry_sdk/integrations/threading.py:40: in sentry_start
    integration = hub.get_integration(ThreadingIntegration)
.venv/lib/python3.11/site-packages/sentry_sdk/hub.py:304: in get_integration
    client = self.client
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <sentry_sdk.hub.Hub object at 0x7ff2e8d120d0>

    @property
    def client(self):
        # type: () -> Optional[Client]
        """Returns the current client on the hub."""
>       return self._stack[-1][0]
E       IndexError: list index out of range

.venv/lib/python3.11/site-packages/sentry_sdk/hub.py:314: IndexError

Check warning on line 0 in tests.aio.helpers.http.test_http_client_session

See this annotation in the file changed.

@github-actions github-actions / Test Results

test_http_client_get_data (tests.aio.helpers.http.test_http_client_session) failed

junit.xml [took 0s]
Raw output
IndexError: list index out of range
session_faker = <faker.proxy.Faker object at 0x7ff2e02b0450>
http_client = <tests.aio.helpers.http.test_http_client_session.CustomHttpClient object at 0x7ff2e391d410>
base_url = 'https://fitzgerald.info/tags/searchfaq.php'
auth_url = 'http://www.scott-hughes.biz/wp-contentregister.php'

    @pytest.mark.asyncio
    async def test_http_client_get_data(session_faker, http_client, base_url, auth_url):
        """
        Test http_client get data.
    
        Args:
            session_faker: Faker
            http_client: CustomHttpClient
            base_url: str
            auth_url: str
        """
        token_response = TokenResponse(access_token=session_faker.word())
    
        get_test_data_response = {
            session_faker.word(): session_faker.word(),
            session_faker.word(): session_faker.word(),
        }
    
        with aioresponses() as mocked_responses:
            mocked_responses.post(auth_url, payload=token_response.dict())
            mocked_responses.get(f"{base_url}/test", payload=get_test_data_response)
    
>           test_data = await http_client.get_test_data(url=f"{base_url}/test")

tests/aio/helpers/http/test_http_client_session.py:149: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
tests/aio/helpers/http/test_http_client_session.py:78: in get_test_data
    async with self.token_refresher.with_access_token() as access_token:
/opt/hostedtoolcache/Python/3.11.8/x64/lib/python3.11/contextlib.py:210: in __aenter__
    return await anext(self.gen)
sekoia_automation/aio/helpers/http/token_refresher.py:145: in with_access_token
    await self._refresh_token()
sekoia_automation/aio/helpers/http/token_refresher.py:111: in _refresh_token
    self._token = await self.get_token()
tests/aio/helpers/http/test_http_client_session.py:32: in get_token
    async with self.session().post(url=self.auth_url, json={}) as response:
sekoia_automation/aio/helpers/http/token_refresher.py:88: in session
    self._session = ClientSession()
.venv/lib/python3.11/site-packages/sentry_sdk/integrations/aiohttp.py:183: in init
    if hub.get_integration(AioHttpIntegration) is None:
.venv/lib/python3.11/site-packages/sentry_sdk/hub.py:304: in get_integration
    client = self.client
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <sentry_sdk.hub.Hub object at 0x7ff2e8d120d0>

    @property
    def client(self):
        # type: () -> Optional[Client]
        """Returns the current client on the hub."""
>       return self._stack[-1][0]
E       IndexError: list index out of range

.venv/lib/python3.11/site-packages/sentry_sdk/hub.py:314: IndexError

Check warning on line 0 in tests.aio.helpers.http.test_http_client_session

See this annotation in the file changed.

@github-actions github-actions / Test Results

test_http_client_get_data_async_limiter (tests.aio.helpers.http.test_http_client_session) failed

junit.xml [took 0s]
Raw output
IndexError: list index out of range
session_faker = <faker.proxy.Faker object at 0x7ff2e02b0450>
http_client = <tests.aio.helpers.http.test_http_client_session.CustomHttpClient object at 0x7ff2e03f1150>
base_url = 'https://www.torres.com/tagregister.html'
auth_url = 'http://www.adams.info/tag/explore/mainauthor.jsp'

    @pytest.mark.asyncio
    async def test_http_client_get_data_async_limiter(
        session_faker,
        http_client,
        base_url,
        auth_url,
    ):
        """
        Test http_client get data with async_limiter.
    
        Args:
            session_faker: Faker
            http_client: CustomHttpClient
            base_url: str
            auth_url: str
        """
        token_response = TokenResponse(access_token=session_faker.word())
    
        # 1 request per 3 seconds
        http_client.set_rate_limit(1, 3)
    
        get_test_data_response = {
            session_faker.word(): session_faker.word(),
            session_faker.word(): session_faker.word(),
        }
    
        with aioresponses() as mocked_responses:
            start_query_time = time.time()
            mocked_responses.post(auth_url, payload=token_response.dict())
            mocked_responses.get(f"{base_url}/test", payload=get_test_data_response)
>           await http_client.get_test_data(url=f"{base_url}/test")

tests/aio/helpers/http/test_http_client_session.py:188: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
tests/aio/helpers/http/test_http_client_session.py:78: in get_test_data
    async with self.token_refresher.with_access_token() as access_token:
/opt/hostedtoolcache/Python/3.11.8/x64/lib/python3.11/contextlib.py:210: in __aenter__
    return await anext(self.gen)
sekoia_automation/aio/helpers/http/token_refresher.py:145: in with_access_token
    await self._refresh_token()
sekoia_automation/aio/helpers/http/token_refresher.py:111: in _refresh_token
    self._token = await self.get_token()
tests/aio/helpers/http/test_http_client_session.py:32: in get_token
    async with self.session().post(url=self.auth_url, json={}) as response:
sekoia_automation/aio/helpers/http/token_refresher.py:88: in session
    self._session = ClientSession()
.venv/lib/python3.11/site-packages/sentry_sdk/integrations/aiohttp.py:183: in init
    if hub.get_integration(AioHttpIntegration) is None:
.venv/lib/python3.11/site-packages/sentry_sdk/hub.py:304: in get_integration
    client = self.client
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <sentry_sdk.hub.Hub object at 0x7ff2e8d120d0>

    @property
    def client(self):
        # type: () -> Optional[Client]
        """Returns the current client on the hub."""
>       return self._stack[-1][0]
E       IndexError: list index out of range

.venv/lib/python3.11/site-packages/sentry_sdk/hub.py:314: IndexError

Check warning on line 0 in tests.aio.helpers.http.test_http_token_refresher

See this annotation in the file changed.

@github-actions github-actions / Test Results

test_token_refresher_1 (tests.aio.helpers.http.test_http_token_refresher) failed

junit.xml [took 0s]
Raw output
IndexError: list index out of range
session_faker = <faker.proxy.Faker object at 0x7ff2e02b0450>

    @pytest.mark.asyncio
    async def test_token_refresher_1(session_faker):
        """
        Test token refresher with ttl from class.
    
        Args:
            session_faker: Faker
        """
        token_response = CustomTokenResponse(
            access_token=session_faker.word(),
            signature=session_faker.word(),
            random_field=session_faker.word(),
        )
    
        client_id = session_faker.word()
        client_secret = session_faker.word()
        auth_url = session_faker.uri()
    
        token_refresher = await CustomTokenRefresher.get_instance(
            client_id,
            client_secret,
            auth_url,
        )
    
        assert token_refresher == await CustomTokenRefresher.get_instance(
            client_id,
            client_secret,
            auth_url,
        )
    
        with aioresponses() as mocked_responses:
            mocked_responses.post(auth_url, payload=token_response.dict())
>           await token_refresher._refresh_token()

tests/aio/helpers/http/test_http_token_refresher.py:148: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
sekoia_automation/aio/helpers/http/token_refresher.py:111: in _refresh_token
    self._token = await self.get_token()
tests/aio/helpers/http/test_http_token_refresher.py:103: in get_token
    async with self.session().post(url=self.auth_url, json={}) as response:
sekoia_automation/aio/helpers/http/token_refresher.py:88: in session
    self._session = ClientSession()
.venv/lib/python3.11/site-packages/sentry_sdk/integrations/aiohttp.py:183: in init
    if hub.get_integration(AioHttpIntegration) is None:
.venv/lib/python3.11/site-packages/sentry_sdk/hub.py:304: in get_integration
    client = self.client
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <sentry_sdk.hub.Hub object at 0x7ff2e8d120d0>

    @property
    def client(self):
        # type: () -> Optional[Client]
        """Returns the current client on the hub."""
>       return self._stack[-1][0]
E       IndexError: list index out of range

.venv/lib/python3.11/site-packages/sentry_sdk/hub.py:314: IndexError

Check warning on line 0 in tests.aio.helpers.http.test_http_token_refresher

See this annotation in the file changed.

@github-actions github-actions / Test Results

test_token_refresher_2 (tests.aio.helpers.http.test_http_token_refresher) failed

junit.xml [took 0s]
Raw output
IndexError: list index out of range
session_faker = <faker.proxy.Faker object at 0x7ff2e02b0450>

    @pytest.mark.asyncio
    async def test_token_refresher_2(session_faker):
        """
        Test token refresher with ttl from server response.
    
        Args:
            session_faker: Faker
        """
        token_response = {
            "access_token": session_faker.word(),
            "signature": session_faker.word(),
            "random_field": session_faker.word(),
            "expires_in": session_faker.pyint(),
        }
    
        client_id = session_faker.word()
        client_secret = session_faker.word()
        auth_url = session_faker.uri()
    
        with aioresponses() as mocked_responses:
            token_refresher = CustomTokenRefresher(
                client_id,
                client_secret,
                auth_url,
            )
    
            mocked_responses.post(auth_url, payload=token_response)
>           await token_refresher._refresh_token()

tests/aio/helpers/http/test_http_token_refresher.py:187: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
sekoia_automation/aio/helpers/http/token_refresher.py:111: in _refresh_token
    self._token = await self.get_token()
tests/aio/helpers/http/test_http_token_refresher.py:103: in get_token
    async with self.session().post(url=self.auth_url, json={}) as response:
sekoia_automation/aio/helpers/http/token_refresher.py:88: in session
    self._session = ClientSession()
.venv/lib/python3.11/site-packages/sentry_sdk/integrations/aiohttp.py:183: in init
    if hub.get_integration(AioHttpIntegration) is None:
.venv/lib/python3.11/site-packages/sentry_sdk/hub.py:304: in get_integration
    client = self.client
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <sentry_sdk.hub.Hub object at 0x7ff2e8d120d0>

    @property
    def client(self):
        # type: () -> Optional[Client]
        """Returns the current client on the hub."""
>       return self._stack[-1][0]
E       IndexError: list index out of range

.venv/lib/python3.11/site-packages/sentry_sdk/hub.py:314: IndexError

Check warning on line 0 in tests.aio.helpers.http.test_http_token_refresher

See this annotation in the file changed.

@github-actions github-actions / Test Results

test_token_refresher_with_token (tests.aio.helpers.http.test_http_token_refresher) failed

junit.xml [took 0s]
Raw output
IndexError: list index out of range
session_faker = <faker.proxy.Faker object at 0x7ff2e02b0450>

    @pytest.mark.asyncio
    async def test_token_refresher_with_token(session_faker):
        """
        Test token refresher with ttl from server response.
    
        Args:
            session_faker: Faker
        """
        token_response = {
            "access_token": session_faker.word(),
            "signature": session_faker.word(),
            "random_field": session_faker.word(),
            "expires_in": session_faker.pyint(),
        }
    
        client_id = session_faker.word()
        client_secret = session_faker.word()
        auth_url = session_faker.uri()
    
        with aioresponses() as mocked_responses:
            token_refresher = CustomTokenRefresher(
                client_id,
                client_secret,
                auth_url,
            )
    
            mocked_responses.post(auth_url, payload=token_response)
>           async with token_refresher.with_access_token() as generated_token:

tests/aio/helpers/http/test_http_token_refresher.py:230: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/opt/hostedtoolcache/Python/3.11.8/x64/lib/python3.11/contextlib.py:210: in __aenter__
    return await anext(self.gen)
sekoia_automation/aio/helpers/http/token_refresher.py:145: in with_access_token
    await self._refresh_token()
sekoia_automation/aio/helpers/http/token_refresher.py:111: in _refresh_token
    self._token = await self.get_token()
tests/aio/helpers/http/test_http_token_refresher.py:103: in get_token
    async with self.session().post(url=self.auth_url, json={}) as response:
sekoia_automation/aio/helpers/http/token_refresher.py:88: in session
    self._session = ClientSession()
.venv/lib/python3.11/site-packages/sentry_sdk/integrations/aiohttp.py:183: in init
    if hub.get_integration(AioHttpIntegration) is None:
.venv/lib/python3.11/site-packages/sentry_sdk/hub.py:304: in get_integration
    client = self.client
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <sentry_sdk.hub.Hub object at 0x7ff2e8d120d0>

    @property
    def client(self):
        # type: () -> Optional[Client]
        """Returns the current client on the hub."""
>       return self._stack[-1][0]
E       IndexError: list index out of range

.venv/lib/python3.11/site-packages/sentry_sdk/hub.py:314: IndexError

Check warning on line 0 in tests.aio.helpers.http.test_http_utils

See this annotation in the file changed.

@github-actions github-actions / Test Results

test_save_response_to_temporary_file (tests.aio.helpers.http.test_http_utils) failed

junit.xml [took 0s]
Raw output
IndexError: list index out of range
tmp_path = PosixPath('/tmp/pytest-of-runner/pytest-0/test_save_response_to_temporar0')
session_faker = <faker.proxy.Faker object at 0x7ff2e02b0450>

    @pytest.mark.asyncio
    async def test_save_response_to_temporary_file(tmp_path, session_faker):
        """
        Test save response to file.
    
        Args:
            tmp_path: Path
            session_faker: Faker
        """
        data = session_faker.json(
            data_columns={"test": ["name", "name", "name"]},
            num_rows=1000,
        )
        with aioresponses() as mocked_responses:
            url = session_faker.uri()
            mocked_responses.get(
                url=url,
                status=200,
                body=data,
                headers={"Content-Length": f"{len(data)}"},
            )
    
>           async with ClientSession() as session:

tests/aio/helpers/http/test_http_utils.py:36: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.venv/lib/python3.11/site-packages/sentry_sdk/integrations/aiohttp.py:183: in init
    if hub.get_integration(AioHttpIntegration) is None:
.venv/lib/python3.11/site-packages/sentry_sdk/hub.py:304: in get_integration
    client = self.client
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <sentry_sdk.hub.Hub object at 0x7ff2e8d120d0>

    @property
    def client(self):
        # type: () -> Optional[Client]
        """Returns the current client on the hub."""
>       return self._stack[-1][0]
E       IndexError: list index out of range

.venv/lib/python3.11/site-packages/sentry_sdk/hub.py:314: IndexError

Check failure on line 0 in tests.connectors.test_connector

See this annotation in the file changed.

@github-actions github-actions / Test Results

test_check_http_default_headers (tests.connectors.test_connector) with error

junit.xml [took 0s]
Raw output
failed on setup with "IndexError: list index out of range"
storage = PosixPath('/tmp/tmp_nrrj7hc')
mocked_trigger_logs = <requests_mock.mocker.Mocker object at 0x7ff2e41b6150>

    @pytest.fixture
    def test_connector(storage, mocked_trigger_logs):
        with patch("sentry_sdk.set_tag"):
            test_connector = DummyConnector(data_path=storage)
            test_connector.send_event = Mock()
    
            test_connector.trigger_activation = "2022-03-14T11:16:14.236930Z"
>           test_connector.configuration = {"intake_key": ""}

tests/connectors/test_connector.py:29: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
sekoia_automation/connector/__init__.py:77: in configuration
    sentry_sdk.set_context(
.venv/lib/python3.11/site-packages/sentry_sdk/api.py:175: in set_context
    return Hub.current.scope.set_context(key, value)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <sentry_sdk.hub.Hub object at 0x7ff2e8d120d0>

    @property
    def scope(self):
        # type: () -> Scope
        """Returns the current scope on the hub."""
>       return self._stack[-1][1]
E       IndexError: list index out of range

.venv/lib/python3.11/site-packages/sentry_sdk/hub.py:320: IndexError

Check failure on line 0 in tests.connectors.test_connector

See this annotation in the file changed.

@github-actions github-actions / Test Results

test_forward_events (tests.connectors.test_connector) with error

junit.xml [took 0s]
Raw output
failed on setup with "IndexError: list index out of range"
storage = PosixPath('/tmp/tmpy8tsr5ki')
mocked_trigger_logs = <requests_mock.mocker.Mocker object at 0x7ff2e086d150>

    @pytest.fixture
    def test_connector(storage, mocked_trigger_logs):
        with patch("sentry_sdk.set_tag"):
            test_connector = DummyConnector(data_path=storage)
            test_connector.send_event = Mock()
    
            test_connector.trigger_activation = "2022-03-14T11:16:14.236930Z"
>           test_connector.configuration = {"intake_key": ""}

tests/connectors/test_connector.py:29: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
sekoia_automation/connector/__init__.py:77: in configuration
    sentry_sdk.set_context(
.venv/lib/python3.11/site-packages/sentry_sdk/api.py:175: in set_context
    return Hub.current.scope.set_context(key, value)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <sentry_sdk.hub.Hub object at 0x7ff2e8d120d0>

    @property
    def scope(self):
        # type: () -> Scope
        """Returns the current scope on the hub."""
>       return self._stack[-1][1]
E       IndexError: list index out of range

.venv/lib/python3.11/site-packages/sentry_sdk/hub.py:320: IndexError

Check failure on line 0 in tests.connectors.test_connector

See this annotation in the file changed.

@github-actions github-actions / Test Results

test_send_records_to_file (tests.connectors.test_connector) with error

junit.xml [took 0s]
Raw output
failed on setup with "IndexError: list index out of range"
storage = PosixPath('/tmp/tmphjq37153')
mocked_trigger_logs = <requests_mock.mocker.Mocker object at 0x7ff2e0168a90>

    @pytest.fixture
    def test_connector(storage, mocked_trigger_logs):
        with patch("sentry_sdk.set_tag"):
            test_connector = DummyConnector(data_path=storage)
            test_connector.send_event = Mock()
    
            test_connector.trigger_activation = "2022-03-14T11:16:14.236930Z"
>           test_connector.configuration = {"intake_key": ""}

tests/connectors/test_connector.py:29: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
sekoia_automation/connector/__init__.py:77: in configuration
    sentry_sdk.set_context(
.venv/lib/python3.11/site-packages/sentry_sdk/api.py:175: in set_context
    return Hub.current.scope.set_context(key, value)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <sentry_sdk.hub.Hub object at 0x7ff2e8d120d0>

    @property
    def scope(self):
        # type: () -> Scope
        """Returns the current scope on the hub."""
>       return self._stack[-1][1]
E       IndexError: list index out of range

.venv/lib/python3.11/site-packages/sentry_sdk/hub.py:320: IndexError

Check failure on line 0 in tests.connectors.test_connector

See this annotation in the file changed.

@github-actions github-actions / Test Results

test_send_records (tests.connectors.test_connector) with error

junit.xml [took 0s]
Raw output
failed on setup with "IndexError: list index out of range"
storage = PosixPath('/tmp/tmpfi9sa_e3')
mocked_trigger_logs = <requests_mock.mocker.Mocker object at 0x7ff2e5d1e8d0>

    @pytest.fixture
    def test_connector(storage, mocked_trigger_logs):
        with patch("sentry_sdk.set_tag"):
            test_connector = DummyConnector(data_path=storage)
            test_connector.send_event = Mock()
    
            test_connector.trigger_activation = "2022-03-14T11:16:14.236930Z"
>           test_connector.configuration = {"intake_key": ""}

tests/connectors/test_connector.py:29: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
sekoia_automation/connector/__init__.py:77: in configuration
    sentry_sdk.set_context(
.venv/lib/python3.11/site-packages/sentry_sdk/api.py:175: in set_context
    return Hub.current.scope.set_context(key, value)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <sentry_sdk.hub.Hub object at 0x7ff2e8d120d0>

    @property
    def scope(self):
        # type: () -> Scope
        """Returns the current scope on the hub."""
>       return self._stack[-1][1]
E       IndexError: list index out of range

.venv/lib/python3.11/site-packages/sentry_sdk/hub.py:320: IndexError

Check failure on line 0 in tests.connectors.test_connector

See this annotation in the file changed.

@github-actions github-actions / Test Results

test_chunk_events (tests.connectors.test_connector) with error

junit.xml [took 0s]
Raw output
failed on setup with "IndexError: list index out of range"
storage = PosixPath('/tmp/tmpijn9rozf')
mocked_trigger_logs = <requests_mock.mocker.Mocker object at 0x7ff2e2d11610>

    @pytest.fixture
    def test_connector(storage, mocked_trigger_logs):
        with patch("sentry_sdk.set_tag"):
            test_connector = DummyConnector(data_path=storage)
            test_connector.send_event = Mock()
    
            test_connector.trigger_activation = "2022-03-14T11:16:14.236930Z"
>           test_connector.configuration = {"intake_key": ""}

tests/connectors/test_connector.py:29: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
sekoia_automation/connector/__init__.py:77: in configuration
    sentry_sdk.set_context(
.venv/lib/python3.11/site-packages/sentry_sdk/api.py:175: in set_context
    return Hub.current.scope.set_context(key, value)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <sentry_sdk.hub.Hub object at 0x7ff2e8d120d0>

    @property
    def scope(self):
        # type: () -> Scope
        """Returns the current scope on the hub."""
>       return self._stack[-1][1]
E       IndexError: list index out of range

.venv/lib/python3.11/site-packages/sentry_sdk/hub.py:320: IndexError

Check failure on line 0 in tests.connectors.test_connector

See this annotation in the file changed.

@github-actions github-actions / Test Results

test_chunk_events_exceed_size (tests.connectors.test_connector) with error

junit.xml [took 0s]
Raw output
failed on setup with "IndexError: list index out of range"
storage = PosixPath('/tmp/tmp43usiffc')
mocked_trigger_logs = <requests_mock.mocker.Mocker object at 0x7ff2e0273810>

    @pytest.fixture
    def test_connector(storage, mocked_trigger_logs):
        with patch("sentry_sdk.set_tag"):
            test_connector = DummyConnector(data_path=storage)
            test_connector.send_event = Mock()
    
            test_connector.trigger_activation = "2022-03-14T11:16:14.236930Z"
>           test_connector.configuration = {"intake_key": ""}

tests/connectors/test_connector.py:29: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
sekoia_automation/connector/__init__.py:77: in configuration
    sentry_sdk.set_context(
.venv/lib/python3.11/site-packages/sentry_sdk/api.py:175: in set_context
    return Hub.current.scope.set_context(key, value)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <sentry_sdk.hub.Hub object at 0x7ff2e8d120d0>

    @property
    def scope(self):
        # type: () -> Scope
        """Returns the current scope on the hub."""
>       return self._stack[-1][1]
E       IndexError: list index out of range

.venv/lib/python3.11/site-packages/sentry_sdk/hub.py:320: IndexError

Check failure on line 0 in tests.connectors.test_connector

See this annotation in the file changed.

@github-actions github-actions / Test Results

test_chunk_events_discard_too_long_message (tests.connectors.test_connector) with error

junit.xml [took 0s]
Raw output
failed on setup with "IndexError: list index out of range"
storage = PosixPath('/tmp/tmplban5l9b')
mocked_trigger_logs = <requests_mock.mocker.Mocker object at 0x7ff2e053e4d0>

    @pytest.fixture
    def test_connector(storage, mocked_trigger_logs):
        with patch("sentry_sdk.set_tag"):
            test_connector = DummyConnector(data_path=storage)
            test_connector.send_event = Mock()
    
            test_connector.trigger_activation = "2022-03-14T11:16:14.236930Z"
>           test_connector.configuration = {"intake_key": ""}

tests/connectors/test_connector.py:29: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
sekoia_automation/connector/__init__.py:77: in configuration
    sentry_sdk.set_context(
.venv/lib/python3.11/site-packages/sentry_sdk/api.py:175: in set_context
    return Hub.current.scope.set_context(key, value)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <sentry_sdk.hub.Hub object at 0x7ff2e8d120d0>

    @property
    def scope(self):
        # type: () -> Scope
        """Returns the current scope on the hub."""
>       return self._stack[-1][1]
E       IndexError: list index out of range

.venv/lib/python3.11/site-packages/sentry_sdk/hub.py:320: IndexError

Check failure on line 0 in tests.connectors.test_connector

See this annotation in the file changed.

@github-actions github-actions / Test Results

test_push_event_to_intake_with_2_events (tests.connectors.test_connector) with error

junit.xml [took 0s]
Raw output
failed on setup with "IndexError: list index out of range"
storage = PosixPath('/tmp/tmp48w5b92i')
mocked_trigger_logs = <requests_mock.mocker.Mocker object at 0x7ff2e0396fd0>

    @pytest.fixture
    def test_connector(storage, mocked_trigger_logs):
        with patch("sentry_sdk.set_tag"):
            test_connector = DummyConnector(data_path=storage)
            test_connector.send_event = Mock()
    
            test_connector.trigger_activation = "2022-03-14T11:16:14.236930Z"
>           test_connector.configuration = {"intake_key": ""}

tests/connectors/test_connector.py:29: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
sekoia_automation/connector/__init__.py:77: in configuration
    sentry_sdk.set_context(
.venv/lib/python3.11/site-packages/sentry_sdk/api.py:175: in set_context
    return Hub.current.scope.set_context(key, value)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <sentry_sdk.hub.Hub object at 0x7ff2e8d120d0>

    @property
    def scope(self):
        # type: () -> Scope
        """Returns the current scope on the hub."""
>       return self._stack[-1][1]
E       IndexError: list index out of range

.venv/lib/python3.11/site-packages/sentry_sdk/hub.py:320: IndexError

Check failure on line 0 in tests.connectors.test_connector

See this annotation in the file changed.

@github-actions github-actions / Test Results

test_push_event_to_intake_with_chunks (tests.connectors.test_connector) with error

junit.xml [took 0s]
Raw output
failed on setup with "IndexError: list index out of range"
storage = PosixPath('/tmp/tmp61hr32p2')
mocked_trigger_logs = <requests_mock.mocker.Mocker object at 0x7ff2e053ca10>

    @pytest.fixture
    def test_connector(storage, mocked_trigger_logs):
        with patch("sentry_sdk.set_tag"):
            test_connector = DummyConnector(data_path=storage)
            test_connector.send_event = Mock()
    
            test_connector.trigger_activation = "2022-03-14T11:16:14.236930Z"
>           test_connector.configuration = {"intake_key": ""}

tests/connectors/test_connector.py:29: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
sekoia_automation/connector/__init__.py:77: in configuration
    sentry_sdk.set_context(
.venv/lib/python3.11/site-packages/sentry_sdk/api.py:175: in set_context
    return Hub.current.scope.set_context(key, value)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <sentry_sdk.hub.Hub object at 0x7ff2e8d120d0>

    @property
    def scope(self):
        # type: () -> Scope
        """Returns the current scope on the hub."""
>       return self._stack[-1][1]
E       IndexError: list index out of range

.venv/lib/python3.11/site-packages/sentry_sdk/hub.py:320: IndexError