-
Notifications
You must be signed in to change notification settings - Fork 286
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
fix(plugin-consortium-manual): drop repo constructor arg #1199
Comments
petermetz
added a commit
to petermetz/cacti
that referenced
this issue
Aug 10, 2021
…cacti#1199 Removes the non-serializable consortiumRepo argument from the constructor of the consortium plugin manual class's options. Refactors the constructor and the internals of the plugin to initialize the consortium repo from the consortium database at runtime instead of expecting it passed in via the constructor. Refactors the internal code previously using the options.consoritumRepo object to use this.repo instead which is what gets initalized in the constructor as explained above. All this leads to equivalent functionality but less boilerplate and now thanks to this the plugin can be (should be - more tests needed) initialized by the API server purely based on the static configuration file when necessary. Fixes hyperledger-cacti#1199 Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
petermetz
added a commit
to petermetz/cacti
that referenced
this issue
Aug 10, 2021
…cacti#1199 Removes the non-serializable consortiumRepo argument from the constructor of the consortium plugin manual class's options. Refactors the constructor and the internals of the plugin to initialize the consortium repo from the consortium database at runtime instead of expecting it passed in via the constructor. Refactors the internal code previously using the options.consoritumRepo object to use this.repo instead which is what gets initalized in the constructor as explained above. All this leads to equivalent functionality but less boilerplate and now thanks to this the plugin can be (should be - more tests needed) initialized by the API server purely based on the static configuration file when necessary. Fixes hyperledger-cacti#1199 Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
petermetz
added a commit
to petermetz/cacti
that referenced
this issue
Aug 12, 2021
…cacti#1199 Removes the non-serializable consortiumRepo argument from the constructor of the consortium plugin manual class's options. Refactors the constructor and the internals of the plugin to initialize the consortium repo from the consortium database at runtime instead of expecting it passed in via the constructor. Refactors the internal code previously using the options.consoritumRepo object to use this.repo instead which is what gets initalized in the constructor as explained above. All this leads to equivalent functionality but less boilerplate and now thanks to this the plugin can be (should be - more tests needed) initialized by the API server purely based on the static configuration file when necessary. Fixes hyperledger-cacti#1199 Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
petermetz
added a commit
that referenced
this issue
Aug 13, 2021
Removes the non-serializable consortiumRepo argument from the constructor of the consortium plugin manual class's options. Refactors the constructor and the internals of the plugin to initialize the consortium repo from the consortium database at runtime instead of expecting it passed in via the constructor. Refactors the internal code previously using the options.consoritumRepo object to use this.repo instead which is what gets initalized in the constructor as explained above. All this leads to equivalent functionality but less boilerplate and now thanks to this the plugin can be (should be - more tests needed) initialized by the API server purely based on the static configuration file when necessary. Fixes #1199 Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
hanxu12
pushed a commit
to hanxu12/cactus
that referenced
this issue
Aug 14, 2021
…cacti#1199 Removes the non-serializable consortiumRepo argument from the constructor of the consortium plugin manual class's options. Refactors the constructor and the internals of the plugin to initialize the consortium repo from the consortium database at runtime instead of expecting it passed in via the constructor. Refactors the internal code previously using the options.consoritumRepo object to use this.repo instead which is what gets initalized in the constructor as explained above. All this leads to equivalent functionality but less boilerplate and now thanks to this the plugin can be (should be - more tests needed) initialized by the API server purely based on the static configuration file when necessary. Fixes hyperledger-cacti#1199 Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com> Signed-off-by: hxlaf <xuhan@lafayette.edu>
maramih
pushed a commit
to maramih/cactus
that referenced
this issue
Aug 17, 2021
…cacti#1199 Removes the non-serializable consortiumRepo argument from the constructor of the consortium plugin manual class's options. Refactors the constructor and the internals of the plugin to initialize the consortium repo from the consortium database at runtime instead of expecting it passed in via the constructor. Refactors the internal code previously using the options.consoritumRepo object to use this.repo instead which is what gets initalized in the constructor as explained above. All this leads to equivalent functionality but less boilerplate and now thanks to this the plugin can be (should be - more tests needed) initialized by the API server purely based on the static configuration file when necessary. Fixes hyperledger-cacti#1199 Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
Leeyoungone
pushed a commit
to Leeyoungone/cactus
that referenced
this issue
Aug 27, 2021
…cacti#1199 Removes the non-serializable consortiumRepo argument from the constructor of the consortium plugin manual class's options. Refactors the constructor and the internals of the plugin to initialize the consortium repo from the consortium database at runtime instead of expecting it passed in via the constructor. Refactors the internal code previously using the options.consoritumRepo object to use this.repo instead which is what gets initalized in the constructor as explained above. All this leads to equivalent functionality but less boilerplate and now thanks to this the plugin can be (should be - more tests needed) initialized by the API server purely based on the static configuration file when necessary. Fixes hyperledger-cacti#1199 Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
RafaelAPB
pushed a commit
to RafaelAPB/blockchain-integration-framework
that referenced
this issue
Mar 9, 2022
…cacti#1199 Removes the non-serializable consortiumRepo argument from the constructor of the consortium plugin manual class's options. Refactors the constructor and the internals of the plugin to initialize the consortium repo from the consortium database at runtime instead of expecting it passed in via the constructor. Refactors the internal code previously using the options.consoritumRepo object to use this.repo instead which is what gets initalized in the constructor as explained above. All this leads to equivalent functionality but less boilerplate and now thanks to this the plugin can be (should be - more tests needed) initialized by the API server purely based on the static configuration file when necessary. Fixes hyperledger-cacti#1199 Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description
The constructor definitions of plugins must always contain an options object that is JSON serializable and the consortium repository is not.
This leads to crashes when you instantiate the plugin through the API server's static configuration and then try to use it because in that scenario there is no consortium repo object in the options.
The second problem is that there was no validation added at the time either so the constructor does not check in the end if there is a repo object available or not.
The text was updated successfully, but these errors were encountered: