-
Notifications
You must be signed in to change notification settings - Fork 285
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
fix(tools): fabric AIO fabric-samples v2.2.0 breaking change #632 #646
Merged
Conversation
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 commit is meant to make it much easier to debug issues with the Fabric 2.x AIO container image in the future when new bugs (inevitably) arise. Meaning that the logs of the child processess such as the fabric network creator script or the docker daemon will all be piped through to the logs of the container itself instead of just being dumped into log files under /var/log/... which has the upside of not having to shell into the container when something goes wrong and one wishes to debug what happened. Instead the logs of the container will show all the information right away. In addition to the above change a flag was added to the FabricTestLedger class' constructor options so that one can tell the class to dump the continer's log stream straight onto it's own logger meaning that now if you are debugging a test case you will be able to see all the logs that are being output straight in the logs of the test case itself. This can be very spammy at times, hence the flag that can be used to turn it on or off depending on what is needed more. One more small change that we made to help debugging: The supervisord config file now specifies the loglevel of supervisord as debug instead of info. Fixes hyperledger-cacti#643 Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
This method attempts (in a very resilient way) to free up docker resources by pruning first the containers, then the volumes, then the images and finally even the networks. It is NOT designed to be used on a local development machine since there it's usually preferred for the contributors to control how these things are done manually to ensure they do not prune anything that they don't wish to. What is this for then? It's been added specifically to be executed by integration tests that run in the CI environment where recently issues started popping up regarding the GitHub CI Action/Workflow VM having its disk full due to our usage of docker images (the AIO images are quite fat). So the idea is that tests can call this function before their own execution in an attempt to free up enough disk space for the upcoming tests to continue passing without having to bail out due to the disk being full. Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
Added a docker resource pruning call to the test case that was triggering the disk full issue while pulling the Fabric AIO image necessary for it's operation. It is expected that this error will crop up in the future with different test cases and if and when that happens we can add more of the same to those tests as well, but for now, I did not want to make this change to every single test case since it wasn't strictly necessary and a better solution may come along in the near future as well. Fixes hyperledger-cacti#641 Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
…ger-cacti#632 Primary change ============ Not sure how exactly, but the rug got pulled from under our image build despite it specifying all tags/versions for fabric explicitly. Suspicion right now is that the release tags were force pushed to something new which no longer supported the fabcar example chaincode that we were depending on. Evidence to the above is also that our old image works just fine that was built back in December 2020 (who knew 2020 was going to be the year we depend on for stability...) The fix itself: Migrated over the image to be compatible with the 2.x fabric-samples code which meant no more fabcar instead of which we now have the basic asset transfer chaincode that gets deployed by default and then also serves as the backbone for the healthchecks. Secondary/misc. changes ==================== Updated the README.md file of the fabric AIO image to state that it's using fabric-samples interanlly instead of a hand-rolled deployment (which is what we had in the very early phases of the Fabric AIO, but that's long gone by now so the README update was badly needed) Updated the example build commands to use DOCKER_BUILDKIT=1 where applicable because it is much faster than the old builder so people should probably use it. Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
petermetz
added
bug
Something isn't working
dependencies
Pull requests that update a dependency file
Developer_Experience
labels
Mar 10, 2021
petermetz
requested review from
kikoncuo,
sfuji822,
jonathan-m-hamilton and
takeutak
March 10, 2021 00:36
takeutak
approved these changes
Mar 11, 2021
🎉 Great news! Looks like all the dependencies have been resolved:
💡 To add or remove a dependency please update this issue/PR description. Brought to you by Dependent Issues (:robot: ). Happy coding! |
This was referenced Dec 6, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
bug
Something isn't working
dependencies
Pull requests that update a dependency file
Developer_Experience
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Depends on #644
Depends on #645
Fixes #632
Primary change
Not sure how exactly, but the rug got pulled from under our
image build despite it specifying all tags/versions for fabric
explicitly. Suspicion right now is that the release tags were force
pushed to something new which no longer supported the fabcar
example chaincode that we were depending on.
Evidence to the above is also that our old image works just fine
that was built back in December 2020 (who knew 2020 was
going to be the year we depend on for stability...)
The fix itself: Migrated over the image to be compatible with
the 2.x fabric-samples code which meant no more fabcar
instead of which we now have the basic asset transfer
chaincode that gets deployed by default and then also serves
as the backbone for the healthchecks.
Secondary/misc. changes
Updated the README.md file of the fabric AIO image to
state that it's using fabric-samples interanlly instead of
a hand-rolled deployment (which is what we had in the
very early phases of the Fabric AIO, but that's long gone
by now so the README update was badly needed)
Updated the example build commands to use DOCKER_BUILDKIT=1
where applicable because it is much faster
than the old builder so people should probably
use it.
Signed-off-by: Peter Somogyvari peter.somogyvari@accenture.com