Skip to content

Commit

Permalink
feat(connector-fabric): drop support for Fabric v1.x
Browse files Browse the repository at this point in the history
BREAKING CHANGE: The Open API specification that has the enums for
ledger versions will no longer have an option for Fabric v1.x
This means that in the core-api package the LedgerType enum has changes
which means that code that depends on that enum value will need to be
updated.

Fabric v1.x has had unmaintained dependencies associated with it such as
the native grpc package that stopped receiving security updates years ago
and therefore it's dangerous to have around.

There are also some issues with Fabric v1.x that make the AIO image flaky
which also makes the relevant tests flaky due to which we couldn't run
the v1.x Fabric tests on the CI for a while now anyway.

In order to reduce the CI resource usage and our own maintenance burden
I suggest that we get rid of the Fabric v1.x support meaning that we can
eliminate the AIO image build and some code complexity from the test ledger
code as well.

In addition some old fixtures can be removed that the tests were using.
Overall a net-positive as deleting code without losing functionality (that
we care about) is always a plus.

Signed-off-by: Peter Somogyvari <[email protected]>
  • Loading branch information
petermetz committed Jun 12, 2024
1 parent 4521d10 commit ec8123c
Show file tree
Hide file tree
Showing 14 changed files with 10 additions and 827 deletions.
7 changes: 0 additions & 7 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2297,13 +2297,6 @@ jobs:
- name: ghcr.io/hyperledger/cactus-example-supply-chain-app
run: DOCKER_BUILDKIT=1 docker build . -f ./examples/cactus-example-supply-chain-backend/Dockerfile -t cactus-example-supply-chain-app

ghcr-fabric-all-in-one:
runs-on: ubuntu-22.04
steps:
- uses: actions/[email protected]
- name: ghcr.io/hyperledger/cactus-fabric-all-in-one
run: DOCKER_BUILDKIT=1 docker build ./tools/docker/fabric-all-in-one/ -f ./tools/docker/fabric-all-in-one/Dockerfile_v1.4.x

ghcr-fabric2-all-in-one:
runs-on: ubuntu-22.04
steps:
Expand Down
60 changes: 0 additions & 60 deletions .github/workflows/fabric-all-in-one-publish.yaml

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -542,7 +542,7 @@ export class SupplyChainApp {

const ledger3: Ledger = {
id: "FabricDemoLedger",
ledgerType: LedgerType.Fabric14X,
ledgerType: LedgerType.Fabric2,
};

cactusNodeC.ledgerIds.push(ledger3.id);
Expand Down
1 change: 0 additions & 1 deletion packages/cactus-core-api/src/main/json/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,6 @@
"BESU_2X",
"BURROW_0X",
"CORDA_4X",
"FABRIC_14X",
"FABRIC_2",
"QUORUM_2X",
"SAWTOOTH_1X"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import com.squareup.moshi.JsonClass
/**
* Enumerates the different ledger vendors and their major versions encoded within the name of the LedgerType. For example \"BESU_1X\" involves all of the [1.0.0;2.0.0) where 1.0.0 is included and anything up until, but not 2.0.0. See: https://stackoverflow.com/a/4396303/698470 for further explanation.
*
* Values: bESU1X,bESU2X,bURROW0X,cORDA4X,fABRIC14X,fABRIC2,qUORUM2X,sAWTOOTH1X
* Values: bESU1X,bESU2X,bURROW0X,cORDA4X,fABRIC2,qUORUM2X,sAWTOOTH1X
*/

@JsonClass(generateAdapter = false)
Expand All @@ -40,9 +40,6 @@ enum class LedgerType(val value: kotlin.String) {
@Json(name = "CORDA_4X")
cORDA4X("CORDA_4X"),

@Json(name = "FABRIC_14X")
fABRIC14X("FABRIC_14X"),

@Json(name = "FABRIC_2")
fABRIC2("FABRIC_2"),

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -524,7 +524,6 @@ export const LedgerType = {
Besu2X: 'BESU_2X',
Burrow0X: 'BURROW_0X',
Corda4X: 'CORDA_4X',
Fabric14X: 'FABRIC_14X',
Fabric2: 'FABRIC_2',
Quorum2X: 'QUORUM_2X',
Sawtooth1X: 'SAWTOOTH_1X'
Expand Down
3 changes: 0 additions & 3 deletions packages/cactus-plugin-ledger-connector-fabric/.gitignore

This file was deleted.

This file was deleted.

This file was deleted.

Loading

1 comment on commit ec8123c

@github-actions
Copy link

Choose a reason for hiding this comment

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

⚠️ Performance Alert ⚠️

Possible performance regression was detected for benchmark.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 0.05.

Benchmark suite Current: ec8123c Previous: 13f457c Ratio
cmd-api-server_HTTP_GET_getOpenApiSpecV1 547 ops/sec (±1.80%) 569 ops/sec (±1.70%) 1.04
cmd-api-server_gRPC_GetOpenApiSpecV1 347 ops/sec (±1.33%) 356 ops/sec (±1.37%) 1.03

This comment was automatically generated by workflow using github-action-benchmark.

CC: @petermetz

Please sign in to comment.