Skip to content
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(webpack): prod build chokes on upgraded ssh2 binaries #1405 #1406

Merged
merged 2 commits into from
Oct 4, 2021

Conversation

petermetz
Copy link
Contributor

This removes all webpack minified builds entirely. This has the
benefits of faster and stabler builds.
What we lose is efficiency of deployments in resource constrained
environments where the bundle size would make a difference but
the idea here is to crawl, walk and then run with having these
minified bundles enabled being the running part of the equation.

Root cause

If you update the yarn lock file to the latest & greatest it breaks the
webpack prod build at the moment with this beauty:

ERROR in ../../node_modules/ssh2/lib/protocol/crypto/build/Release/sshcrypto.node 1:0
Module parse failed: Unexpected character '' (1:0)
You may need an appropriate loader to handle this file type, currently no
loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
(Source code omitted for this binary file)
@ ../../node_modules/ssh2/lib/protocol/crypto.js 30:12-60
@ ../../node_modules/ssh2/lib/client.js 34:29-60
@ ../../node_modules/ssh2/lib/index.js 27:10-32
@ ../../node_modules/docker-modem/lib/ssh.js 1:13-35
@ ../../node_modules/docker-modem/lib/modem.js 6:8-24
@ ../../node_modules/dockerode/lib/docker.js 2:10-33
@ ./src/main/typescript/besu/besu-test-ledger.ts 8:36-56
@ ./src/main/typescript/public-api.ts 20:25-59
@ ./src/main/typescript/index.ts 13:13-36
To Reproduce

rm yarn.lock && yarn && yarn configure && yarn build

Fixes #1405

Signed-off-by: Peter Somogyvari peter.somogyvari@accenture.com

@petermetz petermetz added the bug Something isn't working label Oct 2, 2021
@petermetz petermetz added this to the v0.11.0 milestone Oct 2, 2021
@petermetz petermetz self-assigned this Oct 2, 2021
…-cacti#1405

This removes all webpack minified builds entirely. This has the
benefits of faster and stabler builds.
What we lose is efficiency of deployments in resource constrained
environments where the bundle size would make a difference but
the idea here is to crawl, walk and then run with having these
minified bundles enabled being the running part of the equation.

Root cause
==========

If you update the yarn lock file to the latest & greatest it breaks the
webpack prod build at the moment with this beauty:

ERROR in ../../node_modules/ssh2/lib/protocol/crypto/build/Release/sshcrypto.node 1:0
Module parse failed: Unexpected character '' (1:0)
You may need an appropriate loader to handle this file type, currently no
loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
(Source code omitted for this binary file)
 @ ../../node_modules/ssh2/lib/protocol/crypto.js 30:12-60
 @ ../../node_modules/ssh2/lib/client.js 34:29-60
 @ ../../node_modules/ssh2/lib/index.js 27:10-32
 @ ../../node_modules/docker-modem/lib/ssh.js 1:13-35
 @ ../../node_modules/docker-modem/lib/modem.js 6:8-24
 @ ../../node_modules/dockerode/lib/docker.js 2:10-33
 @ ./src/main/typescript/besu/besu-test-ledger.ts 8:36-56
 @ ./src/main/typescript/public-api.ts 20:25-59
 @ ./src/main/typescript/index.ts 13:13-36
To Reproduce

rm yarn.lock && yarn && yarn configure && yarn build

Fixes hyperledger-cacti#1405

Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
@codecov-commenter
Copy link

codecov-commenter commented Oct 3, 2021

Codecov Report

Merging #1406 (8efb048) into main (126450f) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #1406   +/-   ##
=======================================
  Coverage   70.39%   70.39%           
=======================================
  Files         302      302           
  Lines       10902    10902           
  Branches     1332     1332           
=======================================
  Hits         7674     7674           
  Misses       2526     2526           
  Partials      702      702           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 126450f...8efb048. Read the comment docs.

Copy link
Contributor

@jonathan-m-hamilton jonathan-m-hamilton left a comment

Choose a reason for hiding this comment

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

LGTM

@petermetz petermetz merged commit 18979fb into hyperledger-cacti:main Oct 4, 2021
@petermetz petermetz deleted the fix-1405 branch October 4, 2021 23:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

fix(webpack): prod build chokes on upgraded ssh2 binaries
4 participants