Fix errors when switching branches in service repositories#63
Open
Exairnous wants to merge 1 commit intoHubs-Foundation:mainfrom
Open
Fix errors when switching branches in service repositories#63Exairnous wants to merge 1 commit intoHubs-Foundation:mainfrom
Exairnous wants to merge 1 commit intoHubs-Foundation:mainfrom
Conversation
What: Changes docker-compose.yml to make Mutagen use `one-way-replica` as the sync mode. Why: For some reason, using `two-way-resolved` would sometimes not accept the changes from the branch switch and actually push some of the old code from the previous branch in the Docker container back to your filesystem, this would result in both the Docker container and your file system being in a halfway state between branches and cause errors with the affected service. Changing to `one-way-replica` forces the Docker container to always mirror your file system and prevents this problem. Note: This was mainly noticed when switching between the master branch and the addons branch in the `hubs` repository (the branches have different dependencies, which could possibly be a contributing factor).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What?
Changes docker-compose.yml to make Mutagen use
one-way-replicaas the sync mode.Why?
For some reason, using
two-way-resolvedwould sometimes not accept the changes from a branch switch in a service repository and actually push some of the old code from the previous branch in the Docker container back to your filesystem, this would result in both the Docker container and your file system being in a halfway state between branches and cause errors with the affected service. Changing toone-way-replicaforces the Docker container to always mirror your file system and prevents this problem.Examples
No visual change.
How to test
Note: the main thing to test is switching back and forth between the different branches in the
hubsrepository and seeing if you encounter any errors when trying to use Hubs. I initially worked on this fix many months ago and so I may have missed a step for testing (the testing steps I've listed below would take at least a few hours for me to complete - because of download time - so I have written them from memory).bin/up).bin/down.hubsrepository in theservicesfolder to theaddonsbranch.bin/init.bin/up.bin/down.hubsrepository in theservicesfolder back to themasterbranch.bin/init.bin/up.Documentation of functionality
The previous behaviour wasn't documented and this change aligns the actual functionality with what is expected, so no documentation update is needed.
Limitations
None known.
Alternatives considered
None.
Open questions
one-way-replicawasn't used in the first place? E.g. could this cause issues with dependencies that are installed in Docker, but not on your hard drive (it didn't seem to, but I didn't do much testing)?Additional details or related context
The issue this pull request solves was mainly noticed when switching between the master branch and the addons branch in the
hubsrepository (the branches have different dependencies, which could possibly be a contributing factor).https://mutagen.io/documentation/synchronization/
Issue #56 may or may not be fixed by this.
The Node version update for the hubs Dockerfile from PR #62 is probably needed in order to test this.