[Feature]: Cleanup .Azure\ErrorRecords
Francisco-Gamino opened this issue · 2 comments
This issue was originally from Azure PowerShell Azure/azure-powershell#21732
Description of the new feature
The ~/.Azure/ErrorRecords folder has a log of all failed cmdlets.
We should clean this folder on a regular basis or not use it depending how the content is used.
Mitigation
If the customer function app does not have a dependency on the files (at this location), they can delete them with the following command. They can add this to one of their function's code:
Remove-Item ~/.Azure/ErrorRecords/* -ErrorAction SilentlyContinue
@Francisco-Gamino is the there a limit imposed on the size of the directory for different function SKUs?
The Azure PowerShell team provided a new config DisableErrorRecordsPersistence which will be available with Az 10.3.0 (will be available on 2023-09-05 PST)
Update-AzConfig -DisableErrorRecordsPersistence $truePlease use this to disable writing logs to your file system.
This config will be deprecated and replaced by 'EnableErrorRecordsPersistence' in next major Az release around November 2023. Writing error records to file system will be opt-in since then.