neo-project / neo-node

MIT License
229 stars 224 forks source link

upgrade neo-cli and all the local plugins to the latest version #828

Closed Jim8y closed 2 years ago

Jim8y commented 3 years ago

This pr will automatically update both the neo-cli and all installed plugins to the most latest version.

Jim8y commented 3 years ago

image

superboyiii commented 3 years ago

I think it's a good idea but not feasiable since sometimes data need resync in new version such like v3.0.3

Jim8y commented 3 years ago

I think it's a good idea but not feasiable since sometimes data need resync in new version such like v3.0.3

why do you think the data would be an issue? i think data is data, software is software. node can still deal with the data manually after the update.

superboyiii commented 3 years ago

I think it's a good idea but not feasiable since sometimes data need resync in new version such like v3.0.3

why do you think the data would be an issue? i think data is data, software is software. node can still deal with the data manually after the update.

Too many settings in config.json which might not be the same as default such like magic, wallet path, will cause mismatch after this update. I mean if resync needed and more reset settings needed, then this update will not be useful because you still need to check every changes for settings.

Jim8y commented 3 years ago

Too many settings in config.json which might not be the same as default such like magic, wallet path, will cause mismatch after this update. I mean if resync needed and more reset settings needed, then this update will not be useful because you still need to check every changes for settings.

Then just config the setting manually after the upgrade. U gonna do this no matter what right?

This pr only saves the time to download the software and plugins.

If u have to reconfigure it, just do it anyway.

By the way, this pr does not overwrite the existing config.json.

superboyiii commented 3 years ago

By the way, this pr does not overwrite the existing config.json.

Oh, I see it. Then it's much better.

cloud8little commented 3 years ago

why the plugin is still in version 3.0.1?

a32068d04ad430061032b1b88c25de2

b7cf20765e484d7fd6f62545f5db15a

Jim8y commented 3 years ago

image Fixed now, it is because I forgot to copy the .dll file as it is outside of the PluginName folder

cloud8little commented 3 years ago

Let me have a try

cloud8little commented 3 years ago

The plugin program file xx.dll will be replaced now. But before upgrade, I have oracleservice.dll in the Plugins file, while without OracleService folder(which contain config.json), and after upgrade, other dependencies such as grpc filestorage.dll is added, and OracleService folder new generated, but the folder is still empty without config.json.

c9550887ebb85d81495a4c9a42f461f

Jim8y commented 3 years ago

This upgrader does not touch the config file at all, cause user might have custom configurations. If you have a missing file in the plug-in, you can use the reinstall command here https://github.com/neo-project/neo-node/pull/807

Jim8y commented 3 years ago

@cloud8little fixed now. If a config file missing, then the upgrader will add the config.json too.

cloud8little commented 3 years ago

g.json too.

I think if there is no config.json, then you can unzip it from the upgrade file, if config.json already exist, no need to override it.

Jim8y commented 3 years ago

I think if there is no config.json, then you can unzip it from the upgrade file, if config.json already exist, no need to override it.

that is exactly the current logic.

cloud8little commented 3 years ago

I think if there is no config.json, then you can unzip it from the upgrade file, if config.json already exist, no need to override it.

that is exactly the current logic.

Tested, it works now. But build with linux seems does not work, I need to figure out why.

cloud8little commented 3 years ago

win/linux, why the upgrader program must need a runtime folder to work?

fcb37e7e632cbf1b9ea2290295df9bf

Jim8y commented 3 years ago

win/linux, why the upgrader program must need a runtime folder to work?

It rely on Neo, I guess it is a dependency of Neo

cloud8little commented 3 years ago

win/linux, why the upgrader program must need a runtime folder to work?

It rely on Neo, I guess it is a dependency of Neo

yeah, it does work.

superboyiii commented 2 years ago

@shargon @erikzhang Merge?

erikzhang commented 2 years ago

Tested?

superboyiii commented 2 years ago

Tested?

Yes

Jim8y commented 2 years ago

@shargon please review

coveralls commented 2 years ago

Pull Request Test Coverage Report for Build 2194558670


Totals Coverage Status
Change from base Build 2186768199: 0.0%
Covered Lines: 107
Relevant Lines: 683

💛 - Coveralls
Jim8y commented 2 years ago
image
erikzhang commented 2 years ago

I think the upgrade will be a little difficult. For example, automatic updating of configuration files (while keeping the original settings). Consider whether to resync blocks.

Jim8y commented 2 years ago

I think the upgrade will be a little difficult. For example, automatic updating of configuration files (while keeping the original settings). Consider whether to resync blocks.

This just makes the process of downloading new version from github then unzip it and copy it to target folder into a single command.....as to config and resync, user can take care them manually (they are doing these manually now, nothing has changed).

erikzhang commented 2 years ago

Then I don't think this upgrader is useful. Because if an upgrader is used, the user will have a false sense of "it'll do everything for me", which often leads to problems.