Skip to content

Fix SubmitStabilityJob: suppress gh workflow run stdout output#8272

Open
Copilot wants to merge 1 commit into
mainfrom
copilot/investigate-stability-job-issue
Open

Fix SubmitStabilityJob: suppress gh workflow run stdout output#8272
Copilot wants to merge 1 commit into
mainfrom
copilot/investigate-stability-job-issue

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 21, 2026

Stability jobs fail with The property 'Files' cannot be found on this object because gh workflow run writes a success message to stdout in newer gh CLI versions. Since the script is dot-sourced, this contaminates $automationResult — turning it from a hashtable into an array — which breaks .Files access under Set-StrictMode -Version 2.0.

  • Pipe gh workflow run to Out-Null to prevent stdout leaking into the script's return value
gh workflow run --repo $repository --ref $targetBranch $workflowName | Out-Null

…les property error

Agent-Logs-Url: https://github.com/microsoft/BCApps/sessions/51664009-94ed-4d2a-8d3a-85fa5383870f

Co-authored-by: mazhelez <43066499+mazhelez@users.noreply.github.com>
@mazhelez mazhelez marked this pull request as ready for review May 21, 2026 12:03
@mazhelez mazhelez requested a review from a team as a code owner May 21, 2026 12:03
@github-actions github-actions Bot added the Build: Automation Workflows and other setup in .github folder label May 21, 2026
@github-actions
Copy link
Copy Markdown
Contributor

Could not find a linked ADO work item. Please link one by using the pattern 'AB#' followed by the relevant work item number. You may use the 'Fixes' keyword to automatically resolve the work item when the pull request is merged. E.g. 'Fixes AB#1234'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Build: Automation Workflows and other setup in .github folder

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants