infinyon / fluvio

Lean and mean distributed stream processing system written in rust and web assembly.
https://www.fluvio.io/
Apache License 2.0
2.77k stars 199 forks source link

first stab at overwriting #4050

Open avikam opened 1 month ago

avikam commented 1 month ago

Here is an example of a manufactured config file with older version is properly replaced after an upgrade command. Notice that I used replicas 3 on purpose to demonstrate how old values are not overwritten

$> fluvio cluster start --spu 3                                                                                                                                                                                                                                                                                                                                  

📝 Running pre-flight checks
    ✅ Local Fluvio is not installed
    ✅ Previous local fluvio installation not found
🎉 All checks passed!
✅ Local Cluster initialized
👤 Profile set
✅ SC Launched
🤖 Starting SPU: (3/3) \
✅ 3 SPU launched
🎯 Successfully installed Local Fluvio cluster

$> head -n 1 ~/.fluvio/local-config                                                                                                                                                                                                                                                                                                                              
platform_version = "0.11.9-dev"

$> sed -i.bak 's/platform_version = "\([^"]*\)"/platform_version = "0.0.0"/g' ~/.fluvio/local-config                                                                                                                                                                                                                                                             $> head -n 1 ~/.fluvio/local-config                                                                                                                                                                                                                                                                                                                              platform_version = "0.0.0"

$> fluvio cluster upgrade                                                                                                                                                                                                                                                                                                                                        Removed spu monitoring socket: /tmp/fluvio-spu.sock
Uninstalled fluvio local components
📝 Running pre-flight checks
    ✅ Local Fluvio is not installed
🎉 All checks passed!
✅ Local Cluster initialized
👤 Profile set
✅ SC Launched
🤖 Starting SPU: (3/3) \
✅ 3 SPU launched
🎯 Successfully installed Local Fluvio cluster
$> head -n 1 ~/.fluvio/local-config                                                                                                                                                                                                                                                                                                                              
platform_version = "0.11.9-dev"
digikata commented 1 day ago

Some discussion added re this issue and pr in https://github.com/infinyon/fluvio/issues/962