atmos icon indicating copy to clipboard operation
atmos copied to clipboard

Vendor Pull Operation Does Not Work on Windows

Open aclarke822 opened this issue 1 year ago • 6 comments

Describe the Bug

When attempting the vendor pull operation on Windows 11, at least 2 scenarios fail. With a github source and no version specified, no error is thrown but the resulting directory is empty. With a github source and a version specified, CreateFile operation fails with:
CreateFile ~\AppData\Local\Temp\1733760752881339476/vpc?ref=1.398.0: The filename, directory name, or volume label syntax is incorrect.

The same scenarios were tested on Amazon Linux (al2023-ami-2023.5.20240722.0-kernel-6.1-x86_64) with no issues.

Expected Behavior

The vendor pull operation should vendor the modules and clone them to the appropriate directories.

Steps to Reproduce

Use the vendor.yaml provided in the quickstart guides and run atmos vendor pull on Windows.

Screenshots

No response

Environment

  • OS: Microsoft Windows 11 Business 10.0.22631 Build 22631
  • Atmos Versions Tested: 1.106.0 / 1.120.0

Additional Context

No response

aclarke822 avatar Dec 09 '24 16:12 aclarke822

We'll look into this, thanks for reporting!

osterman avatar Dec 09 '24 18:12 osterman

This should be resolved in 1.128.0

osterman avatar Dec 17 '24 19:12 osterman

I wanted to come back and say that this scenario still fails: "With a github source and no version specified, no error is thrown but the resulting directory is empty."

I found that it's tied to the included_paths. Works: included_paths: ["**"] Fails with empty directory: included_paths: ["**/**.tf"] For a repo that contains just ./main.tf and ./README.md.

Looks like it could be the same as this issue: https://github.com/cloudposse/atmos/issues/835

I'll track the other issue for resolution. Thanks again for the quick fix for Windows! 🚀

aclarke822 avatar Dec 30 '24 20:12 aclarke822

@aclarke822 can you confirm the precise version of Atmos you tested?

If you have a vendor config we can use to reproduce (and add to our tests), that will speed it up.

Note, we are now testing on windows in our CI pipelines, so we can confirm vendoring does work in the general sense; there must be something about your configuration we are not testing.

osterman avatar Dec 30 '24 21:12 osterman

I tested on 1.20.0 and 1.133.0. Here is an example freshly tested on 1.133.0: https://gist.github.com/aclarke822/c55502591c28c3bd957058916ecd68c8

Files from: https://github.com/cloudposse/terraform-aws-components/tree/main/modules/vpc

vpcC successfully pulls the files. All other sources appear successful based on CLI output, but result in empty directories. The only difference between them (other than naming) is the included_paths property.

aclarke822 avatar Dec 30 '24 22:12 aclarke822

I wanted to come back and say that this scenario still fails: "With a github source and no version specified, no error is thrown but the resulting directory is empty."

I found that it's tied to the included_paths. Works: included_paths: ["**"] Fails with empty directory: included_paths: ["**/**.tf"] For a repo that contains just ./main.tf and ./README.md.

Looks like it could be the same as this issue: #835

I'll track the other issue for resolution. Thanks again for the quick fix for Windows! 🚀

I just tried this on 1.60.5 on Windows and all scenarios are working for me now. I would encourage someone else to test, but from my perspective, this issue could be closed.

aclarke822 avatar Feb 12 '25 15:02 aclarke822