Skip to content

Set-Content - The specified path is too long #578

@Jefajers

Description

@Jefajers

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

  1. Create a ChildResource with long name, in my scenario it is a microsoft.recoveryservices_vaults with a azure migrate protected VM.
  2. Enable ChildResource discovery
  3. 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.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions