-
Notifications
You must be signed in to change notification settings - Fork 295
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
test(connector-fabric): fix tests - package io/fs is not in GOROOT #2358
Labels
bug
Something isn't working
Developer_Experience
Fabric
P2
Priority 2: High
Tests
Anything related to tests be that automatic or manual, integration or unit, etc.
Triage_Needed
Triage if the issue is/still relevant, bug report is valid, arch/design details etc.
Milestone
Comments
petermetz
added a commit
to petermetz/cacti
that referenced
this issue
Aug 8, 2023
The simple answer was to upgrade to go v1.20.x from v1.15.x, but this caused a series of other problems that also needed to address so the complete list of changes and their motivations are below: 1. The upgrade to go v1.20.6 1.1. We no longer install docker-compose via pip because since v2 it ships with the main docker package itself (they rewrote it in go) 1.2. Added a new "gcompat" apk package which is necessary because of go v1.20.6 as well. Details on this can be found here: golang/go#59305 (comment) 1.3. As part of installing the OpenSSH server, we now must first wipe all openssh* packages due to newly surfaced package version conflicts due to the ones that are prepackaged with the alpine image. Without the purge step it fails like this: => ERROR [17/64] RUN apk add --no-cache openssh augeas 1.1s ------ > [17/64] RUN apk add --no-cache openssh augeas: 0.300 fetch https://dl-cdn.alpinelinux.org/alpine/v3.18/main/x86_64/APKINDEX.tar.gz 0.560 fetch https://dl-cdn.alpinelinux.org/alpine/v3.18/community/x86_64/APKINDEX.tar.gz 1.041 ERROR: unable to select packages: 1.043 openssh-client-common-9.3_p1-r3: 1.043 breaks: openssh-client-default-9.3_p2-r0[openssh-client-common=9.3_p2-r0] 2. Upgraded the node-ssh library to v13 because v12 was broken due to changes introduced by the new OpenSSH server. 3. Modified the container image definition so that we have the ability to customize the version of fabric-nodeenv images used internally by the peers of the fabric-samples repository. This was needed so that we can control what version of npm and NodeJS are being used when the chain code installation process is happening (which is just the peer running the `npm install --production` command within the fabric-nodeenv container) 4. The default Fabric version used by the testing infrastructure is now Fabric v2.2.13 and for the NodeJS chain code it is 2.4.2 5. Slightly rearranged the imports & constants in some of the tests which made it easier to verify that the new image is working as intended. Fixes hyperledger-cacti#2358 Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
This was referenced Aug 8, 2023
petermetz
added a commit
to petermetz/cacti
that referenced
this issue
Aug 11, 2023
The simple answer was to upgrade to go v1.20.x from v1.15.x, but this caused a series of other problems that also needed to address so the complete list of changes and their motivations are below: 1. The upgrade to go v1.20.6 1.1. We no longer install docker-compose via pip because since v2 it ships with the main docker package itself (they rewrote it in go) 1.2. Added a new "gcompat" apk package which is necessary because of go v1.20.6 as well. Details on this can be found here: golang/go#59305 (comment) 1.3. As part of installing the OpenSSH server, we now must first wipe all openssh* packages due to newly surfaced package version conflicts due to the ones that are prepackaged with the alpine image. Without the purge step it fails like this: => ERROR [17/64] RUN apk add --no-cache openssh augeas 1.1s ------ > [17/64] RUN apk add --no-cache openssh augeas: 0.300 fetch https://dl-cdn.alpinelinux.org/alpine/v3.18/main/x86_64/APKINDEX.tar.gz 0.560 fetch https://dl-cdn.alpinelinux.org/alpine/v3.18/community/x86_64/APKINDEX.tar.gz 1.041 ERROR: unable to select packages: 1.043 openssh-client-common-9.3_p1-r3: 1.043 breaks: openssh-client-default-9.3_p2-r0[openssh-client-common=9.3_p2-r0] 2. Upgraded the node-ssh library to v13 because v12 was broken due to changes introduced by the new OpenSSH server. 3. Modified the container image definition so that we have the ability to customize the version of fabric-nodeenv images used internally by the peers of the fabric-samples repository. This was needed so that we can control what version of npm and NodeJS are being used when the chain code installation process is happening (which is just the peer running the `npm install --production` command within the fabric-nodeenv container) 4. The default Fabric version used by the testing infrastructure is now Fabric v2.2.13 and for the NodeJS chain code it is 2.4.2 5. Slightly rearranged the imports & constants in some of the tests which made it easier to verify that the new image is working as intended. 6. The new image built from this dockerfile for Fabric AIO 2.x is tagged on the registry as: `ghcr.io/hyperledger/cactus-fabric2-all-in-one:2023-08-05-issue2358` Fixes hyperledger-cacti#2358 Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
petermetz
added a commit
to petermetz/cacti
that referenced
this issue
Aug 11, 2023
The simple answer was to upgrade to go v1.20.x from v1.15.x, but this caused a series of other problems that also needed to address so the complete list of changes and their motivations are below: 1. The upgrade to go v1.20.6 1.1. We no longer install docker-compose via pip because since v2 it ships with the main docker package itself (they rewrote it in go) 1.2. Added a new "gcompat" apk package which is necessary because of go v1.20.6 as well. Details on this can be found here: golang/go#59305 (comment) 1.3. As part of installing the OpenSSH server, we now must first wipe all openssh* packages due to newly surfaced package version conflicts due to the ones that are prepackaged with the alpine image. Without the purge step it fails like this: => ERROR [17/64] RUN apk add --no-cache openssh augeas 1.1s ------ > [17/64] RUN apk add --no-cache openssh augeas: 0.300 fetch https://dl-cdn.alpinelinux.org/alpine/v3.18/main/x86_64/APKINDEX.tar.gz 0.560 fetch https://dl-cdn.alpinelinux.org/alpine/v3.18/community/x86_64/APKINDEX.tar.gz 1.041 ERROR: unable to select packages: 1.043 openssh-client-common-9.3_p1-r3: 1.043 breaks: openssh-client-default-9.3_p2-r0[openssh-client-common=9.3_p2-r0] 2. Upgraded the node-ssh library to v13 because v12 was broken due to changes introduced by the new OpenSSH server. 3. Modified the container image definition so that we have the ability to customize the version of fabric-nodeenv images used internally by the peers of the fabric-samples repository. This was needed so that we can control what version of npm and NodeJS are being used when the chain code installation process is happening (which is just the peer running the `npm install --production` command within the fabric-nodeenv container) 4. The default Fabric version used by the testing infrastructure is now Fabric v2.2.13 and for the NodeJS chain code it is 2.4.2 5. Slightly rearranged the imports & constants in some of the tests which made it easier to verify that the new image is working as intended. 6. The new image built from this dockerfile for Fabric AIO 2.x is tagged on the registry as: `ghcr.io/hyperledger/cactus-fabric2-all-in-one:2023-08-05-issue2358` 7. increased the tap timeout from 900 seconds (15 minutes) to 3600 (an hour) Fixes hyperledger-cacti#2358 Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
petermetz
added a commit
that referenced
this issue
Aug 11, 2023
The simple answer was to upgrade to go v1.20.x from v1.15.x, but this caused a series of other problems that also needed to address so the complete list of changes and their motivations are below: 1. The upgrade to go v1.20.6 1.1. We no longer install docker-compose via pip because since v2 it ships with the main docker package itself (they rewrote it in go) 1.2. Added a new "gcompat" apk package which is necessary because of go v1.20.6 as well. Details on this can be found here: golang/go#59305 (comment) 1.3. As part of installing the OpenSSH server, we now must first wipe all openssh* packages due to newly surfaced package version conflicts due to the ones that are prepackaged with the alpine image. Without the purge step it fails like this: => ERROR [17/64] RUN apk add --no-cache openssh augeas 1.1s ------ > [17/64] RUN apk add --no-cache openssh augeas: 0.300 fetch https://dl-cdn.alpinelinux.org/alpine/v3.18/main/x86_64/APKINDEX.tar.gz 0.560 fetch https://dl-cdn.alpinelinux.org/alpine/v3.18/community/x86_64/APKINDEX.tar.gz 1.041 ERROR: unable to select packages: 1.043 openssh-client-common-9.3_p1-r3: 1.043 breaks: openssh-client-default-9.3_p2-r0[openssh-client-common=9.3_p2-r0] 2. Upgraded the node-ssh library to v13 because v12 was broken due to changes introduced by the new OpenSSH server. 3. Modified the container image definition so that we have the ability to customize the version of fabric-nodeenv images used internally by the peers of the fabric-samples repository. This was needed so that we can control what version of npm and NodeJS are being used when the chain code installation process is happening (which is just the peer running the `npm install --production` command within the fabric-nodeenv container) 4. The default Fabric version used by the testing infrastructure is now Fabric v2.2.13 and for the NodeJS chain code it is 2.4.2 5. Slightly rearranged the imports & constants in some of the tests which made it easier to verify that the new image is working as intended. 6. The new image built from this dockerfile for Fabric AIO 2.x is tagged on the registry as: `ghcr.io/hyperledger/cactus-fabric2-all-in-one:2023-08-05-issue2358` 7. increased the tap timeout from 900 seconds (15 minutes) to 3600 (an hour) Fixes #2358 Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
sandeepnRES
pushed a commit
to sandeepnRES/cacti
that referenced
this issue
Dec 21, 2023
The simple answer was to upgrade to go v1.20.x from v1.15.x, but this caused a series of other problems that also needed to address so the complete list of changes and their motivations are below: 1. The upgrade to go v1.20.6 1.1. We no longer install docker-compose via pip because since v2 it ships with the main docker package itself (they rewrote it in go) 1.2. Added a new "gcompat" apk package which is necessary because of go v1.20.6 as well. Details on this can be found here: golang/go#59305 (comment) 1.3. As part of installing the OpenSSH server, we now must first wipe all openssh* packages due to newly surfaced package version conflicts due to the ones that are prepackaged with the alpine image. Without the purge step it fails like this: => ERROR [17/64] RUN apk add --no-cache openssh augeas 1.1s ------ > [17/64] RUN apk add --no-cache openssh augeas: 0.300 fetch https://dl-cdn.alpinelinux.org/alpine/v3.18/main/x86_64/APKINDEX.tar.gz 0.560 fetch https://dl-cdn.alpinelinux.org/alpine/v3.18/community/x86_64/APKINDEX.tar.gz 1.041 ERROR: unable to select packages: 1.043 openssh-client-common-9.3_p1-r3: 1.043 breaks: openssh-client-default-9.3_p2-r0[openssh-client-common=9.3_p2-r0] 2. Upgraded the node-ssh library to v13 because v12 was broken due to changes introduced by the new OpenSSH server. 3. Modified the container image definition so that we have the ability to customize the version of fabric-nodeenv images used internally by the peers of the fabric-samples repository. This was needed so that we can control what version of npm and NodeJS are being used when the chain code installation process is happening (which is just the peer running the `npm install --production` command within the fabric-nodeenv container) 4. The default Fabric version used by the testing infrastructure is now Fabric v2.2.13 and for the NodeJS chain code it is 2.4.2 5. Slightly rearranged the imports & constants in some of the tests which made it easier to verify that the new image is working as intended. 6. The new image built from this dockerfile for Fabric AIO 2.x is tagged on the registry as: `ghcr.io/hyperledger/cactus-fabric2-all-in-one:2023-08-05-issue2358` 7. increased the tap timeout from 900 seconds (15 minutes) to 3600 (an hour) Fixes hyperledger-cacti#2358 Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
bug
Something isn't working
Developer_Experience
Fabric
P2
Priority 2: High
Tests
Anything related to tests be that automatic or manual, integration or unit, etc.
Triage_Needed
Triage if the issue is/still relevant, bug report is valid, arch/design details etc.
Describe the bug
Test case:
packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/integration/fabric-v2-2-x/deploy-cc-from-golang-source-private-data.test.ts
To Reproduce
yarn jest packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/integration/fabric-v2-2-x/deploy-cc-from-golang-source-private-data.test.ts
Expected behavior
Test passes.
Logs/Stack traces
With the current source code of the test case: 2023-03-28T22-21-57-cacti-fabric-test-crash.csv
After using a more up to date AIO image: 2023-03-28T02-50-11-cacti-ci-fabric-go-chaincode-deployment-crash.log
Cloud provider or hardware configuration:
Both local and cloud.
Operating system name, version, build:
Ubuntu 20.04
Hyperledger Cactus release version or commit (git rev-parse --short HEAD):
1.2.0 &
main
Hyperledger Cactus Plugins/Connectors Used
Additional context
The Fabric 2.x AIO image comes with go
v1.15.5
but some of the (apparently) auto-upgrading dependencies in chain code builds we have have started requiringv1.16.x
.The text was updated successfully, but these errors were encountered: