Repository navigation
Retry stopping triggers and continue when a trigger cannot be stopped #404 - #503
Merged
Merged
Conversation
…not be stopped #404 Stop-Trigger now retries up to 5 times (waiting while the trigger is provisioning), like Start-Trigger, and returns whether the trigger was stopped. Stop-Triggers only marks successfully stopped triggers as Stopped and warns about the ones that failed. Based on the idea from PR #404 by @henriquebrisola. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Supersedes #404 (thanks @henriquebrisola for reporting and the original idea).
Problem
Stopping a trigger occasionally fails with a temporary error (e.g. "concurrent operations"), and that single failure stops the whole deployment.
Changes
Stop-Triggernow works likeStart-Trigger: up to 5 attempts, 2 seconds apart, and it waits (up to 5 minutes) while the trigger is still provisioning. After the last failed attempt it writes a warning instead of throwing, and returns$true/$false.Stop-Triggersonly marks a trigger asStopped(and adds it toStoppedTriggerNames) when the stop actually worked. Triggers that failed to stop are listed in one warning.test/Stop-Trigger.Tests.ps1(Pester 6 syntax,Should -Invoke). TheStop-Triggermock intest/Triggers.Tests.ps1now returns$true.CLAUDE.mdwith project conventions: tests target Pester 6+ (noAssert-MockCalled), and every functional change gets one changelog line before commit.Notes
azure.datafactory.tools.psd1, matching the changelog.Testing
test/Stop-Trigger.Tests.ps1: 9/9 passed locally with Pester 6.2.0.test/Triggers.Tests.ps1was not run (needs an Azure login).🤖 Generated with Claude Code