Commit Graph
9 Commits
Author SHA1 Message Date
yuneng-jiangandClaude Opus 4.6 673f3d59de Increase file deletion retry budget to 50s for batch_processed race
The check_batch_cost_job runs on a 10-40s interval and sets
batch_processed=True after sending the S3 callback. 30s (6×5s) wasn't
enough margin; 50s (10×5s) covers the worst-case poll interval plus
processing time, while still being 3.6x faster than the original 180s.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-15 15:39:35 -07:00
yuneng-jiangandClaude Opus 4.6 31e6393458 Fix flaky proxy_e2e_azure_batches_tests: populate _hidden_params for DB-cached batch retrieval
When a completed batch is served from the DB cache, _hidden_params was empty,
causing the managed files hook to skip output_file_id translation from raw
provider IDs to unified IDs. This fix populates unified_batch_id and model_id
on the early-return path, with a guard against double-encoding when the DB
already stores unified IDs.

Also reduces file deletion retry delay (20s→5s), reruns (5→2), and CI timeout
(30m→15m) to cut worst-case runtime from ~16min to ~4min.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-15 15:13:30 -07:00
yuneng-jiangandClaude Opus 4.6 4e70254d56 [Fix] Increase _delete_file retry budget to reduce flakiness
Increase max_retries from 6 to 9 and retry_delay from 10s to 20s
(180s total wait, up from 60s) to give batch cost tracking more time
to finish before cleanup attempts file deletion.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-13 12:32:55 -07:00
yuneng-jiangandClaude Opus 4.6 1f71578de2 [Fix] Add flaky reruns to test_e2e_managed_batch
The test_e2e_managed_batch test intermittently fails during cleanup
when deleting the input file — the batch cost tracking hasn't finished
processing yet (batch_processed=true not set), causing a 400 error.
This is a timing race condition unrelated to batch retrieval logic.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-13 11:57:22 -07:00
Julio Quinteros ProandClaude Opus 4.6 aa62ddaf0a Add tenacity to e2e Azure batch CI and revert importorskip
PR #22785 used pytest.importorskip which causes exit code 5 (all
skipped) in CI. Instead, add tenacity to the CI workflow pip install
and restore direct imports.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 11:45:14 -03:00
Julio Quinteros ProandClaude Opus 4.6 8495e05221 Guard tenacity import in e2e Azure batch tests
tenacity is not in pyproject.toml dependencies, causing ImportError
during test collection. Use pytest.importorskip to gracefully skip
when tenacity is not available.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 11:32:20 -03:00
Sameer Kankute 812e455cbc feat(tests): add proxy e2e azure batches test cases
- test_proxy_e2e_azure_batches: e2e managed batch test with delete retry for batch_processed
- test_fixtures_smoke: smoke test for fixtures
- validate_e2e_setup: setup validation script

Made-with: Cursor
2026-03-04 17:15:30 +05:30
Sameer Kankute 52693a65ed feat(tests): add proxy e2e azure batches test infrastructure
- conftest: mock server + proxy server fixtures, log capture, health check fix
- base_integration_test: fix key_alias format (replace @ and . for API validation)
- test_managed_files_base: S3 callback wait with early exit, delete retry logic

Made-with: Cursor
2026-03-04 17:15:24 +05:30
Sameer Kankute e3a93b9597 feat(tests): add proxy e2e azure batches test fixtures
- Mock Azure Batch server (FastAPI) with batch, file, chat, embeddings, S3 callback routes
- Config for mock models and batch polling
- Fix mock_responses: use 'model' instead of undefined 'request_model'

Made-with: Cursor
2026-03-04 17:15:15 +05:30