Remove SilentlyContinue from Publish-BcNuGetPackageToContainer#2148
Merged
aholstrup1 merged 3 commits intomainfrom Mar 2, 2026
Merged
Remove SilentlyContinue from Publish-BcNuGetPackageToContainer#2148aholstrup1 merged 3 commits intomainfrom
aholstrup1 merged 3 commits intomainfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Mitigates BC28 dependency publishing issues by avoiding -ErrorAction SilentlyContinue when publishing NuGet dependencies into a BC container, so BCContainerHelper can fall back to docker exec, while keeping the pipeline running with a warning if publishing still fails.
Changes:
- Replaced
-ErrorAction SilentlyContinuewithtry/catcharoundPublish-BcNuGetPackageToContainer. - Emits an
OutputWarningincluding the exception message when publishing fails.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
mazhelez
approved these changes
Mar 2, 2026
spetersenms
approved these changes
Mar 2, 2026
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.
❔What, Why & How
Background
In BC28 there seems to be some issues with PS Remote Session which are used during Invoke-ScriptInBcContainer. If BCContainerHelper fails to create a remote session, it's supposed to fall back to
docker exec.This issue
AL-Go ships with an override to InstallMissingDependencies. The override will call
Publish-BcNuGetPackageToContainer -ErrorAction SilentlyContinue.Publish-BcNuGetPackageToContainerwill callGet-BcContainerServerConfigurationwhich relies onInvoke-ScriptInBcContainerWhen
Invoke-ScriptInBcContaineris called like this, it will silently fail to initialize the management module in the PSSession.(Partial) Mitigation
A mitigation to this particular problem would be to replace the ErrorAction with a try catch and a warning indicating that the app could not be published. Without the ErrorAction, BCContainerHelper will fall back to docker exec and the workflow will continue.
This should mitigate the impact in the linked issue while we're investigating a fix for the root cause.
Related to issue: #2145
✅ Checklist