-
Notifications
You must be signed in to change notification settings - Fork 8.9k
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
[Release-2.2 BP FAB-2643] #3534
[Release-2.2 BP FAB-2643] #3534
Conversation
…builders via env var. Added example on how to override the list of system chaincodes using env var due to bugs in viper. Signed-off-by: Vladyslav Kopaihorodskyi <vlad.kopaygorodsky@gmail.com>
d3e8823
to
379c4ea
Compare
code looks fine, but seems like the test failed:
|
…ers", VARIABLE) instead of stringified data Signed-off-by: Vladyslav Kopaihorodskyi <vlad.kopaygorodsky@gmail.com>
f715daf
to
b80b615
Compare
I just realized that the master branch has also a potential issue with Line 292 in b80b615
|
b80b615
to
991e536
Compare
… cases when value is a string(from env var) or a map(generic structure after unmarshal) Signed-off-by: Vladyslav Kopaihorodskyi <vlad.kopaygorodsky@gmail.com>
991e536
to
6bdd997
Compare
This is a backport of pull request #2643
Because we can't upgrade viper to
v1.1.1
in which the bug of shadowing a key is fixed and hooks are introduced, I had to find a workaround to simplify the backport as more as possible.Also, I added a test and a short explanation for overriding the list of system chaincodes. The default approach with env var
CORE_CHAINCODE_SYSTEM_XXX: enabled
won't work due to a bug in viper in earlier versions. I agree that bumping it to v1.1.1 requires too many changes and might break the LTS release.updated a few related tests to use strings as viper config values instead of variables.