Conversation
…nts, EventSink injection Co-authored-by: blindzero <13959569+blindzero@users.noreply.github.com>
…finally for cleanup Co-authored-by: blindzero <13959569+blindzero@users.noreply.github.com>
blindzero
left a comment
There was a problem hiding this comment.
@copilot was absent error reported from issue fixed?
Yes, the The fix (commit
|
There was a problem hiding this comment.
Pull request overview
This PR fixes a critical bug in the ExchangeOnline provider's Mailbox.EnsurePermissions functionality where permission removal (Ensure=Absent) failed on transient EXO server errors and always reported Changed=False. The fix enables automatic retry by marking transient EXO errors (server-side 5xx, throttling 429) with Idle.IsTransient=$true, allowing the plan executor's existing Invoke-IdleWithRetry mechanism to handle transient failures without requiring new retry infrastructure.
Changes:
- Adapter now detects and marks transient EXO error patterns (server-side, throttling, service unavailable) enabling automatic retry
- Provider emits diagnostics events (Evaluated, Applying, Result) when EventSink is available for improved observability
- Step injects EventSink into the provider before calling EnsureMailboxPermissions to enable provider-level diagnostics
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/Providers/_testHelpers.Providers.ps1 | Adds test helpers to simulate EXO server-side, throttling, and permission errors for testing transient error detection |
| tests/Providers/ExchangeOnlineProvider.Tests.ps1 | Adds comprehensive tests for transient error marking, propagation, and EventSink event emission |
| src/IdLE.Steps.Mailbox/Public/Invoke-IdleStepMailboxPermissionsEnsure.ps1 | Injects EventSink from Context into provider before calling EnsureMailboxPermissions to enable diagnostics |
| src/IdLE.Provider.ExchangeOnline/Public/New-IdleExchangeOnlineProvider.ps1 | Adds EventSink property and emits diagnostics events for permission evaluation, application, and results |
| src/IdLE.Provider.ExchangeOnline/Private/New-IdleExchangeOnlineAdapter.ps1 | Implements transient error pattern detection and marks exceptions with Idle.IsTransient for retry support |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Code Coverage Report
|
|
@copilot Changed output issue is not fully fixed. Access Rights removal + adding seems to work now both. A Step with Reproduce / Steps
have a look at the findings and fix this. |
…tput in write adapter methods Co-authored-by: blindzero <13959569+blindzero@users.noreply.github.com>
Found and fixed the root cause (commit Why EXO's Remove operations work fine because Fix: Added |
…eline pollution Co-authored-by: blindzero <13959569+blindzero@users.noreply.github.com>
Add-MailboxPermission/Add-RecipientPermission/Set-Mailboxreturn the created/modified object. Adapter write methods called$this.InvokeSafely(...)without$null =, so the output leaked through the uncaptured call chain intoEnsureMailboxPermissions's implicit output pipeline →Changed=FalseInvokeSafelyin adapter to detect transient EXO error patterns and mark exceptions withIdle.IsTransient = $true$null = $this.InvokeSafely(...)for all 7 write methods$this.EventSink.WriteEvent(...)calls inEnsureMailboxPermissionsto use$null = $this.EventSink.WriteEvent(...), preventing any EventSink return value from polluting the method's output pipelineEventSink = $nullproperty to the EXO provider object and emit diagnostics events inEnsureMailboxPermissionsEventSinkfrom context into provider in stepOriginal prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.