Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Absolute paths for cache folders always cause misses in Windows containers #460

Open
Snaipe opened this issue Sep 19, 2019 · 5 comments

Comments

@Snaipe
Copy link

commented Sep 19, 2019

Expected Behavior

Given this cache definition:

meson-setup_cache:
  folder: C:\\Python
  populate_script: |-  
    choco install -y --no-progress python3 --params "/InstallDir:C:\Python"  
    pip install meson

I would expect C:\Python to be the directory where the cache is unpacked to.

I realize that the proper way to do this is to just make a docker image where this is preinstalled, but I'm currently experimenting a bit, away from a windows machine, and the docker hub does not support automated builds for windows images.

Real Behavior

C:\Users\ContainerAdministrator\AppData\Local\Temp\cirrus-ci-build>call choco info -r python3 
python3|3.7.4
C:\Users\ContainerAdministrator\AppData\Local\Temp\cirrus-ci-build>if 0 NEQ 0 exit /b 0 
C:\Users\ContainerAdministrator\AppData\Local\Temp\cirrus-ci-build>call (pip search meson   || VER  1>NUL)  | findstr /r /c:"^meson \([^)]+\)"   || VER1>NUL 
C:\Users\ContainerAdministrator\AppData\Local\Temp\cirrus-ci-build>if 0 NEQ 0 exit /b 0 
Downloaded 32Mb.
Cache hit for meson-setup-61b4b925d56d34d21b5e1abb2bdfa46c43bdfa9c2e6b6ed9c6451676bfb964ad!
Failed to unarchive meson-setup cache because of C:\Python\C:\Python\DLLs: making directory: mkdir C:\Python\C:: The filename, directory name, or volume label syntax is incorrect.!

It seems that it tries to unpack the cache into C:\Python, but the archive itself contains the C:\Python path prefix rather than just the contents relative to it.

Related Info

@Snaipe Snaipe added the bug label Sep 19, 2019
@RDIL

This comment has been minimized.

Copy link
Contributor

commented Sep 19, 2019

Hey @Snaipe!
Please see #459 - it explains this issue.
If you have any other questions, I'm here to help :)

@Snaipe

This comment has been minimized.

Copy link
Author

commented Sep 19, 2019

Ah, I see, so the real bug here is the fact that folder: Drive:\Anything is bogus, but still "works"?

I see -- I'll just stop abusing the cache to make up for my own lazyness of setting up a Windows VM and pushing an image with the right software on it.

@Snaipe Snaipe changed the title Absolute paths for cache folders always cause misses in Windows containers Absolute paths for cache folders seem to work in Windows containers Sep 19, 2019
@RDIL

This comment has been minimized.

Copy link
Contributor

commented Sep 19, 2019

@fkorotkov any idea why this behavior is happening?

@Snaipe

This comment has been minimized.

Copy link
Author

commented Sep 19, 2019

Note that the documentation is currently unclear on that aspect:

The folder is a required field that tells the agent which folder to cache. It should be relative to the working directory, or the root directory of the machine (ex. node_modules or /usr/bin/bundler).

It really does seem like any absolute path is supposed to work.

@fkorotkov

This comment has been minimized.

Copy link
Contributor

commented Sep 19, 2019

Seems like a Windows specific bug which is not related to #459. Will investigate. 🙌

@Snaipe Snaipe changed the title Absolute paths for cache folders seem to work in Windows containers Absolute paths for cache folders always cause misses in Windows containers Sep 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.