dejan2609 commented on PR #23905: URL: https://github.com/apache/kafka/pull/23905#issuecomment-6710227481
### Testing notes Tests were run in a session with Claude, on throwaway clones, using Linux, Gradle 9.8.2, git 2.43.0 and JDK 25 (plus JDK 17 where noted). The baseline is trunk `ef6a6c1edb` with JGit, plus a temporary `doLast` block in the `rat` task that prints its `includes` and `excludes`. The final code is the tree of fd4fad7009 (this commit is empty and basically serves as a placeholder for the final commit message). #### RAT Untracked entries depend on the tree state when Gradle configures the build, so each comparison needs the same tree state. For example, run the first commit twice and compare its second run. | Untracked content | JGit | This PR | |---|---|---| | None, or names with non-ASCII characters, `"` or spaces | pass | pass, same report | | Empty directory, untracked directory, file in a tracked directory, ignored files | pass | pass, same report | | Nested git repository (no commits) | fail, scans its files | pass, directory excluded | | Name with a backslash | fail, `Cannot read header` | fail, `Cannot read header` | "Same report" means identical apart from the timestamp. On a tree with the non-ASCII and `"` names, the excludes were also identical and in the same order. #### Commit id and RAT by `.git` state Checked with `clients:createVersionFile rat`: | State | JGit | This PR | |---|---|---| | Normal clone | real id, RAT active | same | | `-PcommitId=...` | given value, RAT active | same | | No `.git`, also inside a parent repository | `unknown`, RAT skipped | same | | Git worktree | `unknown`, RAT skipped | real id, RAT active | | `GIT_DIR` set to another repository | real id, RAT active | same | | Dubious ownership (simulated with `GIT_TEST_ASSUME_DIFFERENT_OWNER`) | real id, RAT active | same | | git not installed | real id, RAT active | `unknown`, RAT skipped, warning | | Dangling `.git` file | `unknown`, RAT skipped | `unknown`, RAT skipped, warning | | Empty `.git` directory | build fails | `unknown`, RAT skipped, warning | | `git init` without commits | build fails | `unknown`, RAT skipped, warning | | Empty `.git` directory inside a parent repository | not tested | `unknown`, RAT skipped, warning | #### Distribution Compared a clean `releaseTarGz` from the baseline and the final code: - Both have the same 225 files. - Jar entries differ only in `commitId`, in the 9 jars with a version file. Jar entry timestamps also differ. - The 196 site-docs files have identical contents. - `kafka-transactions.sh --version` prints the expected commit id. #### Configuration cache Checked with `--configuration-cache rat` only. This PR does not enable the cache, and the build still fails with it enabled on other task graphs. | Change between runs | Cache entry | |---|---| | None, an unrelated environment variable, `GIT_DIR`, a new ref, `git gc` | reused | | New commit, added or removed untracked file | invalidated | | git not installed | build fails with a configuration cache problem, even with the fallback | #### Known gaps - With `LC_ALL=C`, a non-ASCII untracked name passes on JDK 17 but fails on JDK 25 with `FileNotFoundException`, while JGit passes on both. This ran on the `-z` change, before the `--git-dir` and fallback code, and was not rerun. - Without the temporary `doLast` block, only `clients:createVersionFile rat` was rerun, and it passed. - `GIT_INDEX_FILE` is still respected by git. -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
