-
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
Fix Start-AzAutomationDscCompilationJob (Issue #8347) #9030
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, would really like a test for this, but we cna file an issue on the service team to do thsi if they can just sign off on this fix.
/azp run |
Azure Pipelines successfully started running 3 pipeline(s). |
Assigning to @avkaur as this fix is in DSC. |
approved from dsc service side |
/azp run |
Azure Pipelines successfully started running 3 pipeline(s). |
Not sure why, a few of my commits went away as I see the commits in my repo but not in the PR.... strange... |
That's the reason of my last "touch" commit; just made silly modification to the files so they get tracked again |
/azp run |
Azure Pipelines successfully started running 3 pipeline(s). |
/azp run |
Azure Pipelines successfully started running 3 pipeline(s). |
Review comments addressed and PR signed off by Automation.
This PR is a re-open of PR 8606. Regarding the last open question, I'm not sure if test cases can be written to cover both scenarios but I'm not good at writing them, maybe the core team can help me on that (@vladimir-shcherbakov).
CC: @MiYanni
Description
This PR fixed issue #8347; the root cause of this issue is a synchronous call to 'create' method which, when job gets suspended, it never releases control as the job hasn't completed. Not sure if this is by-design on the SDK or it's a bug. Using 'CreateAsync' fixes it but you cannot do a regular Wait() or GetWaiter() as the same behavior is repeated. Base on the documentation Compiling a DSC Configuration with Windows PowerShell, the original idea of this cmdlet seemed to be just starting the job but not waiting till it completed as it was the previous behavior. This PR changes Start-AzAutomationDscCompilationJob to just submit the compilation job but not waiting for its completion to return control, after this change this is how the usage looks like:
This PR introduces a behavior change in the cmdlet for which a breaking change warning has been included.
Checklist
CONTRIBUTING.md
platyPS
module