Fix regression around OnIdle
handler
#1936
Merged
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.
Unfortunately the (admittedly hairy) change made in #1918 to fix:
has resulted in PowerShell/vscode-powershell#4219:
because we had hacked in that all our pipelines are nested (to allow the concurrency check to pass), but when loading profiles, we do not actually have a running pipeline, so our lie about being nested fails another check.
So I think what happened was that PowerShell/vscode-powershell#4048 was already no longer reproducing by happenstance (as the Az.Tools.Predictor module presumably updated and removed their
OnIdle
handler). I failed to check that before attempting to fix it following the last result of our investigation. The "fix" inadvertently caused nearly the samePSInvalidOperationException
, and by mistake I confused the two scenarios. With this PR, and regression tests, I can confirm that theOnIdle
handler works both in a profile and at the regular prompt after reverting the breaking change. Furthermore, I can no longer repro the original issue with Az.Tools.Predictor whatsoever, in any version, hence my conclusion their module updated.Resolves PowerShell/vscode-powershell#4219