BUG in Azure Automation Runtime Environment feature

Andrew 36 Reputation points
2024-06-13T08:41:30.0666667+00:00

There is a bug where if you want to test another (not published) Runtime by editing the Runbook, selecting the Runtime and hitting Test Pane and Start, the original (published) Runtime is used instead of the newly selected one.

In my example you can see that "bezcommon" Runtime is published.

User's image

Now lets say I want try to test the Runbook with "scommon" Runtime.

User's image

After starting the test run even the API call shows "scommon" as a used Runtime in the PUT request.

User's image

But the request response contains the published Runtime instead of the selected one as can be seen in the picture belowUser's image

And according to the test job results the published Runtime was used.

How to test this?

Create two runtimes:

Runtime 'With3rdPartyModule'

  • here import some 3rd party PowerShell module

Runtime 'Without3rdPartyModule'

  • don't import the 3rd party module

Create a Runbook with following PowerShell code: Get-Module -listavailable

In the Runbook choose 'With3rdPartyModule' Runtime, publish the change and run it.

Now edit the Runbook and choose the second a.k.a. 'Without3rdPartyModule' Runtime and run a test job.

Now compare the results. You should see that the result contains your 3rd party module outputted in both cases!

Azure Automation
Azure Automation
An Azure service that is used to automate, configure, and install updates across hybrid environments.
1,257 questions
{count} votes

Accepted answer
  1. Monalla-MSFT 13,031 Reputation points
    2024-06-17T13:57:06.14+00:00

    @Andrew & Jesus Chao - Welcome to Microsoft Q&A and thanks for reaching out to us.

    I have confirmation from our product team that this is a bug in this feature and our team had added this to the backlog and will be rolling this out in the next release and the ETA is 07/31.

    Hope this helps. and please feel free to reach out if you have any further questions.


    Please don't forget to "Accept as Answer" and click "Yes" if the above response is helpful, so it can be beneficial to the community.

    2 people found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.