-
-
Notifications
You must be signed in to change notification settings - Fork 186
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
Issues with Start-SleepProgress #402
Comments
Hi @master135. Thanks for reaching out. Are you sure the process hangs indefinitely? Whether or not you're running New-PACertificate interactively, there's still a default sleep time (2 minutes) that happens while the module waits for published DNS changes to propagate. But that sleep time can vary if you've overridden the default using I haven't heard about issues with Write-Progress in Azure Automation accounts before. And I'm pretty sure there are existing users using Posh-ACME with Automation runbooks successfully. |
Nevermind. Apparently, it's a documented limitation I was unaware of. https://docs.microsoft.com/en-us/azure/automation/automation-runbook-output-and-messages#handle-progress-records
I'm curious whether the the $ProgressPreference would work to workaround the problem. Could you possible try setting If that doesn't work, the easiest fix would probably be adding support for an environment variable to disable calling |
Hi @rmbolger Unfortunately $ProgressPreference is not supported on Azure Automation Account
Yes, this will work, or replace |
In retrospect, you're right. This is a tool for automation and progress bars are intended for interactive use. I'm going to push a change to the main branch in a sec that disables |
…s a POSHACME_SHOW_PROGRESS environment variable is defined. (#402)
Wow, thanks for such quick actions! |
You're very welcome. I appreciate the poke to re-evaluate past decisions. It may be a week or two until a I push a new release with this change included because I'm actively working on a new feature I'm hoping to include in the next release. |
This is now live in 4.11.0 |
Hi,
I'm running Posh-ACME module on Azure's Automation Account Hybrid Worker (Oracle Linux 7.9). It works everything good when I run my
New-PACertificate
from SSH session. However on Automation accout it always hangs onStart-SleepProgress
private function. Guess this behaviour is because Automation Account is not friendly toWrite-Progress
cmdlet.Since primary usage of this module is automation of getting certificates I would expect there is no need to display progress bar for end user, rather logging information that script execution will be paused for some time.
I would override
Start-SleepProgress
with my own function, however since its in private, nothing works for me at the moment..The text was updated successfully, but these errors were encountered: