test: a short R2 failure while closing an upload: the server's steady retry and the browser's (contract contrato-r2-retry)
All checks were successful
Build and deploy / Validate source (push) Successful in 5s
Build and deploy / Integration suite on a real stack (push) Successful in 8m2s
Build and deploy / Secret scan and release gate (push) Successful in 8s
Build and deploy / Publish images (push) Successful in 1m12s

tests/test_storage_steady.py covers steady() and the storage's parts, size
and complete (a 5xx retried after 1, 2, 3 s; a 4xx and other errors at once;
NoSuchUpload on an object that exists is done). tests/upload_retry_test.mjs
covers closing the upload in web/upload.js (again after 3 s and 6 s; only
the last attempt reported; a 409 at once; an abort gives the upload back).
Both fail with the retry turned off. steady now looks time.sleep up when it
waits, so a patch of it reaches the storage methods.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Cauê Faleiros
2026-12-01 13:34:23 -03:00
parent 5d70a6f912
commit 52fc90cbcd
4 changed files with 374 additions and 4 deletions

View File

@@ -32,6 +32,7 @@ jobs:
tests.test_observability \
tests.test_secrets -v
node tests/observability_web_test.mjs
node tests/upload_retry_test.mjs
sh -n infra/lock_dependencies.sh
integration:
@@ -101,7 +102,7 @@ jobs:
# the generator's geometry. The provider suites use a fake transport: they
# prove the documented contract, not the integration.
- name: Print-file geometry and provider adapters
run: $COMPOSE exec -T api python -m unittest tests.test_printfile tests.test_printpng tests.test_mercadopago tests.test_tiny tests.test_cnpj tests.test_payment_messages tests.test_jadlog tests.test_correios tests.test_quote_review tests.test_moves tests.test_large_files tests.test_grade_check tests.test_schema tests.test_customer_document tests.test_mail_html tests.test_layout_rules tests.test_proof_cut tests.test_proof_render tests.test_sheet_trim tests.test_one_machine tests.test_profiles tests.test_sheet_gap tests.test_reprint tests.test_proof_parts tests.test_prumo tests.test_speed tests.test_printpng_validate tests.test_machine_log tests.test_machine_stats tests.test_label tests.test_observability tests.test_worker_drain tests.test_db_outage tests.test_health tests.test_saved_size -v
run: $COMPOSE exec -T api python -m unittest tests.test_storage_steady tests.test_printfile tests.test_printpng tests.test_mercadopago tests.test_tiny tests.test_cnpj tests.test_payment_messages tests.test_jadlog tests.test_correios tests.test_quote_review tests.test_moves tests.test_large_files tests.test_grade_check tests.test_schema tests.test_customer_document tests.test_mail_html tests.test_layout_rules tests.test_proof_cut tests.test_proof_render tests.test_sheet_trim tests.test_one_machine tests.test_profiles tests.test_sheet_gap tests.test_reprint tests.test_proof_parts tests.test_prumo tests.test_speed tests.test_printpng_validate tests.test_machine_log tests.test_machine_stats tests.test_label tests.test_observability tests.test_worker_drain tests.test_db_outage tests.test_health tests.test_saved_size -v
- name: Runtime and retention regressions
run: |