feat(odap): odap-hermes plugin first implementation#1275
feat(odap): odap-hermes plugin first implementation#1275petermetz merged 2 commits intohyperledger-cacti:mainfrom
Conversation
Codecov Report
@@ Coverage Diff @@
## main #1275 +/- ##
==========================================
+ Coverage 69.78% 70.03% +0.24%
==========================================
Files 336 368 +32
Lines 12626 14108 +1482
Branches 1513 1701 +188
==========================================
+ Hits 8811 9880 +1069
- Misses 2992 3299 +307
- Partials 823 929 +106
Continue to review full report at Codecov.
|
5b72ba0 to
689bc5e
Compare
petermetz
left a comment
There was a problem hiding this comment.
@jscode017 Please remove all package-lock.json files, we no longer need them since the migration to yarn.
...odap-hermes/src/test/typescript/integration/odap/odap-api-call-with-ledger-connector.test.ts
Outdated
Show resolved
Hide resolved
petermetz
left a comment
There was a problem hiding this comment.
@jscode017 Sorry for the slow response, I left an initial batch of comments in the code but likely there'll be more once I took a second, more detailed pass.
What I would also like to ask you is to consider submitting multiple pull requests, one for the besu connector changes that you added, another one for the fabric connector changes and then finally the odap plugin changes which would be a third PR that you can mark as dependent on the previous two so that the merging order is guaranteed to be the correct one.
...-fabric/src/test/typescript/fixtures/go/lock-asset/chaincode-typescript/src/assetTransfer.ts
Show resolved
Hide resolved
|
@jscode017 If you need help with conflict resolution just let me know! |
|
@petermetz thanks for your detailed review. The variables can be camelCase. The standard does not enforce it at this level. @jscode017 let me know when you will be able to make the requested changes on the docs! |
@RafaelAPB No worries! |
@RafaelAPB |
|
@petermetz @RafaelAPB Its weird, the situation remains the same. I would fail at one machine but pass other twos |
|
@RafaelAPB I made a small change to readme |
|
Looks good to me! @jscode017 @petermetz |
petermetz
left a comment
There was a problem hiding this comment.
@jscode017 Are there two duplicated LockAsset.json files or the two separate ones are different for a specific reason?
...lugin-ledger-connector-fabric/src/main/typescript/common/get-transaction-receipt-by-tx-id.ts
Show resolved
Hide resolved
@jscode017 The CI is in a bit of a pickle right now, we are trying to stabilize it as we speak, please hang tight with regards that. |
|
@jscode017 Jason, i've noticed some things: https://github.com/jscode017/cactus/blob/fabric-receipt/packages/cactus-plugin-ledger-connector-fabric/src/main/typescript/common/get-transaction-receipt-by-tx-id.ts#L12 --> this function should be called getTransactionReceiptByTxID because it is generic. On the other hand, https://github.com/jscode017/cactus/blob/fabric-receipt/packages/cactus-plugin-ledger-connector-fabric/src/main/typescript/plugin-ledger-connector-fabric.ts#L1078 this function should be called getTransactionReceiptForLockContractByTxID because it is meant specifically for the functionality of ODAP. @petermetz does this makes sense? |
@RafaelAPB , I am thinking that is that a way that the function getTransactionReceiptForLockContractByTxID(options)https://github.com/jscode017/cactus/blob/08e7001826d1218827aba3590dc2a3ca29f8bacd/packages/cactus-plugin-ledger-connector-fabric/src/main/typescript/plugin-ledger-connector-fabric.ts#L1087 |
@RafaelAPB Yup, makes sense.
@jscode017 When you say "pass in the implementation function" do you literally mean passing in a variable that contains a reference to a function? |
|
@jscode017 Do you need any help completing the PR? |
@RafaelAPB , I think I would first need to complete the dependency: #1302 |
Done |
92a06ac to
80f3b59
Compare
...dap-hermes/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/VERSION
Outdated
Show resolved
Hide resolved
...odap-hermes/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator-ignore
Show resolved
Hide resolved
32c59c1 to
a7fac07
Compare
packages/cactus-plugin-odap-hermes/src/main/typescript/public-api.d.ts
Outdated
Show resolved
Hide resolved
...-fabric/src/test/typescript/fixtures/go/lock-asset/chaincode-typescript/src/assetTransfer.ts
Show resolved
Hide resolved
petermetz
left a comment
There was a problem hiding this comment.
@jscode017 I pushed a commit with a refreshed yarn lock file that will hopefully resolve the issue that the CI was having
...odap-hermes/src/test/typescript/fabric-contracts/lock-asset/chaincode-typescript/tslint.json
Outdated
Show resolved
Hide resolved
...connector-fabric/src/test/typescript/fixtures/go/lock-asset/chaincode-typescript/tslint.json
Outdated
Show resolved
Hide resolved
...-connector-fabric/src/test/typescript/fixtures/go/lock-asset/chaincode-typescript/.gitignore
Outdated
Show resolved
Hide resolved
petermetz
left a comment
There was a problem hiding this comment.
The CI is now failing with the issue of the build generating files that are not under version control, see details I took from the logs below.
You can probably solve it by running the configure script and then committing the generated files to version control. Let me know if you need more help and I can take a deeper look!
2021-11-01T22:49:35.3855857Z
2021-11-01T22:49:35.3857051Z Build at: 2021-11-01T22:49:35.099Z - Hash: 01acc4f688a0221c5146 - Time: 31553ms
2021-11-01T22:49:35.4044380Z Done in 390.01s.
2021-11-01T22:49:35.4187019Z ++ date +%s
2021-11-01T22:49:35.4208057Z + ENDED_AT=1635806975
2021-11-01T22:49:35.4208523Z + runtime=9205
2021-11-01T22:49:35.4211957Z ++ date +%FT%T%z
2021-11-01T22:49:35.4227641Z + echo '2021-11-01T22:49:35+0000 [CI] SUCCESS - runtime=9205 seconds.'
2021-11-01T22:49:35.4228730Z 2021-11-01T22:49:35+0000 [CI] SUCCESS - runtime=9205 seconds.
2021-11-01T22:49:35.4229328Z + checkWorkTreeStatus
2021-11-01T22:49:35.4230051Z + git update-index -q --refresh
2021-11-01T22:49:36.3688502Z ++ git diff-index --name-only HEAD --
2021-11-01T22:49:36.3763978Z + new_changed_files=packages/cactus-plugin-odap-hermes/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/FILES
2021-11-01T22:49:36.3766163Z + '[' '' '!=' packages/cactus-plugin-odap-hermes/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/FILES ']'
2021-11-01T22:49:36.3767644Z + echo 'Changes in the git index have been detected!'
2021-11-01T22:49:36.3768296Z Changes in the git index have been detected!
2021-11-01T22:49:36.3768759Z + git diff
2021-11-01T22:49:36.3831080Z diff --git a/packages/cactus-plugin-odap-hermes/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/FILES b/packages/cactus-plugin-odap-hermes/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/FILES
2021-11-01T22:49:36.3832832Z + exit 1
2021-11-01T22:49:36.3833242Z index a80cd4f..53250c0 100644
2021-11-01T22:49:36.3834783Z --- a/packages/cactus-plugin-odap-hermes/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/FILES
2021-11-01T22:49:36.3836925Z +++ b/packages/cactus-plugin-odap-hermes/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/FILES
2021-11-01T22:49:36.3838101Z @@ -1,8 +1,5 @@
2021-11-01T22:49:36.3838727Z -.gitignore
2021-11-01T22:49:36.3839201Z -.npmignore
2021-11-01T22:49:36.3839527Z api.ts
2021-11-01T22:49:36.3839833Z base.ts
2021-11-01T22:49:36.3840140Z common.ts
2021-11-01T22:49:36.3840515Z configuration.ts
2021-11-01T22:49:36.3841013Z -git_push.sh
2021-11-01T22:49:36.3841679Z index.ts
2021-11-01T22:49:36.3974255Z 2021-11-01T22:49:36+0000 [CI] FAILURE - runtime=9206 seconds.
2021-11-01T22:49:36.4403370Z ##[error]Process completed with exit code 1.
petermetz
left a comment
There was a problem hiding this comment.
@jscode017 1.0.0-rc.2 just went out so you'll also need to update everything in your package from 1.0.0-rc.1 to 1.0.0-rc.2 accordingly.
sure, I have updated it |
@jscode017 Thank you! Ping me with the "re-request review" button once all the other stuff is addressed as well (or if you have questions about any of those other comments I made) |
@petermetz , Sure. I believe have pushed the re-request review button, thanks. |
Signed-off-by: jsjs026 <jasonhack518@gmail.com>
|
@CatarinaPedreira Almost ready! :) |
petermetz
left a comment
There was a problem hiding this comment.
@jscode017 LGTM, thank you for fixing the CI and updating the versions!
The first pull request for odap