Skip to content

Omit .git directory in guest.pull() during prepare.distgit#4898

Open
lukaszachy wants to merge 1 commit into
mainfrom
4893-git-rsync
Open

Omit .git directory in guest.pull() during prepare.distgit#4898
lukaszachy wants to merge 1 commit into
mainfrom
4893-git-rsync

Conversation

@lukaszachy
Copy link
Copy Markdown
Contributor

@lukaszachy lukaszachy commented May 18, 2026

Found by 'pcs': rpmbuild uses git to apply patches, and newer git run maintenance automatically. tmt was running into race condition where some git objects were deleted after rsync from guest.pull was already aware of them, which lead to broken prepare with
sync warning: some files vanished before they could be transferred (code 24)

We don't need the .git directory anyway so we will save few bits in the
download as well.

Fixes: #4893

Pull Request Checklist

  • implement the feature

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request modifies tmt/steps/prepare/distgit.py to exclude the .git directory during source retrieval to avoid rsync errors. Feedback suggests appending to the exclude list rather than overwriting it to preserve default patterns.

Comment thread tmt/steps/prepare/distgit.py Outdated
@thrix thrix added the ci | full test Pull request is ready for the full test execution label May 18, 2026
@thrix
Copy link
Copy Markdown
Contributor

thrix commented May 18, 2026

Seems some copr outage

@thrix
Copy link
Copy Markdown
Contributor

thrix commented May 18, 2026

/packit build

@teemtee teemtee deleted a comment from packit-as-a-service Bot May 18, 2026
@happz
Copy link
Copy Markdown
Contributor

happz commented May 18, 2026

Seems some copr outage

Don't forget to mention it on our "Annoying issues" canvas, please.

Found by 'pcs': rpmbuild uses git to apply patches, and newer git run
maintenance automatically. tmt was running into race condition where
some git objects were deleted after rsync from `guest.pull` was already
aware of them, which lead to broken prepare with
```sync warning: some files vanished before they could be transferred (code 24)```

We don't need the .git directory anyway so we will save few bits in the
download as well.

Fixes: #4893
@LecrisUT
Copy link
Copy Markdown
Member

I am not sure about this one. The original issue is more of a misunderstanding of the scope of %autosteup -S git. We have other git-like files that are synced like the test tree, and if we are going to do such a change, I would prefer this to be consistent. I don't think we want to remove the git from the test tree because the test might be using it, but by the same logic, if a project really needed the git repo in the %prep how do we know it is not needed for the tests also.

@psss psss changed the title Omit .git directory in pull from prepare.distgit Omit .git directory in guest.pull() during prepare.distgit May 19, 2026
@happz happz added this to planning May 20, 2026
@github-project-automation github-project-automation Bot moved this to backlog in planning May 20, 2026
@happz happz moved this from backlog to implement in planning May 20, 2026
@happz happz added status | discuss Needs more discussion before closing area | dist-git Implementation related to integration with the dist-git repositories. labels May 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area | dist-git Implementation related to integration with the dist-git repositories. ci | full test Pull request is ready for the full test execution status | discuss Needs more discussion before closing

Projects

Status: implement

Development

Successfully merging this pull request may close these issues.

tmt fails in prepare step on rsync warning: some files vanished...

4 participants