diff --git a/.github/workflows/rw-python-tests.yaml b/.github/workflows/rw-python-tests.yaml index 7ed62e817..3bbe39190 100644 --- a/.github/workflows/rw-python-tests.yaml +++ b/.github/workflows/rw-python-tests.yaml @@ -44,6 +44,9 @@ jobs: - name: pep8 and formatting check run: | make format + - name: lint check + run: | + make lint docs-scripts-tests: runs-on: ubuntu-latest if: ${{inputs.changed-python-modules == 'true'}} diff --git a/packages/gooddata-eval/src/gooddata_eval/core/chat/sse_client.py b/packages/gooddata-eval/src/gooddata_eval/core/chat/sse_client.py index cb18d3804..7d52dad3f 100644 --- a/packages/gooddata-eval/src/gooddata_eval/core/chat/sse_client.py +++ b/packages/gooddata-eval/src/gooddata_eval/core/chat/sse_client.py @@ -89,13 +89,11 @@ def _is_retryable_exc(exc: Exception) -> bool: return True if isinstance(exc, httpx.HTTPStatusError): return exc.response.status_code in _RETRYABLE_STATUS_CODES - if isinstance(exc, httpx.RemoteProtocolError): - # Mid-stream disconnect ("peer closed connection without sending complete - # message body") -- pure network flake, not a real agent/content failure. - # Confirmed live: contaminated ~1-4% of visualization runs with a hard - # fail and zero retry attempts. - return True - return False + # Mid-stream disconnect ("peer closed connection without sending complete + # message body") -- pure network flake, not a real agent/content failure. + # Confirmed live: contaminated ~1-4% of visualization runs with a hard + # fail and zero retry attempts. + return isinstance(exc, httpx.RemoteProtocolError) def _retry_transient(operation: Callable[[], T], *, is_retryable: Callable[[Exception], bool]) -> T: diff --git a/packages/gooddata-eval/tests/test_agentic_runner.py b/packages/gooddata-eval/tests/test_agentic_runner.py index b71ce135c..3d9959eba 100644 --- a/packages/gooddata-eval/tests/test_agentic_runner.py +++ b/packages/gooddata-eval/tests/test_agentic_runner.py @@ -3,7 +3,7 @@ from unittest.mock import patch import pytest -from gooddata_eval.cli.agentic_runner import _dispatch_agentic, run_agentic_items +from gooddata_eval.cli.agentic_runner import AGENTIC_TEST_KINDS, _dispatch_agentic, run_agentic_items from gooddata_eval.core.agentic.alert_skill import AlertSkillAssertionError from gooddata_eval.core.models import AgenticEvalOutcome, DatasetItem @@ -81,8 +81,6 @@ def test_all_agentic_kind_cases_covers_every_registered_kind(): """Guards the two parametrized tests below against silently going stale: a kind added to AGENTIC_TEST_KINDS without a matching case here would otherwise just not get tested, not fail loudly.""" - from gooddata_eval.cli.agentic_runner import AGENTIC_TEST_KINDS - covered = {kind for kind, _, _ in _ALL_AGENTIC_KIND_CASES} assert covered == set(AGENTIC_TEST_KINDS) @@ -194,8 +192,6 @@ def test_dispatch_agentic_returns_a_real_outcome_for_every_kind(kind, expected_o evaluator produced -- not None, not the outcome's reasoning_steps list alone, not any other bare value the old `isinstance(outcome, tuple)`/`isinstance(outcome, AgenticEvalOutcome)` fallback could silently swallow.""" - from gooddata_eval.core.models import AgenticEvalOutcome - item = DatasetItem( id="q1", dataset_name="ds",