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

Detect new Virtualization framework under macOS #801

Merged
merged 2 commits into from
May 6, 2022

Conversation

chloerei
Copy link
Contributor

@chloerei chloerei commented May 6, 2022

Context: #799

Check com.docker.virtualization process name in .docker_for_mac? for new Virtualization framework. Which effect default sync strategy in mac. Without this patch, docker-sync will use unison instead of native_osx.

I use in my project, looks work:

$ docker-sync start
          ok  Starting native_osx for sync geeknote-sync
geeknote-sync
unison: stopped
unison: started
     success  Sync container started
     success  Starting Docker-Sync in the background

Edit some file:

$ docker logs -f geeknote-sync
Looking for changes
Reconciling changes
changed  ---->            app/views/posts/index.html.erb  
Propagating updates
UNISON 2.51.3 (OCAML 4.12.0) started propagating changes at 15:40:16.22 on 06 May 2022
[BGN] Updating file app/views/posts/index.html.erb from /host_sync to /app_sync
[END] Updating file app/views/posts/index.html.erb
UNISON 2.51.3 (OCAML 4.12.0) finished propagating changes at 15:40:16.26 on 06 May 2022
Saving synchronizer state
Synchronization complete at 15:40:16  (1 item transferred, 0 skipped, 0 failed)
Looking for changes
Reconciling changes
Nothing to do: replicas have not changed since last sync.

But I'm not very clear about the internals of docker-sync, maybe need more test that native_osx strategy works fine on new Virtualization framework.

@EugenMayer
Copy link
Owner

Thank you for your contribution!

But I'm not very clear about the internals of docker-sync, maybe need more test that native_osx strategy works fine on new Virtualization framework.

Are you using the new virtualization framework on your device and did the detection work for you? If yes, that's great.

Can you easily switch to the old variant and test, if that is still detected

@chloerei
Copy link
Contributor Author

chloerei commented May 6, 2022

Can you easily switch to the old variant and test, if that is still detected

Yes it still work.

Copy link
Owner

@EugenMayer EugenMayer left a comment

Choose a reason for hiding this comment

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

Thank you! Looks great.

@EugenMayer EugenMayer changed the title Detect new Virtualization framework in .docker_for_mac? Detect new Virtualization framework under macOS May 6, 2022
@EugenMayer EugenMayer merged commit 84fe0b8 into EugenMayer:master May 6, 2022
@chloerei chloerei deleted the fix-docker-for-mac branch May 7, 2022 07:40
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