Skip to content

Conversation

Copy link

Copilot AI commented Nov 5, 2025

Changes the sync behavior: rsync is now default for one-time syncs, mutagen available via --mutagen for continuous bi-directional sync. Adds --terminate-all to cleanup mutagen sessions. Ensures mutagen sessions terminate when dts devel run stops.

Changes

  • New utils/rsync_sync.py: Rsync-over-SSH implementation with ignore patterns and proper error handling

  • dts devel sync behavior:

    • Default: one-time rsync sync
    • --mutagen: continuous mutagen sync with session management
    • --terminate-all: terminates all mutagen sessions (mutagen sync terminate -a)
    • Mutagen-only flags (--monitor, --flush-direction) warn if used without --mutagen
  • dts devel run integration:

    • Added --mutagen flag, propagates to sync command
    • Cleanup logic terminates mutagen sessions on container exit (except detached mode)
    • Only tracks sessions when --mutagen used
  • SSH key isolation: Existing IdentitiesOnly yes config prevents key conflicts for both rsync and mutagen

Usage

# Default: rsync one-time sync
dts devel sync -H myrobot.local
dts devel run -H myrobot.local -s

# Continuous mutagen sync
dts devel sync -H myrobot.local --mutagen
dts devel run -H myrobot.local -s --mutagen

# Cleanup mutagen sessions
dts devel sync --terminate-all

Trade-offs

Rsync (default) Mutagen (--mutagen)
Sync type One-time Continuous
Direction One-way Bi-directional
Setup None Daemon required
Speed Fast Moderate setup, then realtime
Original prompt

Add a --mutagen flag to the dts devel sync command

Fix ssh keys conflict (explicitly use the installed duckiebot-specific ssh keys) when using mutagen and docker in dts devel sync and dts devel run commands. If necessary you can specify this in the ssh config file we install.

Make sure to close the mutagen sessions when the dts devel run command is stopped.

Add a --terminate-all flag to the sync command to force-terminate all mutagen sync sessions (mutagen sync terminate -a)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI self-assigned this Nov 5, 2025
@Tuxliri
Copy link
Contributor

Tuxliri commented Nov 5, 2025

@copilot I actually want you to use the rsync synchronization method that is used on the ente branch of this repository as the default synchronization method. Only use mutagen if the --mutagen flag is passed to dts devel sync or dts devel run

Copilot AI changed the title [WIP] Add --mutagen flag and terminate-all option to dts devel sync command Use rsync as default sync, mutagen optional via --mutagen flag Nov 5, 2025
Copilot AI requested a review from Tuxliri November 5, 2025 06:19
Copilot finished work on behalf of Tuxliri November 5, 2025 06:19
Copy link
Author

Copilot AI commented Nov 5, 2025

@copilot I actually want you to use the rsync synchronization method that is used on the ente branch of this repository as the default synchronization method. Only use mutagen if the --mutagen...

I've checked the ente branch and it only contains the mutagen-based sync implementation (same as the base commit 5904383). I don't see any rsync implementation there. Could you clarify:

  1. Is there a different branch with the rsync implementation you want me to use?
  2. Or should I use the rsync implementation I created in utils/rsync_sync.py but make sure it's the default?

Currently my implementation already makes rsync the default (without --mutagen flag) and mutagen optional (with --mutagen flag). Please let me know what specifically needs to be changed.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants