Skip to content

Supply Model Target retry policies from backend adapters - #3766

Open
adamtheturtle wants to merge 1 commit into
mainfrom
shared-model-retry-policy-20261014
Open

adamtheturtle wants to merge 1 commit into
mainfrom
shared-model-retry-policy-20261014

Conversation

@adamtheturtle

@adamtheturtle adamtheturtle commented Oct 14, 2026 •

Copy link
Copy Markdown
Member

Shared Model Target helpers currently define the real service's retry criteria, attempt limit, and delays, and track whether the real backend is active. That makes a reusable contract suite own an adapter's failure policy.

Move that configuration into fixtures/real_model_target_retries.py. Adapters now supply a scoped tenacity.Retrying policy through retrying_model_target_requests. Shared helpers send requests once by default and retain the GET-only guard. Nested scopes restore the preceding policy, including after exceptions. The real adapter installs the same criteria, retry limit, delays, and final-outcome handling as before.

The existing retry tests use a copy of the real policy with wait_none(), removing the time.sleep monkeypatch. Two additional tests check installation through the public real Model Target setup fixture and restoration after a nested consumer policy raises. These checks use controlled send callbacks without account access or network calls.

Part of #3738 and #3737. This leaves the remaining shared-suite decoupling work open.

Validation:

  • Full local suite excluding real-service and Docker-build cases: 2,016 passed, 839 skipped.
  • Focused retry, timeout, and Model Target response-policy tests: 38 passed.
  • All 2,853 existing collected cases and IDs preserved; two cases added.
  • Independent consumer smoke: six passed with native adapter, real-policy, real-credential, settings, and Flask imports blocked. Its custom policy uses different retry criteria and a two-attempt limit, preserves both supported response types, and sends POST requests once.
  • Shared retry helper, real retry policy module, and retry tests fully covered locally.
  • Pre-commit, pre-push checks (including partition and all type checkers), changed-file Pylint, and diff checks passed.
  • AST comparison confirms the moved real retry configuration and final-outcome handling are unchanged.

Docker and live-service validation remain with hosted CI.

Hosted CI is currently blocked by live Vuforia HTTP 429 responses carrying x-envoy-ratelimited: true. The changed retry-policy tests, mock tests, and lint checks passed. Rerunning failed jobs did not clear the throttle; an isolated retry of update_target/test_width.py, with no other active Test workflows in either VWS repository, also exhausted retries with the same response. Isolated failing job. The live-service checks need another run after the throttle clears.

This branch had an error being deployed

1 failed and 1 active deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant