Skip to content

Add rsync-based "copy tree" strategy - #5111

Open
happz wants to merge 4 commits into
copy-tree-polishfrom
copy-tree-rsync-strategy
Open

Add rsync-based "copy tree" strategy#5111
happz wants to merge 4 commits into
copy-tree-polishfrom
copy-tree-rsync-strategy

Conversation

@happz

@happz happz commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

It is the preferred strategy, because, in the future, it will allow
excluding files and directories (think ".gitignore"). However, since
rsync requires a temporary directory to play correctly with runners
like Testing Farm, the strategy will do nothing when caller provides no
way to create such a temporary directory.

Pull Request Checklist

  • implement the feature
  • write the documentation
  • extend the test coverage

@happz happz added the ci | full test Pull request is ready for the full test execution label Aug 7, 2026
Comment thread tmt/utils/filesystem.py
@happz
happz force-pushed the copy-tree-rsync-strategy branch from 0071b41 to 186f0e3 Compare August 10, 2026 10:26
@thrix thrix added this to planning Aug 12, 2026
@thrix thrix moved this to implement in planning Aug 12, 2026
@happz
happz force-pushed the copy-tree-rsync-strategy branch 2 times, most recently from 8779f08 to ad5d751 Compare August 16, 2026 20:44
@happz happz moved this from implement to review in planning Aug 18, 2026
@happz
happz force-pushed the copy-tree-rsync-strategy branch from ad5d751 to c306bdb Compare August 19, 2026 18:16
@happz
happz force-pushed the copy-tree-rsync-strategy branch from c306bdb to a8a0d31 Compare August 20, 2026 13:25
@happz happz added status | blocked The merging of PR is blocked on some other issue status | blocking other work An important pull request, blocking other pull requests or issues labels Aug 20, 2026
@happz

happz commented Aug 20, 2026

Copy link
Copy Markdown
Contributor Author

/packit build

@LecrisUT LecrisUT left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Just cosmetic nitpicks

Comment thread tmt/utils/filesystem.py
will be created.
:param tmpdir_creator: a context manager that, when invoked, would
create and hold a temporary directory. Some strategies may
require such a directory for their work.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

"Some strategies may require" -> "Some strategies do not use one even if provided". I think that's the more crucial thing to note.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Hmm, I think it is more important this way: "if you don't provide tmpdir_creator callback, some strategies may not work" sounds stricter than "if you provide tmpdir_creator, some strategies may ignore it as they don't need it" to me.

Comment thread tmt/utils/filesystem.py
Comment on lines +115 to +118
logger.debug(
f"Copy tree '{src}' => '{dst}' using 'rsync -a' strategy"
" not possible without a temporary directory."
)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Would increase the debug level for this. It is deeper in our plumbing and frankly not every useful without a traceback to patch it.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Addressed in bb29577.

Comment thread tmt/utils/filesystem.py Outdated
Comment on lines +110 to +111
:returns: ``True`` if successful, ``False`` if ``rsync`` command
fails with :py:class:`RunError`.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Outdated return documentation

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Addressed in bb29577.

@happz
happz force-pushed the copy-tree-rsync-strategy branch from a8a0d31 to b7ba130 Compare August 26, 2026 21:36
happz added 3 commits August 26, 2026 23:42
It is the preferred strategy, because, in the future, it will allow
excluding files and directories (think ".gitignore"). However, since
`rsync` requires a temporary directory to play correctly with runners
like Testing Farm, the strategy will do nothing when caller provides no
way to create such a temporary directory.
@happz
happz force-pushed the copy-tree-rsync-strategy branch from b7ba130 to 8b26fda Compare August 26, 2026 21:43
@happz

happz commented Aug 27, 2026

Copy link
Copy Markdown
Contributor Author

/packit build

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci | full test Pull request is ready for the full test execution status | blocked The merging of PR is blocked on some other issue status | blocking other work An important pull request, blocking other pull requests or issues

Projects

Status: review

Development

Successfully merging this pull request may close these issues.

3 participants