Issue
When performing Invoke-AzOpsPull and there is a item discovered with a proposed filename that exceeds the underlying execution environments maximum allowed filename length the Pull fails and exit's with error code 1.
Maximum filename length
This can in theory happen with any resource, I have only encountered it when having Core.SkipChildResource set to false.
Steps to reproduce
- Create a ChildResource with long name, in my scenario it is a microsoft.recoveryservices_vaults with a azure migrate protected VM.
- Enable ChildResource discovery
- Run Invoke-AzOpsPull
Error output
[ConvertTo-AzOpsState] Exporting AzOpsState to /home/runner/work/repo/***/microsoft.recoveryservices_vaults_replicationfabrics_replicationprotectioncontainers_replicationprotectioncontainermappings-test1-migratevault-1470815024_1541289ea1c5c535f89c0788063b3f5af00e91a2c63438851d90ef7143747149_cloud_308af796-701f-4d5d-ba68-a2434abb3c84_defaultrecplicationvm-containermapping.json
Set-Content: is too long, or a component of the specified path is too long.
Issue
When performing Invoke-AzOpsPull and there is a item discovered with a proposed filename that exceeds the underlying execution environments maximum allowed filename length the Pull fails and exit's with error code 1.
Maximum filename length
This can in theory happen with any resource, I have only encountered it when having Core.SkipChildResource set to false.
Steps to reproduce
Error output
[ConvertTo-AzOpsState] Exporting AzOpsState to /home/runner/work/repo/***/microsoft.recoveryservices_vaults_replicationfabrics_replicationprotectioncontainers_replicationprotectioncontainermappings-test1-migratevault-1470815024_1541289ea1c5c535f89c0788063b3f5af00e91a2c63438851d90ef7143747149_cloud_308af796-701f-4d5d-ba68-a2434abb3c84_defaultrecplicationvm-containermapping.json
Set-Content: is too long, or a component of the specified path is too long.