From 9586a7accc179d7ea519273f4d10f6e86f9b5abf Mon Sep 17 00:00:00 2001 From: anakin87 Date: Mon, 26 Jan 2026 13:42:44 +0100 Subject: [PATCH 1/3] test: use a core operation in test_github_api_integration flaky test --- test/components/connectors/test_openapi_connector.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/test/components/connectors/test_openapi_connector.py b/test/components/connectors/test_openapi_connector.py index 0c08dc12f3..8b045628dc 100644 --- a/test/components/connectors/test_openapi_connector.py +++ b/test/components/connectors/test_openapi_connector.py @@ -197,12 +197,14 @@ def test_serper_dev_integration(self): not os.environ.get("GITHUB_TOKEN", None), reason="Export an env var called GITHUB_TOKEN to run this test." ) @pytest.mark.integration - @pytest.mark.flaky(reruns=3, reruns_delay=5) + @pytest.mark.flaky(reruns=3, reruns_delay=10) def test_github_api_integration(self): component = OpenAPIConnector( openapi_spec="https://raw.githubusercontent.com/github/rest-api-description/main/descriptions/api.github.com/api.github.com.json", credentials=Secret.from_env_var("GITHUB_TOKEN"), ) - response = component.run(operation_id="search_repos", arguments={"q": "deepset-ai"}) + # use a core operation, which has higher rate limits than search operations + response = component.run(operation_id="repos_list_for_org", arguments={"org": "deepset-ai", "type": "public"}) + assert isinstance(response, dict) assert "response" in response From 23ebcfdc4f3060356e2e62203f822d54ed454250 Mon Sep 17 00:00:00 2001 From: anakin87 Date: Mon, 26 Jan 2026 13:44:16 +0100 Subject: [PATCH 2/3] add url to comment --- test/components/connectors/test_openapi_connector.py | 1 + 1 file changed, 1 insertion(+) diff --git a/test/components/connectors/test_openapi_connector.py b/test/components/connectors/test_openapi_connector.py index 8b045628dc..594cdd0d6c 100644 --- a/test/components/connectors/test_openapi_connector.py +++ b/test/components/connectors/test_openapi_connector.py @@ -204,6 +204,7 @@ def test_github_api_integration(self): credentials=Secret.from_env_var("GITHUB_TOKEN"), ) # use a core operation, which has higher rate limits than search operations + # https://docs.github.com/en/rest/rate-limit/rate-limit?apiVersion=2022-11-28#about-rate-limits response = component.run(operation_id="repos_list_for_org", arguments={"org": "deepset-ai", "type": "public"}) assert isinstance(response, dict) From 800b4a8ed84d00771e6c4da6b8695ae7e786081c Mon Sep 17 00:00:00 2001 From: anakin87 Date: Mon, 26 Jan 2026 15:37:55 +0100 Subject: [PATCH 3/3] run only on linux --- test/components/connectors/test_openapi_connector.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/test/components/connectors/test_openapi_connector.py b/test/components/connectors/test_openapi_connector.py index 594cdd0d6c..611d6d19c1 100644 --- a/test/components/connectors/test_openapi_connector.py +++ b/test/components/connectors/test_openapi_connector.py @@ -3,6 +3,7 @@ # SPDX-License-Identifier: Apache-2.0 import os +import sys from unittest.mock import Mock, patch import pytest @@ -197,15 +198,13 @@ def test_serper_dev_integration(self): not os.environ.get("GITHUB_TOKEN", None), reason="Export an env var called GITHUB_TOKEN to run this test." ) @pytest.mark.integration + @pytest.mark.skipif(sys.platform != "linux", reason="We only test on Linux to avoid hitting rate limits") @pytest.mark.flaky(reruns=3, reruns_delay=10) def test_github_api_integration(self): component = OpenAPIConnector( openapi_spec="https://raw.githubusercontent.com/github/rest-api-description/main/descriptions/api.github.com/api.github.com.json", credentials=Secret.from_env_var("GITHUB_TOKEN"), ) - # use a core operation, which has higher rate limits than search operations - # https://docs.github.com/en/rest/rate-limit/rate-limit?apiVersion=2022-11-28#about-rate-limits - response = component.run(operation_id="repos_list_for_org", arguments={"org": "deepset-ai", "type": "public"}) - + response = component.run(operation_id="search_repos", arguments={"q": "deepset-ai"}) assert isinstance(response, dict) assert "response" in response