diff --git a/.circleci/config.yml b/.circleci/config.yml index 7f63bd7a3569b..786946b5182e6 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -59,6 +59,9 @@ parameters: sync_test_op_node_dispatch: type: boolean default: false + ai_contracts_test_dispatch: + type: boolean + default: false github-event-type: type: string default: "__not_set__" @@ -985,6 +988,28 @@ jobs: - "/root/.cache/go-build" - notify-failures-on-develop + # AI Contracts Test Maintenance System + # Runbook: https://github.com/ethereum-optimism/optimism/blob/develop/ops/ai-eng/contracts-test-maintenance/docs/runbook.md + ai-contracts-test: + circleci_ip_ranges: true + docker: + - image: <> + resource_class: xlarge + steps: + - checkout-from-workspace + - run: + name: Check Python version + command: python3 --version + - run: + name: Run AI Contracts Test System + command: just ai-contracts-test + working_directory: ops/ai-eng + no_output_timeout: 60m + - store_artifacts: + path: ops/ai-eng/contracts-test-maintenance/log.jsonl + destination: log.jsonl + - notify-failures-on-develop + contracts-bedrock-coverage: circleci_ip_ranges: true docker: @@ -3074,3 +3099,17 @@ workflows: context: - circleci-repo-readonly-authenticated-github-token - oplabs-tools-data-public-metrics-bucket + + ai-contracts-test-workflow: + when: + equal: [true, << pipeline.parameters.ai_contracts_test_dispatch >>] + jobs: + - initialize: + context: + - circleci-repo-readonly-authenticated-github-token + - ai-contracts-test: + context: + - circleci-repo-readonly-authenticated-github-token + - devin-api + requires: + - initialize diff --git a/ops/ai-eng/contracts-test-maintenance/VERSION b/ops/ai-eng/contracts-test-maintenance/VERSION index a2268e2de4458..d15723fbe8de3 100644 --- a/ops/ai-eng/contracts-test-maintenance/VERSION +++ b/ops/ai-eng/contracts-test-maintenance/VERSION @@ -1 +1 @@ -0.3.1 \ No newline at end of file +0.3.2 diff --git a/ops/ai-eng/contracts-test-maintenance/components/devin-api/devin_client.py b/ops/ai-eng/contracts-test-maintenance/components/devin-api/devin_client.py index 8623076e9194a..d30a716b9b9dd 100644 --- a/ops/ai-eng/contracts-test-maintenance/components/devin-api/devin_client.py +++ b/ops/ai-eng/contracts-test-maintenance/components/devin-api/devin_client.py @@ -105,6 +105,9 @@ def _make_request(url, headers, data=None, method="GET"): print(f"Request failed: {method} {url}") print(f"Error: {e}") raise + except TimeoutError as e: + print(f"Request timeout - will retry") + return None except Exception as e: print(f"Request failed: {method} {url}") print(f"Error: {e}")