-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Updated Get-AzAutomationJobOutputRecord to handle JSON and Text record values #9031
Conversation
The changes look good. @thomasyip-msft, @vrdmr, @safeermohammed, can any of you merge this PR? |
@lwajswaj if you can make the changelog change, we can fix this. Is there a simple way we can add test automation for this fix, to prevent future regressions? |
I might be able to add a quick test under the scenario tests. Kind of like starting the mock up runbook and retrieving its output stream (that's the current error condition) |
@markcowl, Just added tests for this scenario...... along the way, I found the tests for runbook execution were not executing properly, for example expected result was never evaluated, that's why I included a couple of extra changes:
Of course, added the tests for 'Get-AzAutomationJobOutputRecord' for preventing regressions. |
/azp run |
Azure Pipelines successfully started running 3 pipeline(s). |
This is a re-open of PR 8607.
Answering @NarayanThiru comments: Current logic doesn't work as the error message and code is different (regardless that it's easier and cleaner to check on the output format rather than attempt and failing). Regarding the issue and how to repro/test, refer to the linked issues they contain a lot of good information.
CC: @vladimir-shcherbakov, @MiYanni
Description
This PR addresses issue #7977 and #8600. Root cause of the issue was identified as stream outputs always expecting to be a JSON file; however, this ain't true in all cases as String or PSObjects are not returned as JSON. To fix it, a RegEx was put in place to identify JSON output from text output.
Checklist
CONTRIBUTING.md
platyPS
module