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): add sample setup scripts, improve documentation #3448

Merged

Conversation

outSH
Copy link
Contributor

@outSH outSH commented Jul 30, 2024

  • Fix error when empty transaction.actions was received from a block.
  • Copy schema SQL during build.
  • Remove unique constraint on fabric transactions hash column (there are transactions with empty hash that would break it).
  • Improve parsing of certificate subject/issuer attributes to handle more delimiters.
  • Use new install-fabric.sh script (that is recommended for Fabric 2.5) instead of old bootstrap to fix some runtime issues that I've encountered.
  • Add sample setup scripts. Simple can be used to run persistence against already running fabric ledger, complete will setup entire environment and run some basic operations to generate sample data.
  • Improve documentation to include these new scripts and how to use them, fix smaller issues.

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
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, thank you very much!

Copy link
Contributor

@RafaelAPB RafaelAPB left a comment

Choose a reason for hiding this comment

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

This is a great PR, thanks!
I like very much the fact the examples are layed down as a tutorial. However, perhaps the best organization is instead of having scripts on test/manual, to have instead an example package under /examples?
Rest LGTM

outSH added a commit to outSH/cactus that referenced this pull request Aug 13, 2024
- Add new documentation section to project docs. New pages can be found under
    `Cactus` -> `Ledger Browser` category. Documentation include GUI setup
    instructions, application overviews, developer guide and tutorial
    on developing new app plugin for the GUI.
- Do some minor quality of life improvements and bug fixes.
- Add missing GUI database schema file.
- Remove dead code from GUI that still used `getAppList`.
- Add documentation links to the GUI. For now, most links are empty and they
    will be set once this PR is merged and the docs URLs are confirmed.
- Add sample tutorial application (the same that is created step-by-step in
    the tutorial in the documentation)
- Improve plugin app URL regex to allow more valid paths.
- Expose ethereum and fabric schemas in supabase-all-in-one
- Extend persistence plugin init SQL with code for exposing custom schemas.
- Improve supabase-all-in-one readme documentation.
- Fix persistence sample setup scripts ports so that both scripts can be run
    at the same time.

Depends on hyperledger-cacti#3448
Depends on hyperledger-cacti#3449

Signed-off-by: Michal Bajer <michal.bajer@fujitsu.com>
outSH added a commit to outSH/cactus that referenced this pull request Aug 13, 2024
- Add new documentation section to project docs. New pages can be found under
    `Cactus` -> `Ledger Browser` category. Documentation include GUI setup
    instructions, application overviews, developer guide and tutorial
    on developing new app plugin for the GUI.
- Do some minor quality of life improvements and bug fixes.
- Add missing GUI database schema file.
- Remove dead code from GUI that still used `getAppList`.
- Add documentation links to the GUI. For now, most links are empty and they
    will be set once this PR is merged and the docs URLs are confirmed.
- Add sample tutorial application (the same that is created step-by-step in
    the tutorial in the documentation)
- Improve plugin app URL regex to allow more valid paths.
- Expose ethereum and fabric schemas in supabase-all-in-one
- Extend persistence plugin init SQL with code for exposing custom schemas.
- Improve supabase-all-in-one readme documentation.
- Fix persistence sample setup scripts ports so that both scripts can be run
    at the same time.

Depends on hyperledger-cacti#3448
Depends on hyperledger-cacti#3449

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

outSH commented Aug 13, 2024

@RafaelAPB Thanks! I believe a similar idea was discussed before, but the challenges were:

  • If /examples were not included in the CI build, it could lead to discrepancies between the examples and the actual code.
  • If /examples were built as an actual package alongside other packages, it could quickly grow in complexity due to dependencies.

I opted for a manual directory because I used a similar convention for other scripts. However, I'm open to adding /examples inside the persistence plugin folder if that would be clearer for users. :)

…tion

- Fix error when empty `transaction.actions` was received from a block.
- Copy schema SQL during build.
- Remove unique constraint on fabric transactions hash column (there
    are transactions with empty hash that would break it).
- Improve parsing of certificate subject/issuer attributes to handle more
    delimiters.
- Use new `install-fabric.sh` script (that is recommended for Fabric 2.5)
    instead of old bootstrap to fix some runtime issues that I've encountered.
- Add sample setup scripts. Simple can be used to run persistence against
    already running fabric ledger, complete will setup entire environment
    and run some basic operations to generate sample data.
- Improve documentation to include these new scripts and how to use them, fix
    smaller issues.

Signed-off-by: Michal Bajer <michal.bajer@fujitsu.com>
@petermetz petermetz force-pushed the improve_persistence_fabric_docs_pr branch from a16235f to 23ab435 Compare August 13, 2024 20:22
@petermetz
Copy link
Contributor

I agree with both of you. Pros and cons to both approaches unfortunately and it's hard to tell which one has worse cons and/or better pros.

@petermetz petermetz merged commit 9fef336 into hyperledger-cacti:main Aug 13, 2024
141 of 144 checks passed
outSH added a commit to outSH/cactus that referenced this pull request Aug 14, 2024
- Add new documentation section to project docs. New pages can be found under
    `Cactus` -> `Ledger Browser` category. Documentation include GUI setup
    instructions, application overviews, developer guide and tutorial
    on developing new app plugin for the GUI.
- Do some minor quality of life improvements and bug fixes.
- Add missing GUI database schema file.
- Remove dead code from GUI that still used `getAppList`.
- Add documentation links to the GUI. For now, most links are empty and they
    will be set once this PR is merged and the docs URLs are confirmed.
- Add sample tutorial application (the same that is created step-by-step in
    the tutorial in the documentation)
- Improve plugin app URL regex to allow more valid paths.
- Expose ethereum and fabric schemas in supabase-all-in-one
- Extend persistence plugin init SQL with code for exposing custom schemas.
- Improve supabase-all-in-one readme documentation.
- Fix persistence sample setup scripts ports so that both scripts can be run
    at the same time.

Depends on hyperledger-cacti#3448
Depends on hyperledger-cacti#3449

Signed-off-by: Michal Bajer <michal.bajer@fujitsu.com>
petermetz pushed a commit to outSH/cactus that referenced this pull request Sep 4, 2024
- Add new documentation section to project docs. New pages can be found under
    `Cactus` -> `Ledger Browser` category. Documentation include GUI setup
    instructions, application overviews, developer guide and tutorial
    on developing new app plugin for the GUI.
- Do some minor quality of life improvements and bug fixes.
- Add missing GUI database schema file.
- Remove dead code from GUI that still used `getAppList`.
- Add documentation links to the GUI. For now, most links are empty and they
    will be set once this PR is merged and the docs URLs are confirmed.
- Add sample tutorial application (the same that is created step-by-step in
    the tutorial in the documentation)
- Improve plugin app URL regex to allow more valid paths.
- Expose ethereum and fabric schemas in supabase-all-in-one
- Extend persistence plugin init SQL with code for exposing custom schemas.
- Improve supabase-all-in-one readme documentation.
- Fix persistence sample setup scripts ports so that both scripts can be run
    at the same time.

Depends on hyperledger-cacti#3448
Depends on hyperledger-cacti#3449

Signed-off-by: Michal Bajer <michal.bajer@fujitsu.com>
petermetz pushed a commit that referenced this pull request Sep 4, 2024
- Add new documentation section to project docs. New pages can be found under
    `Cactus` -> `Ledger Browser` category. Documentation include GUI setup
    instructions, application overviews, developer guide and tutorial
    on developing new app plugin for the GUI.
- Do some minor quality of life improvements and bug fixes.
- Add missing GUI database schema file.
- Remove dead code from GUI that still used `getAppList`.
- Add documentation links to the GUI. For now, most links are empty and they
    will be set once this PR is merged and the docs URLs are confirmed.
- Add sample tutorial application (the same that is created step-by-step in
    the tutorial in the documentation)
- Improve plugin app URL regex to allow more valid paths.
- Expose ethereum and fabric schemas in supabase-all-in-one
- Extend persistence plugin init SQL with code for exposing custom schemas.
- Improve supabase-all-in-one readme documentation.
- Fix persistence sample setup scripts ports so that both scripts can be run
    at the same time.

Depends on #3448
Depends on #3449

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