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(fabric): serialization of ccp and sshconfig #3578

Merged
merged 1 commit into from
Dec 2, 2024

Conversation

jagpreetsinghsasan
Copy link
Contributor

Commit to be reviewed

feat(fabric): serialization of ccp and sshconfig

Primary Changes
---------------
1. sshConfig and connectionProfile can now be passed as base64 encoded strings

Changes required to incorporate 1)
---------------------------------
2. Added sshConfigBase64Encoded and connectionProfileBase64encoded properties to IPluginLedgerConnectorFabricOptions
3. Added necessary FabricConnector class variables
4. Added a new testcase to demonstrate the same
5. Updated an implementation which fetches sshConfig from class variable

Fixes #3577

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

@outSH outSH 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 left two open questions, please have a look :)

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.

LGTM with comments

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.

LGTM, thank you for the updates!

@petermetz petermetz requested a review from a team November 8, 2024 15:26
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.

@jagpreetsinghsasan We are almost there! Please fix the tests that started failing. I saw this in the logs:

AIL packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/integration/fabric-v2-2-x/run-transaction-endpoint-v1.test.ts (177.176 s, 1102 MB heap size)
  ● runs tx on a Fabric v2.5.6 ledger › runs tx on a Fabric v2.5.6 ledger

    Cannot instantiate Fabric connector without connection profile.

      292 |       this.connectionProfile = JSON.parse(connectionProfileString);
      293 |     } else {
    > 294 |       throw new Error(
          |             ^
      295 |         "Cannot instantiate Fabric connector without connection profile.",
      296 |       );
      297 |     }

      at new PluginLedgerConnectorFabric (packages/cactus-plugin-ledger-connector-fabric/src/main/typescript/plugin-ledger-connector-fabric.ts:294:13)
      at Object.<anonymous> (packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/integration/fabric-v2-2-x/run-transaction-endpoint-v1.test.ts:158:20)

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.

@jagpreetsinghsasan Thank you for the updates, looking good now. Please fix the linter errors and then we are good to go from my side.

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.

@jagpreetsinghsasan Please fix the linter errors

@jagpreetsinghsasan jagpreetsinghsasan force-pushed the feat-3408 branch 2 times, most recently from 362abf8 to 3c61af7 Compare December 2, 2024 07:04
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.

@jagpreetsinghsasan LGTM, thank you!

    Primary Changes
    ---------------
    1. sshConfig and connectionProfile can now be passed
       as base64 encoded strings

    Changes required to incorporate 1)
    ---------------------------------
    2. Added sshConfigBase64Encoded and
       connectionProfileBase64encoded properties
       to IPluginLedgerConnectorFabricOptions
    3. Added necessary FabricConnector class variables
    4. Added a new testcase to demonstrate
       the same
    5. Updated an implementation which fetches
       sshConfig from class variable

Fixes hyperledger-cacti#3577

Signed-off-by: jagpreetsinghsasan <[email protected]>
@petermetz petermetz merged commit d8d8e01 into hyperledger-cacti:main Dec 2, 2024
134 of 137 checks passed
@petermetz petermetz deleted the feat-3408 branch December 2, 2024 18:34
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.

feat(fabric): serialization of ccp and sshconfig
3 participants