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

bug: gradle build failures hide errors #536

Open
hosie opened this issue Jan 27, 2025 · 0 comments
Open

bug: gradle build failures hide errors #536

hosie opened this issue Jan 27, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@hosie
Copy link
Contributor

hosie commented Jan 27, 2025

What happened?

Took me a while to figure out the build break on this PR https://github.com/LF-Decentralized-Trust-labs/paladin/actions/runs/12985190272/job/36214574383?pr=535. Fixed it eventually but the way we (don't) report errors in the build makes this kind of thing difficult to debug

The error in the build was

#42 7.030 
#42 7.031 * Where:
#42 7.031 Build file '/app/core/go/build.gradle' line: 168
#42 7.032 
#42 7.032 * What went wrong:
#42 7.032 A problem occurred evaluating project ':core:go'.
#42 7.033 > path may not be null or empty string. path=''
#42 7.033 

As it turns out, the actual problem was that we had added a new top level module to the go.work ( perf) but the .mod for that was not added to the docker builder layer. Fix here - f0aad98

From the original build error, I suspected something was going wrong with the go list and it was returning empty string. However, I could not see any stderr for that command.

To diagnose this I updated the docker file with

RUN go list -f {{.Dir}} github.com/kaleido-io/paladin/toolkit/pkg/rpcclient

and was able to get the stderr from that failing command.

#39 [full-builder 16/17] RUN go list -f {{.Dir}} github.com/kaleido-io/paladin/toolkit/pkg/rpcclient
#39 0.132 go: cannot load module perf listed in go.work file: open perf/go.mod: no such file or directory
#39 ERROR: process "/bin/sh -c go list -f {{.Dir}} github.com/kaleido-io/paladin/toolkit/pkg/rpcclient" did not complete successfully: exit code: 1
------
 > [full-builder 16/17] RUN go list -f {{.Dir}} github.com/kaleido-io/paladin/toolkit/pkg/rpcclient:
0.132 go: cannot load module perf listed in go.work file: open perf/go.mod: no such file or directory

What did you expect to happen?

Would have been nice to get the stderr from the failing command in the build log

How can we reproduce it (as minimally and precisely as possible)?

Add a new entry to go.work and run gradle docker

Anything else we need to know?

No response

OS version

Docker

@hosie hosie added the bug Something isn't working label Jan 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant