bazel-diff icon indicating copy to clipboard operation
bazel-diff copied to clipboard

Throws an exception when executing Generating Hashes

Open 1405942836 opened this issue 3 years ago • 2 comments
trafficstars

bazel_diff version: 4.0.8, 4.0.5, 4.0.2 Reference documentation: https://github.com/Tinder/bazel-diff/blob/4.0.8/README.md

Integrate bazel_diff into my own project using the recommended way in README.md, Reference address: https://github.com/Tinder/bazel-diff/blob/4.0.8/README.md#integrate-into-your-project-recommended

image

After bazel_diff is generated, an error will be reported when executing the script $bazel_diff generate-hashes -w $workspace_path -b $bazel_path $starting_hashes_json, the error is as follows:

Generating Hashes for Revision '****************'`
`Loading: 0 packages loaded`
Loading: 1384 packages loaded
    currently loading: ******************* ... (42 packages)
WARNING: --keep_going specified, ignoring errors.  Results may be inaccurate
Loading: 1426 packages loaded
Loading: 1426 packages loaded
[Error] Unexpected error during generation of hashes
java.lang.RuntimeException: Bazel query failed, exit code 3
	at com.bazel_diff.bazel.BazelQueryService.query(BazelQueryService.kt:60)
	at com.bazel_diff.bazel.BazelClient.queryAllSourcefileTargets(BazelClient.kt:41)
	at com.bazel_diff.hash.BuildGraphHasher$hashAllBazelTargetsAndSourcefiles$1$sourceTargetsFuture$1.invokeSuspend(BuildGraphHasher.kt:40)
	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
	at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:571)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:750)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:678)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:665)

I also tested bazel_diff of 4.0.8, 4.0.5 and 4.0.2 versions, and will have the same error, while testing earlier versions such as 3.5.0 and 3.4.2 is normal.

Can someone please help to see what is the reason for this thanks.

1405942836 avatar Sep 19 '22 09:09 1405942836

Can you test with https://github.com/Tinder/bazel-diff/pull/150?

tinder-maxwellelliott avatar Sep 20 '22 20:09 tinder-maxwellelliott

Yes, but I tested it and found that there will still be the same error in my project.

image

1405942836 avatar Sep 23 '22 03:09 1405942836