[P2] foundry: serialize model deployment updates to avoid RequestConflict

Open
#114 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
azure, terraform

Research direction

Start with the Provision infrastructure workflow and the module.ai_foundry.azapi_resource.ai_model_deployment["gpt-5"] resource named in the failure evidence. Trace how Cognitive Services parent-account and model-deployment updates are applied, then check the workflow run for the 409 timing. Done means contention is retried with bounded backoff, updates settle in order, and retry diagnostics appear without normal provision failures.

Written by the indexing model from the issue text.

Description

backend component:ci-cd component:foundry priority:P2 tracking type:bug

Problem

Foundry model deployment updates can conflict with concurrent parent-account operations, causing 409 RequestConflict and failing infrastructure provision.

Type

  • bug

Evidence

  • Workflow run: https://github.com/Azure-Samples/tutor/actions/runs/23124471384
  • Provision infrastructure includes error for module.ai_foundry.azapi_resource.ai_model_deployment["gpt-5"]:
    • HTTP 409 RequestConflict
    • message: Another operation is being performed on the parent resource .../Microsoft.CognitiveServices/accounts/...

Reproduction

  1. Run infra provision where Cognitive Services account and model deployments are modified in same apply window.
  2. Observe intermittent 409 on model deployment update when parent account operation is still in progress.

Acceptance Criteria

  • Foundry model deployment updates are serialized after parent account operations settle.
  • Add bounded retry/backoff for Foundry 409 conflicts with explicit detection.
  • Provision no longer fails due to parent-resource operation contention under normal deploy cadence.
  • Add diagnostic summary for Foundry conflict retries.

Suggested Owner

system-architect + platform-quality

Dominant language
Python
Stars
17
Forks
8
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Azure-Samples/tutor

All issues in Azure-Samples/tutor

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.