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

Make test fails on Windows 10 with git bash #8206

Closed
dzmitry-lahoda opened this issue Aug 22, 2020 · 7 comments
Closed

Make test fails on Windows 10 with git bash #8206

dzmitry-lahoda opened this issue Aug 22, 2020 · 7 comments

Comments

@dzmitry-lahoda
Copy link
Contributor

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Terraform (and AzureRM Provider) Version

Master

Terraform Configuration Files

make test

Debug Output

dz@lahoda-pc MINGW64 /c/Go/src/github.com/terraform-providers/terraform-provider-azurerm (feaute/app-service-autoheal)
$ make test
==> Checking that code complies with gofmt requirements...
==> Checking that Custom Timeouts are used...
==> Checking that acceptance test packages are used...
==> Checking for use of gradually deprecated functions...
The Feature Flag for 'ShouldResourcesBeImported' will be deprecated in the future
and shouldn't be used in new resources - please remove new usages of the
'ShouldResourcesBeImported' function from these changes - since this is now enabled
by default.

In the future this function will be marked as Deprecated - however it's not for
the moment to not conflict with open Pull Requests.
==> Checking for use of deprecated functions...
Data Sources should return an error when a resource cannot be found rather than
setting an empty ID (by calling 'd.SetId()'.

Please remove the references to 'd.SetId() from the Data Sources listed below
and raise an error instead:

./azurerm/internal/services/datashare/data_source_data_share.go
==> Running Unit Tests...
./scripts/run-test.sh: line 18: /c/go/bin/go: Argument list too long
make: *** [GNUmakefile:87: test] Error 1
```
@dzmitry-lahoda
Copy link
Contributor Author

alternatively, could document how to run stuff via vscode + wsl2, i bet bash here is more 1 to 1 to linux

@manicminer
Copy link
Contributor

manicminer commented Aug 25, 2020

Hi @dzmitry-lahoda, thanks for reporting this. When running in git-bash or cygwin, I get the same error (Argument list too long) and I think it may be due to ARG_MAX being very small. With Cygwin or git-bash on my machine, it's between one and two orders of magnitude smaller than my MacOS or Linux environments.

Whilst we could potentially alter the relevant script to descend into directories and not pass any module names to go test - thus shortening the exec()'d command, this runs the risk of potentially missing some of the tests, and I suspect we might hit the same issue in multiple places. There are also path length limitations that frequently cause issues.

My suggestion would be to try with WSL (1 or 2). You can also invoke go test manually. I'll take a look at improving the documentation here.

@dzmitry-lahoda
Copy link
Contributor Author

are any changes pure go or go test solution could be accepted in PR as runner? (if that reasonably possible to write just go script runner)

@manicminer
Copy link
Contributor

manicminer commented Sep 3, 2020

I did play around with some options for shortening the invoked command, but nothing that gives us the flexibility to scan for packages the way we have now.

@dzmitry-lahoda
Copy link
Contributor Author

okey, will try WSL2

@favoretti
Copy link
Collaborator

Thanks for opening this issue! Since this issue has been reported a long time ago and relates to an older version of provider - I'm going to close it. If this is still relevant and occurring on the latest version of terraform and provider please do open a new issue!

@github-actions
Copy link

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 25, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants