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

fix(promtail): build on windows #650

Merged
merged 2 commits into from
Jun 6, 2019
Merged

fix(promtail): build on windows #650

merged 2 commits into from
Jun 6, 2019

Conversation

sh0rez
Copy link
Member

@sh0rez sh0rez commented Jun 4, 2019

This pull request will allow promtail to build for Windows (Fixes #567). This was not possible until recently, because of a dependency on cortexproject/cortex#1336. As this has been resolved, promtail should be available for Windows as well.

The following is required to make this work:

@CLAassistant
Copy link

CLAassistant commented Jun 4, 2019

CLA assistant check
All committers have signed the CLA.

Updates cortex vendor to get the changes from cortexproject/cortex#1431.
Required for making promtail build on Windows

Signed-off-by: sh0rez <me@shorez.de>
Build promtail on linux and windows, discard artifacts
@sh0rez sh0rez marked this pull request as ready for review June 4, 2019 11:29
@sh0rez
Copy link
Member Author

sh0rez commented Jun 4, 2019

Ready for review, as the other two tasks seem to be very complicated:

  1. I have no experience with Windows containers and I do not know if we even need one, if promtail works in one, etc. And we cannot build them in CI, so .. maybe no container?

  2. The CI currently does not publish releases, so adding this is out of scope here

@marco-m
Copy link

marco-m commented Jun 6, 2019

@sh0rez thanks! This is very useful to us. Were are testing this PR on our Windows VM in these days.

Makefile Show resolved Hide resolved
@sh0rez
Copy link
Member Author

sh0rez commented Jun 6, 2019

@slim-bean Oh, it does! I thought so as well, but running GOOS=windows make produces an exec format error, because GOOS is windows, go generate is compiling a temp binary (for windows) and tries to execute it on linux/osx. So for cross compiling we do need this.

Copy link
Collaborator

@slim-bean slim-bean left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, I follow now, didn't see the go run inside the go generate comment in doc.go

LGTM!

@slim-bean slim-bean mentioned this pull request Jun 6, 2019
2 tasks
@slim-bean slim-bean merged commit ba54f51 into grafana:master Jun 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

promtail doesn't work on windows
4 participants