forked from hyperledger-cacti/cacti
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs(examples/supply-chain): fix test infra - migrate to Fabric v2.5.6
The supply chain app's build and execution scripts should finally be working after this and also be much more stable than before due to the flakiness of the Fabric V1 test ledger not being an issue anymore. The container image is now published as: `ghcr.io/hyperledger/cactus-example-supply-chain-app:2024-03-08--pr-3059-1` 1.The new contract is compiled with go v1.20 and therefore has to have the contract method names capitalized insted of camelCase, otherwise the methods are not possible to be exported and the contract deployment fails even if everything else is correct. 2. The supply chain app now uses the newest edition of the Fabric v2 AIO test ledger container image which uses Fabric v2.5.6 (current LTS at the time of this writing). 3. The shipment contract's source code has been migrated to Fabric v2 meaning that instead of a stub object we get a context object for each method's first parameter and then the stub can be acquired from that context object. 4. The method arguments no longer need to be passed around as an array of strings and instead the contract method's input arguments are first-class go method parameters. 5. Re-enabled a test case that was being skipped until now due to flakiness: ...`src/test/typescript/integration/supply-chain-backend-api-calls.test.ts` The supply chain app container image was built with this command: ```sh DOCKER_BUILDKIT=1 docker build \ --build-arg="NPM_PKG_VERSION=2.0.0-2945-supply-chain-app-build-failed.241+b2c306ea0" \ -f ./examples/cactus-example-supply-chain-backend/Dockerfile \ . \ -t scaeb ``` The NPM_PKG_VERSION build arg is important because the image defaults to "latest" which at the moment is packages that do not contain the fixes made by this commit, so re-building the image without that extra arg will not work until we issue the next official non-canary release. Depends on hyperledger-cacti#3058 Depends on hyperledger-cacti#3054 Fixes hyperledger-cacti#2945 Fixes hyperledger-cacti#2969 Fixes hyperledger-cacti#1899 Fixes hyperledger-cacti#1521 Fixes hyperledger-cacti#1518 Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
- Loading branch information
Showing
15 changed files
with
293 additions
and
152 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 37 additions & 0 deletions
37
...ackend/src/main/typescript/infrastructure/shipment-golang-contract-pinned-dependencies.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
/** | ||
* These are the pinned dependencies used to build the go source code that is | ||
* located in the file at: | ||
* examples/cactus-example-supply-chain-backend/src/main/go/shipment.ts | ||
*/ | ||
export const SHIPMENT_GOLANG_CONTRACT_PINNED_DEPENDENCIES = [ | ||
"github.com/hyperledger/fabric-chaincode-go@v0.0.0-20240124143825-7dec3c7e7d45", | ||
"github.com/hyperledger/fabric-contract-api-go@v1.2.2", | ||
"github.com/hyperledger/fabric-protos-go@v0.3.3", | ||
"github.com/hyperledger/fabric-samples/asset-transfer-private-data/chaincode-go@v0.0.0-20240226031326-db86460086c0", | ||
"github.com/stretchr/testify@v1.8.4", | ||
"google.golang.org/protobuf@v1.32.0", | ||
"github.com/davecgh/go-spew@v1.1.1", // indirect | ||
"github.com/go-openapi/jsonpointer@v0.20.0", // indirect | ||
"github.com/go-openapi/jsonreference@v0.20.2", // indirect | ||
"github.com/go-openapi/spec@v0.20.9", // indirect | ||
"github.com/go-openapi/swag@v0.22.4", // indirect | ||
"github.com/gobuffalo/envy@v1.10.2", // indirect | ||
"github.com/gobuffalo/packd@v1.0.2", // indirect | ||
"github.com/gobuffalo/packr@v1.30.1", // indirect | ||
"github.com/golang/protobuf@v1.5.3", // indirect | ||
"github.com/joho/godotenv@v1.5.1", // indirect | ||
"github.com/josharian/intern@v1.0.0", // indirect | ||
"github.com/mailru/easyjson@v0.7.7", // indirect | ||
"github.com/pmezard/go-difflib@v1.0.0", // indirect | ||
"github.com/rogpeppe/go-internal@v1.11.0", // indirect | ||
"github.com/xeipuuv/gojsonpointer@v0.0.0-20190905194746-02993c407bfb", // indirect | ||
"github.com/xeipuuv/gojsonreference@v0.0.0-20180127040603-bd5ef7bd5415", // indirect | ||
"github.com/xeipuuv/gojsonschema@v1.2.0", // indirect | ||
"golang.org/x/mod@v0.14.0", // indirect | ||
"golang.org/x/net@v0.20.0", // indirect | ||
"golang.org/x/sys@v0.16.0", // indirect | ||
"golang.org/x/text@v0.14.0", // indirect | ||
"google.golang.org/genproto/googleapis/rpc@v0.0.0-20231030173426-d783a09b4405", // indirect | ||
"google.golang.org/grpc@v1.59.0", // indirect | ||
"gopkg.in/yaml.v3@v3.0.1", // indirect | ||
]; |
Oops, something went wrong.