anyproto / any-sync-dockercompose

docker-compose for testing any-sync
MIT License
238 stars 30 forks source link

Updating using Make update rewrites configuration file #18

Closed dantnad closed 4 months ago

dantnad commented 5 months ago

Have you read a contributing guide?

Current Behavior

When you run make update to update the docker images, after the update runs the client.yml gets rewritten and is no longer compatible with the client apps. If you're logged Anytype is stuck in "preparing"

image

If you try logging out and using the seed phrase to log back in using the newly generated client.yml file it fails saying that the network id does not match.

Expected Behavior

make update should update the docker images but allow the existing client.yml configuration to continue working without changing the network configuration.

Steps To Reproduce

  1. Run make update while logged in and with an existing database
  2. The clients will stop syncing once the update is finished on the server
  3. Log out
  4. Log back in with the new client.yml using your existing seed phrase
  5. It will fail due to the network id not matching with the previous id before the update

Environment

Server:
- Ubuntu Server 22.04 LTS
- Docker version 25.0.2, build 29cf629 
- Docker Compose version v2.23.3

Clients:
macOS Sonoma 14.2 Beta w/AnyType Version: 0.37.3
iPadOS 17.2 Beta w/AnyType Version: 0.27.1
iOS 17.3 Beta w/AnyType Version 0.27.1

Anything else?

No response

fb929 commented 4 months ago

can't reproduce:

$ make; md5 etc/client.yml
...
MD5 (etc/client.yml) = 023d751574efae3b60d730203dee2d56

$ make update; md5 etc/client.yml
...
MD5 (etc/client.yml) = 023d751574efae3b60d730203dee2d56

@dantnad can you give more debug?

dantnad commented 4 months ago

I just tried again and this time it didn't happen, I went through my history to see the commands but probably the only thing I can think about is that I mistakenly did a make start before a make update(?) I guess, can't really remember but that's all I got 🤕 I'll leave the screenshot in case you might see something but yeah, I did the make update again and this time the file didn't get changed.

image

Feel free to close this issue if there's nothing, if I ever encounter this again I'll try posting more details. All I know is the first make update was the one that caused the issue, the second one was just me trying to fix it trying to revert the client configuration but in the end I opted to just delete it and re-install it from scratch.

fb929 commented 4 months ago

in history on your screenshot I see command "make cleanEtcStorage" it's command delete "storage" and generated config (dir "etc")

fb929 commented 4 months ago

also, I was able to reproduce:

make stop
docker container prune
make start