microsoft / vscode-azureAutomation

MIT License
16 stars 4 forks source link

I overwrote over a dozen runbooks with the wrong file #50

Closed silverl closed 2 weeks ago

silverl commented 1 year ago

Using Azure Automation VS Code extension version v1.2.1.

Something pretty horrible just happened.

We needed to update 54 runbooks in production because for some reason, Azure Automation started failing yesterday to import a custom powershell 7.1 module we published months ago. Just wouldn't load it. We have a high severity ticket open with Azure support right now trying to figure out what's going on.

We opted to inline the code from the module that is failing to import directly into the runbooks and proceeded to use your extension to one-by-one republish all the runbooks.

Microsoft hasn't provided a powershell module that can publish a 7.1 runbook and we can't find an API that can do it, or else we'd automate this. Also, git sync doesn't work yet for 7.1 runbooks.

After this manual publishing exercise, we found over half the runbooks were overwritten with whatever runbook that was in the open VS Code tab instead of the runbook we specifically right-clicked and hit Publish for.

This has caused all kinds of problems, as you can imagine. We had to resort to going one-by-one in the portal and using the in-browser editor to republish those 54 runbooks.

silverl commented 1 year ago

For a possible repro, try this:

Swatidevgan commented 1 year ago

Hello Larry,

Our team has gone through the issue reported here and deploying a fix to remove the confusion due to which your runbooks got overwritten. Going forward, if you are right clicking on a particular runbook in VSCode tab to publish the changes, the updates will be made corresponding to that specific runbook instead of the one that is actively open in your tab. This fix is WIP and I will update the thread once this is done. Thank You.