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

Update config don't check LISK_NETWORK env variable #2437

Closed
ManuGowda opened this issue Oct 4, 2018 · 1 comment
Closed

Update config don't check LISK_NETWORK env variable #2437

ManuGowda opened this issue Oct 4, 2018 · 1 comment
Assignees
Milestone

Comments

@ManuGowda
Copy link
Contributor

Expected behavior

update_config.js should migrate the exisisting config according to environment properly.

Actual behavior

update_config.js fails to migrate the config while upgrading from 1.0.x to 1.1.x as the logic only check for default config rather than environment specific
https://github.com/LiskHQ/lisk/blob/4ae8553042b93d3e7ce41c11a7d910fef24ba644/scripts/update_config.js#L66

When a unified config is generated by merging new config with default config for a testnet enviornament, insted of loading testnet config, it takes default config resulting in invalid config data.
https://github.com/LiskHQ/lisk/blob/4ae8553042b93d3e7ce41c11a7d910fef24ba644/scripts/update_config.js#L62-L68

Steps to reproduce

Which version(s) does this affect? (Environment, OS, etc...)

1.1.0

@MaciejBaj MaciejBaj added this to the Version 1.1.0 milestone Oct 5, 2018
@nazarhussain nazarhussain self-assigned this Oct 5, 2018
@nazarhussain
Copy link
Contributor

@ManuGowda Here is the log while I run the script.

➜  lisk git:(1.1.0) ✗ node scripts/update_config.js ../lisk-1.0.0/config.json config/testnet/config.json
Running config migration from 1.0.x to 1.1.x
Starting configuration migration...

Changes summary: 
Skipped: wsPort = 8001 -> 7001
Skipped: httpPort = 8000 -> 7000
Deleted: version = "1.0.3"
Deleted: minVersion = ">=1.0.0"
Skipped: db.database = lisk_main -> lisk_test
Skipped: db.user =  -> lisk
Skipped: peers.list = Addition -> [object Object]
Skipped: peers.list = Addition -> [object Object]
Skipped: peers.list = Addition -> [object Object]
Skipped: peers.list = Addition -> [object Object]
Skipped: peers.list = Addition -> [object Object]
Skipped: peers.list.4.ip = 209.50.49.23 -> 94.237.30.23
Skipped: peers.list.4.wsPort = 8001 -> 7001
Skipped: peers.list.3.ip = 94.237.24.199 -> 94.237.64.33
Skipped: peers.list.3.wsPort = 8001 -> 7001
Skipped: peers.list.2.ip = 94.237.28.66 -> 209.50.48.177
Skipped: peers.list.2.wsPort = 8001 -> 7001
Skipped: peers.list.1.ip = 83.136.249.76 -> 83.136.254.104
Skipped: peers.list.1.wsPort = 8001 -> 7001
Skipped: peers.list.0.ip = 83.136.254.92 -> 94.237.29.221
Skipped: peers.list.0.wsPort = 8001 -> 7001
  Added: peers.options.wsEngine = "sc-uws"
Deleted: nethash = "ed14889723f24ecc54871d058d98ce91ff2f973192075c0155ba2b7b70ad2511"

Writing updated configuration to config/testnet/config.json

@nazarhussain nazarhussain changed the title Update config fails to migrate config Update config don't follow LISK_NETWORK env variable Oct 5, 2018
@nazarhussain nazarhussain changed the title Update config don't follow LISK_NETWORK env variable Update config don't check LISK_NETWORK env variable Oct 5, 2018
MaciejBaj added a commit that referenced this issue Oct 5, 2018
Update config don't check LISK_NETWORK env variable - Closes #2437
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants