question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

jvm_import_external not failing properly for wrong artifact_sha256

See original GitHub issue

Description of the problem / feature request:

    jvm_maven_import_external(
        name = "info_picocli",
        artifact = "info.picocli:picocli:4.0.4",
        artifact_sha256 = "",
        licenses = ["notice"],
        server_urls = maven_servers,
    )

If artifact_sha256 is empty and maven_servers is a non-secure service Bazel is complaining about the missing artifact_sha256.

However, if I specify a wrong artifact_sha256 (copy and paste error on my end), Bazel build is not failing with a “wrong sha error” but with a weird: Extracting interface @info_picocli//:info_picocli failed (Aborted): ijar failed: error executing command because of Unable to open Zip file external/info_picocli/....jar: Input/output error

Feature requests: what underlying problem are you trying to solve with this feature?

Bazel should fail with a message explaining that the SHA is wrong.

What’s the output of bazel info release?

1.2.1

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
aehligcommented, Dec 4, 2019

@jin since jvm_import_external has another identifier, it probably should use the cache separation described in https://github.com/bazelbuild/proposals/blob/master/designs/2019-04-29-cache.md that is already implemented.

0reactions
jincommented, Dec 6, 2019

@aehlig Thanks. We should set canonical_id parameter to be the fully qualified coordinates of the artifact, since artifacts are immutable and the coordinates (should) map 1:1 to the checksum.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Downloading succeeds with a valid (cached?) hash but ...
I think, there are two approaches to fix this repoistory cache problem and to store artifact/URL in the CAS and to be able...
Read more >
Verifying dependencies - Gradle User Manual
Doing so, Gradle will verify all artifacts using checksums, but will not verify signatures. Gradle will verify any artifact downloaded using its dependency ......
Read more >
Java SecurityException: signer information does not match
This happens when classes belonging to the same package are loaded from different JAR files, and those JAR files have signatures signed with ......
Read more >
ARTIFACTORY: How to resolve metadata migration issues ...
Step 1: Firstly, check if any artifacts are present in the database without SHA-256 value. For this run the following query in the...
Read more >
Unable to find valid certification path to requested target
When it came time to install Java, I installed the latest JDK (1.8). ... [ERROR] Failed to execute goal on project reports: Could...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found