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(persistence-fabric): rewrite the plugin #3308

Merged

Conversation

outSH
Copy link
Contributor

@outSH outSH commented Jun 11, 2024

feat(persistence-fabric): rewrite the plugin

  • Rewrite fabric persistence plugin to match persistence ethereum
    plugin method names and overall behavior.
  • Change DB schema for persistence.
  • Add tests and sample data to the new plugin. Add them to the project CI.

Depends on #3298

Signed-off-by: Michal Bajer michal.bajer@fujitsu.com

Pull Request Requirements

  • Rebased onto upstream/main branch and squashed into single commit to help maintainers review it more efficient and to avoid spaghetti git commit graphs that obfuscate which commit did exactly what change, when and, why.
  • Have git sign off at the end of commit message to avoid being marked red. You can add -s flag when using git commit command. You may refer to this link for more information.
  • Follow the Commit Linting specification. You may refer to this link for more information.

Character Limit

  • Pull Request Title and Commit Subject must not exceed 72 characters (including spaces and special characters).
  • Commit Message per line must not exceed 80 characters (including spaces and special characters).

A Must Read for Beginners
For rebasing and squashing, here's a must read guide for beginners.

Copy link

gitguardian bot commented Jun 11, 2024

⚠️ GitGuardian has uncovered 2 secrets following the scan of your pull request.

Please consider investigating the findings and remediating the incidents. Failure to do so may lead to compromising the associated services or software components.

Since your pull request originates from a forked repository, GitGuardian is not able to associate the secrets uncovered with secret incidents on your GitGuardian dashboard.
Skipping this check run and merging your pull request will create secret incidents on your GitGuardian dashboard.

🔎 Detected hardcoded secrets in your pull request
GitGuardian id GitGuardian status Secret Commit Filename
- - Generic Password 1fce960 packages/cactus-plugin-persistence-fabric/src/test/typescript/integration/persistence-fabric-db-client.test.ts View secret
- - Generic Password 1fce960 packages/cactus-plugin-persistence-fabric/src/test/typescript/integration/persistence-fabrc-postgresql-db-client.test.ts View secret
🛠 Guidelines to remediate hardcoded secrets
  1. Understand the implications of revoking this secret by investigating where it is used in your code.
  2. Replace and store your secrets safely. Learn here the best practices.
  3. Revoke and rotate these secrets.
  4. If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.

To avoid such incidents in the future consider


🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.

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.

@outSH:I had a couple of nits but LGTM in general.

Important note: I'm in the process of fixing the release management flow we have and it involves a change in the development workflow when dealing with openapi spec files. The short version is that after that PR gets merged you'll need to make your changes in the openapi.tpl.json file instead of the openapi.json file (they'll be right next to each other for convenience.

outSH added a commit to outSH/cactus that referenced this pull request Jun 13, 2024
- Rewrite fabric app using MUI components and new database schema.
- Improve `UITableListing` to support clickable tables.
- The new app supports the following views:
  - Dashboard: Shows summary of blocks and transaction recorded in database.
  - Block list: Full list of blocks
  - Transaction list: Full list of transactions
  - Transaction details: Page that shows full transaction information,
    transaction actions (method calls) and endorsements.

Depends on hyperledger-cacti#3308
Depends on hyperledger-cacti#3279

Signed-off-by: Michal Bajer <michal.bajer@fujitsu.com>
@outSH
Copy link
Contributor Author

outSH commented Jun 14, 2024

@outSH TODO before merge: Add openapi.tpl.json file

@outSH outSH requested a review from petermetz June 14, 2024 10:14
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.

@outSH LGTM with comments:

For the commit message, it is a refactor then I'd recommend a commit message like this (or similar)

refactor(plugin-persistence-fabric): bring names closer to ethereum pkg

Reasoning:

  1. If there is no new feature being added then the refactor type is probably better describing what happened because the functionality remained the same things just got renamed/shifted around.
  2. "rewrite the plugin" is something that could describe a lot other changes where you rewrote something in the plugin, so I'd try to make it slightly more specific by pulling some of the information from the commit message body up to the subject line as well.

Sorry for the annoying nit-picks as usual!

@outSH
Copy link
Contributor Author

outSH commented Jun 22, 2024

@outSH LGTM with comments:

For the commit message, it is a refactor then I'd recommend a commit message like this (or similar)

refactor(plugin-persistence-fabric): bring names closer to ethereum pkg

Reasoning:

  1. If there is no new feature being added then the refactor type is probably better describing what happened because the functionality remained the same things just got renamed/shifted around.
  2. "rewrite the plugin" is something that could describe a lot other changes where you rewrote something in the plugin, so I'd try to make it slightly more specific by pulling some of the information from the commit message body up to the subject line as well.

Sorry for the annoying nit-picks as usual!

@petermetz This is a complete do-over of the plugin, with completely different plugin behavior (that matches ethereum persistence plugin in case of error handling, detecting missing blocks, etc..). It's not just name rearrangement, for this reason I think the current title is descriptive enough.

@github-actions github-actions bot removed the dependent label Jul 5, 2024
Copy link

github-actions bot commented Jul 5, 2024

This PR/issue depends on:

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

@outSH outSH force-pushed the new_fabric_persistence_plugin_pr branch 4 times, most recently from 0e48f29 to f912f7f Compare July 18, 2024 14:27
@outSH outSH enabled auto-merge (rebase) July 18, 2024 14:59
- Rewrite fabric persistence plugin to match persistence ethereum
  plugin methods and behavior.
- Change DB schema for persistence.
- Add tests and sample data to the new plugin. Add them to project CI.

Depends on hyperledger-cacti#3298

Signed-off-by: Michal Bajer <michal.bajer@fujitsu.com>
@petermetz petermetz force-pushed the new_fabric_persistence_plugin_pr branch from f912f7f to 1fce960 Compare July 18, 2024 20:36
@outSH outSH merged commit c867a9f into hyperledger-cacti:main Jul 18, 2024
143 of 144 checks passed
outSH added a commit to outSH/cactus that referenced this pull request Jul 19, 2024
- Rewrite fabric app using MUI components and new database schema.
- Improve `UITableListing` to support clickable tables.
- The new app supports the following views:
  - Dashboard: Shows summary of blocks and transaction recorded in database.
  - Block list: Full list of blocks
  - Transaction list: Full list of transactions
  - Transaction details: Page that shows full transaction information,
    transaction actions (method calls) and endorsements.

Depends on hyperledger-cacti#3308
Depends on hyperledger-cacti#3279

Signed-off-by: Michal Bajer <michal.bajer@fujitsu.com>
outSH added a commit to outSH/cactus that referenced this pull request Jul 22, 2024
- Rewrite fabric app using MUI components and new database schema.
- Improve `UITableListing` to support clickable tables.
- The new app supports the following views:
  - Dashboard: Shows summary of blocks and transaction recorded in database.
  - Block list: Full list of blocks
  - Transaction list: Full list of transactions
  - Transaction details: Page that shows full transaction information,
    transaction actions (method calls) and endorsements.

Depends on hyperledger-cacti#3308
Depends on hyperledger-cacti#3279

Signed-off-by: Michal Bajer <michal.bajer@fujitsu.com>
petermetz pushed a commit to outSH/cactus that referenced this pull request Jul 24, 2024
- Rewrite fabric app using MUI components and new database schema.
- Improve `UITableListing` to support clickable tables.
- The new app supports the following views:
  - Dashboard: Shows summary of blocks and transaction recorded in database.
  - Block list: Full list of blocks
  - Transaction list: Full list of transactions
  - Transaction details: Page that shows full transaction information,
    transaction actions (method calls) and endorsements.

Depends on hyperledger-cacti#3308
Depends on hyperledger-cacti#3279

Signed-off-by: Michal Bajer <michal.bajer@fujitsu.com>
outSH added a commit that referenced this pull request Jul 24, 2024
- Rewrite fabric app using MUI components and new database schema.
- Improve `UITableListing` to support clickable tables.
- The new app supports the following views:
  - Dashboard: Shows summary of blocks and transaction recorded in database.
  - Block list: Full list of blocks
  - Transaction list: Full list of transactions
  - Transaction details: Page that shows full transaction information,
    transaction actions (method calls) and endorsements.

Depends on #3308
Depends on #3279

Signed-off-by: Michal Bajer <michal.bajer@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.

3 participants