Skip to content

Retry stopping triggers and continue when a trigger cannot be stopped #404 - #503

Merged
NowinskiK merged 3 commits into
developfrom
issue-404-stop-trigger-retry
Oct 16, 2026
Merged

NowinskiK merged 3 commits into
developfrom
issue-404-stop-trigger-retry

Conversation

@NowinskiK

@NowinskiK NowinskiK commented Oct 16, 2026 •

Copy link
Copy Markdown
Member

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-Trigger now works like Start-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-Triggers only marks a trigger as Stopped (and adds it to StoppedTriggerNames) when the stop actually worked. Triggers that failed to stop are listed in one warning.
  • New unit tests in test/Stop-Trigger.Tests.ps1 (Pester 6 syntax, Should -Invoke). The Stop-Trigger mock in test/Triggers.Tests.ps1 now returns $true.
  • Changelog entry under 1.19.0.
  • Adds CLAUDE.md with project conventions: tests target Pester 6+ (no Assert-MockCalled), and every functional change gets one changelog line before commit.

Notes

  • If a trigger can't be stopped and is also being deployed, ADF may still reject the update for that trigger. The deployment then fails at that step, with a clearer error.
  • Module version bumped to 1.19.0 in 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.ps1 was not run (needs an Azure login).

🤖 Generated with Claude Code

Kamil Nowinski and others added 3 commits October 16, 2026 20:41
…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>
@NowinskiK
NowinskiK merged commit 3290301 into develop Oct 16, 2026
1 check failed
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