apache / iceberg

Apache Iceberg
https://iceberg.apache.org/
Apache License 2.0
6.49k stars 2.24k forks source link

The source artifacts provided with GitHub releases are not buildable. #11505

Open AnatolyPopov opened 1 week ago

AnatolyPopov commented 1 week ago

Apache Iceberg version

1.7.0 (latest release)

Query engine

None

Please describe the bug 🐞

The artifacts that are published with GitHub releases are not buildable because the is no .git directory so there is no information that is required by Gradle plugin com.gorylenko.gradle-git-properties. So the build fails when it tries to execute generateGitProperties.

Ideally would be good to either have a pre-built downloadable artifacts or at least an artifact with the sources that is possible to build from.

Willingness to contribute

Fokko commented 1 week ago

Hey @AnatolyPopov Thanks for raising this 🙏

The official channel is through Apache: https://dlcdn.apache.org/iceberg/apache-iceberg-1.7.0/apache-iceberg-1.7.0.tar.gz

This .tar.gz contains a version.txt file, that's being picked up by Gradle: https://github.com/apache/iceberg/blob/1c576c5952fbc623591e800408cdba1518e6a410/build.gradle#L1054-L1073

When that file is not there, it will try to determine the version through git. This way we don't have to bump the version after each release.

AnatolyPopov commented 1 week ago

Thanks for a quick reply @Fokko!

First of all, thanks, building from the tarball you linked above works as expected. However I have several points that I think still should be addressed.

I've been taking the sources from the tarball attached to the release here https://github.com/apache/iceberg/releases/tag/apache-iceberg-1.7.0. I would assume that it should as well be buildable, otherwise IMO it does not make too much sense to have it published.

The version.txt was the first thing I've tried to add after looking into exactly the same piece of code you linked above but it does not help because there is still no iceberg-build.properties so the build crashes with > Task :generateGitProperties FAILED as expected. I would expect both version.txt and iceberg-build.properties to be included in release tarball attached to GitHub release as well.

Also I can see that iceberg-build.properties from the official tarball you linked above is different from the one that is generated from sources and is lacking the tag apache-iceberg-1.7.0 in git.tags property. This seems to be a little misleading when build properties from official release tarball include only release candidate tag apache-iceberg-1.7.0-rc1.

And one more thing is that even if I clone the repo, checkout the tag, and without manually creating version.txt will try to run assembleDist I will get 1.8.0-SNAPSHOT version. As mentioned in https://github.com/apache/iceberg/issues/11506 I think people would expect to be able to build an artifact with the release version from a release commit without manual modifications. Am I missing something at this point?