m3db / m3

M3 monorepo - Distributed TSDB, Aggregator and Query Engine, Prometheus Sidecar, Graphite Compatible, Metrics Platform

Home Page:https://m3db.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[devprod] Makefile target for creating mocks is broken

shaan420 opened this issue · comments

Filing M3 Issues

General Issues

When I run "make mock-gen-aggregator" it fails with errors pointing to file not found etc.

shankar ~/go-repos/src/oss/m3 % make mock-gen-aggregator
Installing build tools
go: finding module for package golang.org/x/tools/go/ast/astutil
go: finding module for package github.com/m3db/m3x/log
go: found github.com/m3db/m3x/log in github.com/m3db/m3x v0.0.0-20190408051622-ebf3c7b94afd
go: found golang.org/x/tools/go/ast/astutil in golang.org/x/tools v0.1.12
go: finding module for package golang.org/x/tools/imports
go: finding module for package golang.org/x/tools/go/ast/astutil
go: found golang.org/x/tools/go/ast/astutil in golang.org/x/tools v0.1.12
go: found golang.org/x/tools/imports in golang.org/x/tools v0.1.12
go: finding module for package golang.org/x/tools/imports
go: finding module for package github.com/pkg/errors
go: found github.com/pkg/errors in github.com/pkg/errors v0.9.1
go: found golang.org/x/tools/imports in golang.org/x/tools v0.1.12
--- Generating mocks aggregator
20:38:52.350246[F] unable to write output to /home/user/go/src/github.com/m3db/m3/src/aggregator/aggregator/aggregator_mock.go: open /home/user/go/src/github.com/m3db/m3/src/aggregator/aggregator/aggregator_mock.go: no such file or directory
src/aggregator/generated/mocks/generate.go:22: running "sh": exit status 1
make: *** [Makefile:391: mock-gen-aggregator] Error 1

It seems like the make target rely on hardcoded filepaths which might not be the case in most scenarios.