fix: Separate Event Grid subscription from status polling in Init-DataFactory#1997
Closed
slapointe wants to merge 1 commit into
Closed
fix: Separate Event Grid subscription from status polling in Init-DataFactory#1997slapointe wants to merge 1 commit into
slapointe wants to merge 1 commit into
Conversation
…aFactory In Set-BlobTriggerSubscription, the Add/Remove subscription call and the status check were in the same Invoke-WithRetry block. This meant the status was checked immediately after subscribing, always finding "Provisioning". The retry would then call Add-AzDataFactoryV2TriggerSubscription again, which fails with "Resource cannot be updated during provisioning", exhausting all retries and failing the deployment. Split into two steps: the subscription operation (with a try/catch that tolerates an already-transitioning subscription) and a separate status-polling loop that waits for provisioning to complete. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
4fcc47d to
26c7f09
Compare
Collaborator
|
Created a new PR #2001 . |
|
@all-contributors please add @slapointe for code |
Contributor
|
@microsoft-github-policy-service[bot] I've put up a pull request to add @slapointe! 🎉 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🛠️ Description
Fixes #1996
In
Set-BlobTriggerSubscription, theAdd-AzDataFactoryV2TriggerSubscriptioncall and theGet-AzDataFactoryV2TriggerSubscriptionStatuscheck were inside the sameInvoke-WithRetryblock. This caused the status to be checked immediately after subscribing (alwaysProvisioning), and on retry the subscribe call would fail withResource cannot be updated during provisioning, exhausting all retries.Split into two steps:
try/catchthat tolerates an already-transitioning subscription📋 Checklist
🔬 How did you test this change?
🙋♀️ Do any of the following that apply?
📑 Did you update
docs/changelog.md?📖 Did you update documentation?