dsmiley commented on PR #5252:
URL: https://github.com/apache/solr/pull/5252#issuecomment-6479198495
there is one quirkiness related to git-status that this script works around
by CD'ing to another dir...
I'm sharing that below and a possible solution by modifying
git-status.gradle. It's not a current problem with this script because of the
script puts the temp dir somewhere else. Nonetheless it's worth considering
doing in addition or instead. Sharing Claude's description:
🤖
**The problem:** `checkWorkingCopyClean` uses JGit's
`findGitDir(rootProject.projectDir)`, which walks up the parent directories. If
you unpack a source release (which has no `.git`) inside another git checkout,
it finds the parent repo and compares against it. In Jenkins build #1 the temp
dir was inside the workspace clone. The check then failed with "Working copy is
not a clean git checkout … .asf.yaml (missing)", because the unpacked tree
didn't match the parent repo.
**What I worked around:** `releaseDryRun.sh` puts the temp dir outside the
workspace (`${WORKSPACE}_smoke`). That avoids the problem without touching
Gradle. Build #4 shows it working: the check now prints only a warning,
`Directory is not a valid git checkout (won't check dirty files)`.
**The optional change:** make `git-status.gradle` ignore a repo whose work
tree isn't `rootProject.projectDir`. Then the check would behave the same
wherever an unpacked source release sits. It would help anyone unpacking a
release under a checkout, such as a developer testing locally. I haven't looked
closely at how large or safe the change is. It's unneeded for the CI job now,
so I'd drop it unless that local case matters to you.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]