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

feat(plugin-persistence-fabric): add new fabric persistence plugin #2331

Conversation

barnapa
Copy link
Contributor

@barnapa barnapa commented Mar 20, 2023

Add a new plugin for storing hyperledger fabric ledger data into a database
Add functional tests for plugin and data access layer operations.
operating with fabric-all-in-one docker composition
Tests assume any postgres database, but for final deployment postgres or supabase is assumed.
Data fed by this plugin can later be visualized by a GUI application or analyzed directly. ( right now the GUI will have switch to operate either with Ethereum ledger or Fabric ledger )

Depends on: https://github.com/hyperledger/cacti/pull/2259
Depends on: https://github.com/hyperledger/cacti/pull/2265

Signed-off-by: Barnaba Pawelczak barnaba.pawelczak@fujitsu.com

Copy link
Contributor

@petermetz petermetz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@barnapa Please re-organize the commits a little bit to make it easier to review (right now the diff is huge because of the parent PRs in the stack and the 4 commits you have in the PR all look like they belong to your PR itself (but then when I look at the diff I can tell that the parent PRs diff are also included because it has the cmd-gui-app package in too).

If you reorganize your commits so that:

  1. There's only one commit with the changes that belong to this PR and
  2. The other 2 commits come from the 2 parent PRs
    then we can review just your specific commit by filtering the diff down to just that (but right now this is not possible).

If you need any help with making this happen (git mechanics or otherwise) then just let me know or join one of the daily pair programming calls that we have and we can screen share: https://wiki.hyperledger.org/display/cactus/Daily+Pair+Programming+Calls

@barnapa barnapa force-pushed the cactus-plugin-persistence-fabric-pull-initial branch 2 times, most recently from fc06dff to 2e3c7f1 Compare March 28, 2023 20:07
@barnapa
Copy link
Contributor Author

barnapa commented Mar 28, 2023

ok it is re organized

Copy link
Contributor

@petermetz petermetz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok it is re organized

@barnapa It is re-organized, but all you did from what I can tell is squash everything together instead of separating the parent PR commits from this PR. You have a single commit that has a 115 files in its diff and it has the GUI app code in it too. Please double check https://github.com/hyperledger/cacti/pull/2331#pullrequestreview-1360124392

@petermetz
Copy link
Contributor

petermetz commented Mar 30, 2023

there are some changes in gui also. (parent GUI covers only ethereum ledger, this gui cover also fabric ledger ) so make another PR just for changes in GUI ?

changes for plugin ethereum persistence are not included.

@barnapa
You could open a separate PR for the GUI changes related to the fabric persistence plugin, yes.
We'll still need to separate out the commits in this PR though so that it is differentiated what goes in with this PR and what goes in with the parent PRs. I don't know how else to explain it other than this plus what I said in https://github.com/hyperledger/cacti/pull/2331#pullrequestreview-1360124392 but I could either show you live or the slower and easier option is to just wait until the parent gets merged and then you won't have to do the commit surgery, you can just do a rebase onto upstream main and all will be well.
I'm fine with either one of those options. You go with your preference depending on how urgent the review on this PR is.

@barnapa barnapa force-pushed the cactus-plugin-persistence-fabric-pull-initial branch from 2e3c7f1 to 22213f2 Compare April 3, 2023 06:52
@barnapa
Copy link
Contributor Author

barnapa commented Apr 3, 2023

I removed gui for fabric from this pull it will be in another one

Copy link
Contributor

@petermetz petermetz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I removed gui for fabric from this pull it will be in another one

@barnapa Thank you for that! Now please resolve the merge conflicts and then we can review the actual PR.

I don't know why the other maintainers were not added automatically (we have it configured so that they are but it seems buggy) but I added everyone manually just now as reviewers.

Will wait for the conflict resolution before a full review but I noticed something already that could be addressed at the same time as the conflict resolution:
The tsconfig.base.json and tsconfig.json files were re-formatted which makes it hard to see if there were any actual changes it to so I'll ask to revert the formatting and if you do want to have the tsconfig files in a different format, that can be submitted as another PR which does not change any functionality, only formatting.

This way we don't mix changes that have potentially far reaching consequences (project-wide compiler configuration that affects 40+ packages) and changes that aren't changing anything but are very prone to distracting reviewers from tiny but impactful changes as described above.

Copy link
Contributor

@petermetz petermetz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@barnapa Please

  1. Update the cacti versions to the current latest (which just had a release yesterday)
  2. Check out my comment about the magic strings

.cspell.json Outdated Show resolved Hide resolved
Copy link
Contributor

@VRamakrishna VRamakrishna left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've requested minor edits around terminology and formatting in my comments.

@rwat17 rwat17 force-pushed the cactus-plugin-persistence-fabric-pull-initial branch 3 times, most recently from 95ac687 to 2654f0f Compare May 26, 2023 14:26
@rwat17 rwat17 force-pushed the cactus-plugin-persistence-fabric-pull-initial branch from 2654f0f to 86dc2a2 Compare June 1, 2023 09:59
Copy link
Contributor

@izuru0 izuru0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@petermetz petermetz force-pushed the cactus-plugin-persistence-fabric-pull-initial branch from 86dc2a2 to 57b2da2 Compare June 12, 2023 05:46
@petermetz petermetz changed the title feat(cactus-plugin-persistence-fabric): add new persistence plugin for fabric ledger feat(plugin-persistence-fabric): add new fabric persistence plugin Jun 12, 2023
Copy link
Contributor

@jagpreetsinghsasan jagpreetsinghsasan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@petermetz petermetz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@barnapa LGTM

FYI: I've made a couple of changes to the

  1. getRuntimeErrorCause function so that it doesn't hide information about exceptions that are not string nor Error typed
  2. dependencies (removed unused ones, added missing declarations)

1. Add a new plugin for storing hyperledger fabric ledger data into a database
2. Add functional tests for plugin and data access layer operations.
operating with fabric-all-in-one docker composition

Tests assume any postgres database, but for final deployment postgres
or supabase is assumed.
Data fed by this plugin can later be visualized by a GUI application or
analyzed directly. ( right now the GUI will have switch to operate
either with Ethereum ledger or Fabric ledger )

Also upgrade ts-node in the rood package.json because it was causing
crashes for the scripts in the ./tools/ directory (such as the webpack
bundle name validator script)

Depends on: hyperledger-cacti#2259
Depends on: hyperledger-cacti#2265

Co-authored-by: Peter Somogyvari <peter.somogyvari@accenture.com>

Signed-off-by: Barnaba Pawełczak <barnaba.pawelczak@fujitsu.com>
Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
@petermetz petermetz force-pushed the cactus-plugin-persistence-fabric-pull-initial branch from 57b2da2 to 2e922aa Compare June 12, 2023 18:08
@petermetz petermetz merged commit 47a64ee into hyperledger-cacti:main Jun 12, 2023
barnapa pushed a commit to barnapa/cacti that referenced this pull request Jun 22, 2023
…rledger ledger data stored in supabase by persistence plugins

Depends on: hyperledger-cacti#2265
Depends on: hyperledger-cacti#2331

Signed-off-by: Barnaba Pawelczak barnaba.pawelczak@fujitsu.com
barnapa pushed a commit to barnapa/cacti that referenced this pull request Jun 22, 2023
…rledger ledger data stored in supabase by persistence plugins

Depends on: hyperledger-cacti#2265
Depends on: hyperledger-cacti#2331

Signed-off-by: Barnaba Pawelczak barnaba.pawelczak@fujitsu.com
barnapa pushed a commit to barnapa/cacti that referenced this pull request Jun 22, 2023
…rledger ledger data stored in supabase by persistence plugins

Depends on: hyperledger-cacti#2265
Depends on: hyperledger-cacti#2331

Signed-off-by: Barnaba Pawelczak barnaba.pawelczak@fujitsu.com
barnapa pushed a commit to barnapa/cacti that referenced this pull request Jun 22, 2023
…rledger ledger data stored in supabase by persistence plugins

Depends on: hyperledger-cacti#2265
Depends on: hyperledger-cacti#2331

Signed-off-by: Barnaba Pawelczak barnaba.pawelczak@fujitsu.com
barnapa pushed a commit to barnapa/cacti that referenced this pull request Jun 22, 2023
…rledger ledger data stored in supabase by persistence plugins

Depends on: hyperledger-cacti#2265
Depends on: hyperledger-cacti#2331

Signed-off-by: Barnaba Pawelczak barnaba.pawelczak@fujitsu.com
barnapa pushed a commit to barnapa/cacti that referenced this pull request Jun 22, 2023
…rledger ledger data stored in supabase by persistence plugins

Depends on: hyperledger-cacti#2265
Depends on: hyperledger-cacti#2331

Signed-off-by: Barnaba Pawelczak barnaba.pawelczak@fujitsu.com
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants