You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "Greg Harris (Jira)" <ji...@apache.org> on 2023/02/27 23:43:00 UTC

[jira] [Assigned] (KAFKA-14767) Gradle build fails with missing commitId after git gc

     [ https://issues.apache.org/jira/browse/KAFKA-14767?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Greg Harris reassigned KAFKA-14767:
-----------------------------------

    Assignee: Greg Harris

> Gradle build fails with missing commitId after git gc
> -----------------------------------------------------
>
>                 Key: KAFKA-14767
>                 URL: https://issues.apache.org/jira/browse/KAFKA-14767
>             Project: Kafka
>          Issue Type: Bug
>          Components: build
>            Reporter: Greg Harris
>            Assignee: Greg Harris
>            Priority: Minor
>
> Reproduction steps:
> 1. `git gc`
> 2. `./gradlew jar`
> Expected behavior: build completes successfully (or shows other build errors)
> Actual behavior:
> {noformat}
> Task failed with an exception.
> -----------
> * What went wrong:
> A problem was found with the configuration of task ':storage:createVersionFile' (type 'DefaultTask').
>   - Property 'commitId' doesn't have a configured value.
>     
>     Reason: This property isn't marked as optional and no value has been configured.
>     
>     Possible solutions:
>       1. Assign a value to 'commitId'.
>       2. Mark property 'commitId' as optional.
>     
>     Please refer to https://docs.gradle.org/7.6/userguide/validation_problems.html#value_not_set for more details about this problem.{noformat}
> This appears to be due to the fact that the build.gradle determineCommitId() function is unable to read the git commit hash for the current HEAD. This appears to happen after a `git gc` takes place, which causes the `.git/refs/heads/*` files to be moved to `.git/packed-refs`.
> The determineCommitId() should be patched to also try reading from the packed-refs to determine the commit hash.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)