spack icon indicating copy to clipboard operation
spack copied to clipboard

GHA: Add Windows workflow with spaces in path to CI

Open johnwparent opened this issue 1 year ago • 1 comments

Windows paths containing spaces is a notable pain point for Spack on Windows. Add a test to ensure stable and robust support for these paths

johnwparent avatar Feb 12 '24 19:02 johnwparent

@alalazo

This seems Ctrl+C Ctrl+V code. Can we have proper unit tests to poke paths with spaces on Windows (instead of running the same tests again, but in a path with spaces)?

It is more or less, I'm just running the exact same test workflow over a path with a space. This was a rough first pass as I was more interested just to see what the CI would do if I gave it a path with a space to operate on and couldn't remember if marking it draft triggered the CI or not.

I plan on adding some unit tests that specifically tests install directory, stage, download cache, and bootstrap directory paths with spaces as if those are mocked, adding this space does nothing because the pytest temp directory for the GHA user does not have a space. In doing that I can make another test module that tests the scenario I add here where the Spack install root has a space and is limited to specific functionality that would be impacted by that. That said, I think that can also be (maybe better?) accomplished by only running a few select modules from the CLI rather than re-doing the entire CI with a space as I am now.

Edit: Perhaps this should be accomplished with a pytest fixture/parameterization that adds a TEMP path with a space and I can pepper that into the existing test suite as is reasonable. I'll try that out first as it seems the most efficient/least invasive.

If that for any reason is not possible, and we have to run the same unit-tests two times, can we use a matrix in the YAML file for the working directory?

If the above doesn't work out and we end up taking this approach, yes, good idea., will do!

johnwparent avatar Feb 19 '24 20:02 johnwparent

Gitlab CI tests paths with spaces well enough I don't think we need to bother here unless something specific comes up in the future, which can/should be handled as @alalazo suggests above. Now that Windows Gitlab CI is in, closing this.

johnwparent avatar May 21 '24 14:05 johnwparent