You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "gharris1727 (via GitHub)" <gi...@apache.org> on 2023/02/27 23:41:34 UTC

[GitHub] [kafka] gharris1727 opened a new pull request, #13315: KAFKA-14767: Fix missing commitId build error after git gc

gharris1727 opened a new pull request, #13315:
URL: https://github.com/apache/kafka/pull/13315

   `git gc` moves commit hashes from individual `.git/refs/heads/` to `.git/packed-refs` which is not read by the determineCommitId function.
   
   Replace the existing lookup within the `.git` directory with a GrGit lookup that handles packed and unpacked refs transparently.
   
   ### Committer Checklist (excluded from commit message)
   - [ ] Verify design and implementation 
   - [ ] Verify test coverage and CI build status
   - [ ] Verify documentation (including upgrade notes)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] KAFKA-14767: Fix missing commitId build error after git gc [kafka]

Posted by "ijuma (via GitHub)" <gi...@apache.org>.
ijuma merged PR #13315:
URL: https://github.com/apache/kafka/pull/13315


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [kafka] github-actions[bot] commented on pull request #13315: KAFKA-14767: Fix missing commitId build error after git gc

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #13315:
URL: https://github.com/apache/kafka/pull/13315#issuecomment-1585687231

   This PR is being marked as stale since it has not had any activity in 90 days. If you would like to keep this PR alive, please ask a committer for review. If the PR has  merge conflicts, please update it with the latest from trunk (or appropriate release branch)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [kafka] ijuma commented on a diff in pull request #13315: KAFKA-14767: Fix missing commitId build error after git gc

Posted by "ijuma (via GitHub)" <gi...@apache.org>.
ijuma commented on code in PR #13315:
URL: https://github.com/apache/kafka/pull/13315#discussion_r1120878251


##########
build.gradle:
##########
@@ -159,16 +159,9 @@ def determineCommitId() {
   def takeFromHash = 16
   if (project.hasProperty('commitId')) {
     commitId.take(takeFromHash)
-  } else if (file("$rootDir/.git/HEAD").exists()) {
-    def headRef = file("$rootDir/.git/HEAD").text
-    if (headRef.contains('ref: ')) {
-      headRef = headRef.replaceAll('ref: ', '').trim()
-      if (file("$rootDir/.git/$headRef").exists()) {
-        file("$rootDir/.git/$headRef").text.trim().take(takeFromHash)
-      }
-    } else {
-      headRef.trim().take(takeFromHash)
-    }
+  } else if (file("$rootDir/.git").exists()) {
+    def repo = Grgit.open(currentDir: project.getRootDir())

Review Comment:
   The `rat` configuration does something similar, maybe we should have a variable for the git repo that can be used by both tasks.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [kafka] gharris1727 commented on pull request #13315: KAFKA-14767: Fix missing commitId build error after git gc

Posted by "gharris1727 (via GitHub)" <gi...@apache.org>.
gharris1727 commented on PR #13315:
URL: https://github.com/apache/kafka/pull/13315#issuecomment-1450445379

   It appears that the mustRunAfter directive has fixed the build, and now it's just normal flakey tests. I won't be reverting the fixups and should be ready for review.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] KAFKA-14767: Fix missing commitId build error after git gc [kafka]

Posted by "ijuma (via GitHub)" <gi...@apache.org>.
ijuma commented on PR #13315:
URL: https://github.com/apache/kafka/pull/13315#issuecomment-1774160590

   Build looks good, merging.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [kafka] gharris1727 commented on pull request #13315: KAFKA-14767: Fix missing commitId build error after git gc

Posted by "gharris1727 (via GitHub)" <gi...@apache.org>.
gharris1727 commented on PR #13315:
URL: https://github.com/apache/kafka/pull/13315#issuecomment-1604661850

   The rat problem was fixed in #13854 so i'm removing my fix for it in this PR.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] KAFKA-14767: Fix missing commitId build error after git gc [kafka]

Posted by "ijuma (via GitHub)" <gi...@apache.org>.
ijuma commented on PR #13315:
URL: https://github.com/apache/kafka/pull/13315#issuecomment-1761974609

   Well, Jenkins failed - we need to firs that first.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [kafka] gharris1727 commented on pull request #13315: KAFKA-14767: Fix missing commitId build error after git gc

Posted by "gharris1727 (via GitHub)" <gi...@apache.org>.
gharris1727 commented on PR #13315:
URL: https://github.com/apache/kafka/pull/13315#issuecomment-1588041698

   @ijuma I'd still like to get this merged, please take another review pass, thanks!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] KAFKA-14767: Fix missing commitId build error after git gc [kafka]

Posted by "gharris1727 (via GitHub)" <gi...@apache.org>.
gharris1727 commented on PR #13315:
URL: https://github.com/apache/kafka/pull/13315#issuecomment-1761944410

   Hey @ijuma @divijvaidya @C0urante or @yashmayya Could you review this build improvement?
   
   I'm still getting this `git gc` failure regularly when I try to build branches that have been idle for some time.
   This also includes an improvement (the `isDirectory` guard) which allows us to use `git worktree` to check out and build multiple branches at one time.
   
   I'd like to backport this to 3.4, 3.5, and 3.6.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [kafka] ijuma commented on pull request #13315: KAFKA-14767: Fix missing commitId build error after git gc

Posted by "ijuma (via GitHub)" <gi...@apache.org>.
ijuma commented on PR #13315:
URL: https://github.com/apache/kafka/pull/13315#issuecomment-1449090030

   Looks like the build failed.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [kafka] gharris1727 commented on pull request #13315: KAFKA-14767: Fix missing commitId build error after git gc

Posted by "gharris1727 (via GitHub)" <gi...@apache.org>.
gharris1727 commented on PR #13315:
URL: https://github.com/apache/kafka/pull/13315#issuecomment-1449121574

   @ijuma I don't know how my change would impact the execution order of rat vs processTestMessages, do you have any intuition?
   
   The commitId change that I originally proposed (without the deduplication of the Grgit call) didn't experience this failure; do you think we could merge the commitId improvement and follow up on the rat implicit dependencies in another PR if the latest commit doesn't fix the build?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [kafka] github-actions[bot] commented on pull request #13315: KAFKA-14767: Fix missing commitId build error after git gc

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #13315:
URL: https://github.com/apache/kafka/pull/13315#issuecomment-1730754906

   This PR is being marked as stale since it has not had any activity in 90 days. If you would like to keep this PR alive, please ask a committer for review. If the PR has  merge conflicts, please update it with the latest from trunk (or appropriate release branch) <p> If this PR is no longer valid or desired, please feel free to close it. If no activity occurs in the next 30 days, it will be automatically closed.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org