Azure / enterprise-azure-policy-as-code

Enterprise-ready Azure Policy-as-Code (PaC) solution (includes Az DevOps pipeline)
https://azure.github.io/enterprise-azure-policy-as-code/
MIT License
415 stars 220 forks source link

Having one chunk should not be presented as an error message, possibly a warning #543

Closed arrerezai closed 5 months ago

arrerezai commented 5 months ago

If not using the latest Az version, one might receive the following error message: "WARNING: INITIALIZATION: Fallback context save mode to process because of error during checking token cache persistence: Persistence check fails due to unknown error.".

Hence, logic for $throttleLimit should be revised.

In the meantime, setting that variable to 1 leaves the logic for throttling out of the code, but ends up presenting an error message (despite proceeding to succeed). This is not an error but works as expected. Therefore, the Write-Error should either be a Write-Information, a Write-Warning, or nothing at all. I decided to go for Write-Warning as hopefully, there will be a fix to the original problem of throttling while not using the very latest Az version.

arrerezai commented 5 months ago

@ agree