Kitchen Copying Cookbook Files on Windows 10 Failing Intermittedly due to Path Limit


#1

Hey

Got an annoying issue where my local Kitchen setup isn’t playing ball with some new directories and files I’ve added to my cookbook.

The behavior suggests it’s the Windows Path Limit that’s blocking the Kitchen process from copying my new files to the temp directory as the full path in Temp is longer than the dreaded 260 character limit. But I have enabled Long Path Names on my machine (it’s Windows 10) and it started to work again for a little bit. But once I added more files it started failing again:

Failed to complete #converge action: [No such file or directory @ dir_s_mkdir - C:/Users/Admin/AppData/Local/Temp/<path to first cookbook file that added up to more than 260 chars>

Is there anyway to make this better? Maybe pointing kitchen at a different Temp directory with a shorter path somehow?

Cheers,
R.


#2

There were old bugs in test-kitchen around that, and bugs in old chef-cilent that looked like that.

If you can replicate it on current ChefDK + test-kitchen + chef-client as a target then you should submit a bug.


#3

Hey

Thanks for replying. After some more investigation I found it was indeed due to the Windows path limit even with the Windows 10 long path names set to on. Seems like it’s not guaranteed for everything so it was still hitting the limit.

Cheers,
R.


#4

Actually @Lamont_Granquist, after hitting this again I was wondering if there was a way for Chef \ Kitchen to either honor the extended Windows 10 path limit if enabled or use the unicode apis?