Skip to content
This repository has been archived by the owner on Jan 27, 2021. It is now read-only.

random CI failures #30

Closed
kulmann opened this issue Jun 5, 2020 · 8 comments
Closed

random CI failures #30

kulmann opened this issue Jun 5, 2020 · 8 comments
Assignees
Labels
bug Something isn't working

Comments

@kulmann
Copy link
Member

kulmann commented Jun 5, 2020

CI randomly fails in different pipelines with the following error message:

protoc \
		-I=third_party/ \
		-I=pkg/proto/v0/ \
		--go_out=pkg/proto/v0 settings.proto
	protoc-gen-go: program not found or is not executable
	Please specify a program using absolute path or make sure the program is available in your PATH system variable
	--go_out: protoc-gen-go: Plugin failed with status code 1.
	make: *** [Makefile:173: pkg/proto/v0/settings.pb.go] Error 1

The program not found or is not executable error appears randomly for:

  • protoc-gen-go
  • protoc-gen-micro
  • protoc-gen-microweb

Example CI run: https://cloud.drone.io/owncloud/ocis-settings/106/3/4

Needs investigation.

@kulmann kulmann added the bug Something isn't working label Jun 5, 2020
@kulmann kulmann self-assigned this Jun 5, 2020
@kulmann
Copy link
Member Author

kulmann commented Aug 20, 2020

Same happens in ocis-accounts (e.g. https://cloud.drone.io/owncloud/ocis-accounts/387/2/5) and ocis-hello

@kulmann
Copy link
Member Author

kulmann commented Aug 20, 2020

According to e.g. https://cloud.drone.io/owncloud/ocis-settings/277/1/7 protoc can't find protoc-gen-micro, protoc-gen-microweb etc.

Looking into our Makefile, those are installed into the $GOPATH:

$(GOPATH)/bin/protoc-gen-go:

Now looking at the docker image we're using:

Does anyone know why the $GOPATH is set to a directory that looks like it's supposed to serve a compiled binary and not have any other go binaries in it?

@kulmann
Copy link
Member Author

kulmann commented Aug 20, 2020

On second thought, we check the generated proto code into our codebase anyway. Why do we need to run protoc at all? 🤔

@kulmann
Copy link
Member Author

kulmann commented Aug 21, 2020

@C0rby see the comments here and this PR #54
Drone is still failing though, so changing from go get to go install didn't help.

@kulmann kulmann assigned C0rby and unassigned kulmann Aug 21, 2020
@kulmann
Copy link
Member Author

kulmann commented Aug 21, 2020

You can find the Dockerfile we're using here: https://github.com/dockhippie/golang/blob/master/v1.13/Dockerfile.amd64

@C0rby
Copy link
Contributor

C0rby commented Aug 21, 2020

GOBIN is included to the PATH by /srv/app/bin https://github.com/dockhippie/golang/blob/master/v1.13/Dockerfile.amd64#L19. So that should not be the problem

@C0rby
Copy link
Contributor

C0rby commented Aug 21, 2020

So I didn't really make any progress... it's strange but I think we should revert back from go install to go get because go install only compiles local projects and puts the binary into the $GOBIN directory.

My guess is that for some reason the task which does the go install or go get is not being triggered... but why?

@kulmann
Copy link
Member Author

kulmann commented Aug 26, 2020

This issue has been resolved by explicitly including the protobuf step before build steps in .drone.star.
It still is odd and counts as a workaround, because we didn't find out why protoc is called in the build step in the first place. Forcing the protobuf step before build just makes sure that the required protoc plugins are installed properly. But it's not an explanation, why protoc runs during build...

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants