Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mutagen rework to use volume label and session label #4109

Merged
merged 35 commits into from
Aug 28, 2022

Conversation

rfay
Copy link
Member

@rfay rfay commented Aug 11, 2022

The Problem/Issue/Bug:

@xenoscopic, maintainer of mutagen, suggests that we can have a more successful mutagen lifecycle by using the container name for beta identifier instead of using the container id. This is a first test of that. I originally did it that way, but switched to ID for some reason.

When the container name is used, we can pause the mutagen session instead of terminating it, and it will do better with a number of things. That's not here yet, but if things work out in automated tests it has potential.

How this PR Solves The Problem:

  • Use new json output of mutagen commands, especially mutagen sync list
  • Use labels on sync sessions and docker volumes and verify that they match
  • Use pause and resume instead of creating sync sessions from scratch
  • Use a private MUTAGEN_DATA_DIRECTORY so that we need not fear co-existing with another mutagen daemon

TODO

  • Use a more specific mutagen sync list filter so we don't have to get all sessions
  • Should ddev poweroff stop all mutagen sessions? Probably.
  • On upgrade, clear terminate all sync sessions.
  • Update docs, especially debugging and using mutagen directly, and explain MUTAGEN_DATA_DIRECTORY
  • Improve the name of the dockerhost ID to be more readable. Dashes? Or use it explicitly?
  • ddev poweroff means that mutagen will have to be re-synced because mutagen session is killed off. ddev stop doesn't do that.
  • ddev clean should clear MUTAGEN_DATA_DIRECTORY.

Manual Testing Instructions:

  • Try to confuse system by
    • Moving context from default to colima
    • Reverse that
  • Remove a file from .ddev/docker-compose.*.yaml, then ddev restart. Does it reappear?

Automated Testing Overview:

Related Issue Link(s):

Release/Deployment notes:

  • Mutagen no longer conflicts with other mutagen instances that may be running on the machine. It maintains its own MUTAGEN_DATA_DIRECTORY=~/.ddev_mutagen_data_directory

@github-actions
Copy link

github-actions bot commented Aug 11, 2022

@rfay rfay force-pushed the 20220811_mutagen_container_name branch from 974e7d5 to 3f20619 Compare August 15, 2022 00:13
@rfay rfay changed the title Experiment with using container name instead of id for mutagen beta identifier Mutagen rework to use volume label an session label Aug 15, 2022
@rfay rfay changed the title Mutagen rework to use volume label an session label Mutagen rework to use volume label and session label Aug 15, 2022
@rfay rfay force-pushed the 20220811_mutagen_container_name branch 4 times, most recently from c3bd56e to 085ba0f Compare August 22, 2022 22:28
@rfay rfay force-pushed the 20220811_mutagen_container_name branch 5 times, most recently from 766ca50 to afc0e7c Compare August 25, 2022 20:38
@rfay rfay force-pushed the 20220811_mutagen_container_name branch from 769f8a1 to 8926c93 Compare August 27, 2022 01:11
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.

None yet

1 participant