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

hive-druid-handler-4.0.0-alpha-2-tests.jar is recorded twice under koFiles #1918

Open
algomaster99 opened this issue Mar 15, 2025 · 5 comments
Labels
help wanted Extra attention is needed

Comments

@algomaster99
Copy link
Contributor

# diffoscope target/reference/hive-druid-handler-4.0.0-alpha-2-tests.jar druid-handler/target/hive-druid-handler-4.0.0-alpha-2-tests.jar
# diffoscope target/reference/hive-druid-handler-4.0.0-alpha-2-tests.jar druid-handler/target/hive-druid-handler-4.0.0-alpha-2-tests.jar

This does not affect the check, but I am still curious to know why the artifact is mentioned twice in koFiles and in diffoscope commands.

@hboutemy
Copy link
Member

hboutemy commented Mar 20, 2025

good question, will require a debug session of compare goal on this build to undestand how the internal state of the build session lead to track 2 separate Artifacts that at the end lead to the same file

code is https://github.com/apache/maven-artifact-plugin/blob/maven-artifact-plugin-3.6.0/src/main/java/org/apache/maven/plugins/artifact/buildinfo/CompareMojo.java

@hboutemy hboutemy added the help wanted Extra attention is needed label Mar 20, 2025
@hboutemy
Copy link
Member

notice: this is probably more a bug report for maven-artifact-plugin's goal than a bug report to Reproducible Central

@algomaster99
Copy link
Contributor Author

@hboutemy I will take a look at this later this week :)

his is probably more a bug report for maven-artifact-plugin's goal than a bug report to Reproducible Central

do we want to transfer it to the issue tracker of maven-artifact plugin?

@hboutemy
Copy link
Member

most important is to investigate: I just suspect the fix will be there...

@algomaster99
Copy link
Contributor Author

@hboutemy I tried debugging this. I am still not sure where exactly the bug is but I might have narrowed it down.

If we look at printArtifacts, it prints outputs.0 (org.apache.hive:hive-druid-handler:pom:4.0.0-alpha-2) and outputs.1 (org.apache.hive:hive-druid-handler:jar:4.0.0-alpha-2) which correspond to the pom file and the main jar file respectively.

Then it goes to loop over "attached artifacts" which are

org.apache.hive:hive-druid-handler:zip:source-release:4.0.0-alpha-2
org.apache.hive:hive-druid-handler:java-source:sources:4.0.0-alpha-2
org.apache.hive:hive-druid-handler:test-jar:tests:4.0.0-alpha-2
org.apache.hive:hive-druid-handler:jar:tests:4.0.0-alpha-2

The based on each of them, it deduces the artifact name:

  1. org.apache.hive:hive-druid-handler:zip:source-release:4.0.0-alpha-2 -> hive-druid-handler-4.0.0-alpha-2-source-release.zip
  2. org.apache.hive:hive-druid-handler:java-source:sources:4.0.0-alpha-2 -> hive-druid-handler-4.0.0-alpha-2-sources.jar
  3. org.apache.hive:hive-druid-handler:test-jar:tests:4.0.0-alpha-2 -> hive-druid-handler-4.0.0-alpha-2-tests.jar
  4. org.apache.hive:hive-druid-handler:jar:tests:4.0.0-alpha-2 -> hive-druid-handler-4.0.0-alpha-2-tests.jar

Now I have two questions.

  1. What exactly are attached artifacts?
  2. Why am I getting an artifact with source-release classifier? It was not there in the build in Reprorucible Central.
The final buildinfo file generated for my debugging session
# https://reproducible-builds.org/docs/jvm/
buildinfo.version=1.0-SNAPSHOT

name=Hive Druid Handler
group-id=org.apache.hive
artifact-id=hive-druid-handler
version=4.0.0-alpha-2

source information

source.scm.uri=scm:git:https://gitbox.apache.org/repos/asf/maven-apache-parent.git/hive/hive-druid-handler
source.scm.tag=apache-23

build instructions

build-tool=mvn

effective build environment information

java.version=17.0.10
java.vendor=Eclipse Adoptium
os.name=Linux

Maven rebuild instructions and effective environment

mvn.version=3.9.9

output

outputs.0.groupId=org.apache.hive
outputs.0.filename=hive-druid-handler-4.0.0-alpha-2.pom
outputs.0.length=15403
outputs.0.checksums.sha512=517ac75da31db94eb14f51ebd293b9cb288ca3739098b83e515ca0e00bd2104efdcb0bc3f14a9fc8f7a623151ea42c55f71a977f247ee188bbcdfd8c25ed1d8e

outputs.1.groupId=org.apache.hive
outputs.1.filename=hive-druid-handler-4.0.0-alpha-2.jar
outputs.1.length=46770734
outputs.1.checksums.sha512=075cd53d41f951a88148f1343df6d30f417f61ad94ccc3dd8d903914dc96a88c745cb1c7fa89b14f8e0eef145ece9c8b3f5636c1de6b7ae67df63fdedb21636b

outputs.2.groupId=org.apache.hive
outputs.2.filename=hive-druid-handler-4.0.0-alpha-2-source-release.zip
outputs.2.length=142754
outputs.2.checksums.sha512=43bc20d0d3cf5de65cd6fddac76f5fef61d1f0ea7b301b9f3e89688db20fd4780738370fe6ce42f018e9dfc69fe9c312073200a262de73584f6bbca4f9843a9e

outputs.3.groupId=org.apache.hive
outputs.3.filename=hive-druid-handler-4.0.0-alpha-2-sources.jar
outputs.3.length=108188
outputs.3.checksums.sha512=ce87d8086518c5b1bfa707d101d1d384f64bca35049dc50e03a487104c5973dd560235fdf63133c01f611c75a7c05cc64950cbadbd19e7a7ca4740f17ab74b96

outputs.4.groupId=org.apache.hive
outputs.4.filename=hive-druid-handler-4.0.0-alpha-2-tests.jar
outputs.4.length=63805
outputs.4.checksums.sha512=be49fc8c0396051e75de7119f57cfa15c4553c0c9afcb72f5fcc46e13b9e393a5c8a8c01f554373fdf71f547a3b34415ffe8fb86c53f024f642853cfcaf657f8

outputs.5.groupId=org.apache.hive
outputs.5.filename=hive-druid-handler-4.0.0-alpha-2-tests.jar
outputs.5.length=63805
outputs.5.checksums.sha512=be49fc8c0396051e75de7119f57cfa15c4553c0c9afcb72f5fcc46e13b9e393a5c8a8c01f554373fdf71f547a3b34415ffe8fb86c53f024f642853cfcaf657f8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Development

No branches or pull requests

2 participants