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

go generate command fails on running make pre-commit -B #8251

Closed
rohankmr414 opened this issue Mar 25, 2022 · 1 comment · Fixed by #8252
Closed

go generate command fails on running make pre-commit -B #8251

rohankmr414 opened this issue Mar 25, 2022 · 1 comment · Fixed by #8252
Labels
area/build Build or GithubAction/CI issues type/bug

Comments

@rohankmr414
Copy link
Member

Summary

Running make pre-commit -B gives the following error

go generate ./persist/sqldb ./pkg/plugins ./pkg/apiclient/workflow ./server/auth ./server/auth/sso ./workflow/executor
26 Mar 22 00:45 IST INF Starting mockery dry-run=false version=v2.9.4
26 Mar 22 00:45 IST INF Walking dry-run=false version=v2.9.4
2022/03/26 00:45:12 internal error: package "upper.io/db.v3/lib/sqlbuilder" without types was imported from "github.com/argoproj/argo-workflows/v3/persist/sqldb"
persist/sqldb/workflow_archive.go:49: running "mockery": exit status 1
26 Mar 22 00:45 IST INF Starting mockery dry-run=false version=v2.9.4
26 Mar 22 00:45 IST INF Walking dry-run=false version=v2.9.4
2022/03/26 00:45:13 internal error: package "github.com/argoproj/pkg/grpc/http" without types was imported from "github.com/argoproj/argo-workflows/v3/pkg/apiclient/workflow"
pkg/apiclient/workflow/workflow.go:3: running "mockery": exit status 1
26 Mar 22 00:45 IST INF Starting mockery dry-run=false version=v2.9.4
26 Mar 22 00:45 IST INF Walking dry-run=false version=v2.9.4
2022/03/26 00:45:14 internal error: package "context" without types was imported from "github.com/argoproj/argo-workflows/v3/server/auth"
server/auth/gatekeeper.go:47: running "mockery": exit status 1
26 Mar 22 00:45 IST INF Starting mockery dry-run=false version=v2.9.4
26 Mar 22 00:45 IST INF Walking dry-run=false version=v2.9.4
2022/03/26 00:45:15 internal error: package "fmt" without types was imported from "github.com/argoproj/argo-workflows/v3/server/auth/sso"
server/auth/sso/sso.go:37: running "mockery": exit status 1
26 Mar 22 00:45 IST INF Starting mockery dry-run=false version=v2.9.4
26 Mar 22 00:45 IST INF Walking dry-run=false version=v2.9.4
2022/03/26 00:45:17 internal error: package "bytes" without types was imported from "github.com/argoproj/argo-workflows/v3/workflow/executor"
workflow/executor/executor.go:89: running "mockery": exit status 1
make: *** [Makefile:278: docs] Error 1

This can be fixed by bumping github.com/vektra/mockery from v2.9.4 -> v2.10.0
see: vektra/mockery#416


Message from the maintainers:

Impacted by this bug? Give it a 👍. We prioritise the issues with the most 👍.

@alexec alexec added the area/build Build or GithubAction/CI issues label Mar 25, 2022
@alexec
Copy link
Contributor

alexec commented Mar 25, 2022

Would you like to submit a PR to fix this?

@alexec alexec removed the triage label Mar 25, 2022
rohankmr414 added a commit to rohankmr414/argo-workflows that referenced this issue Mar 26, 2022
…j#8251

Signed-off-by: Rohan Kumar <rohankmr414@gmail.com>
terrytangyuan pushed a commit that referenced this issue Mar 26, 2022
…8252)

* chore: bump `vektra/mockery` 2.9.4->2.10.0 in Makefile. Fixes #8251

Signed-off-by: Rohan Kumar <rohankmr414@gmail.com>

* fix: codegen

Signed-off-by: Rohan Kumar <rohankmr414@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/build Build or GithubAction/CI issues type/bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants