Circular dependency warnings on Node 14
jerico opened this issue · comments
Tachyon currently has dependency on aws-xray-sdk-core@2.4.0 which depends on winston@2.4.4 which has an issue on node 14: winstonjs/winston#1797
│ Human Made Tachyon in node
│ git+https://github.com/humanmade/node-tachyon.git
│ https://github.com/humanmade/node-tachyon#readme
└─┬ aws-xray-sdk-core@2.4.0
│ AWS X-Ray SDK for Javascript
│ https://github.com/aws/aws-xray-sdk-node/tree/master/packages/core
└── winston@2.4.4
A multi-transport async logging library for Node.js
git+https://github.com/winstonjs/winston.git
https://github.com/winstonjs/winston#readme
Winston throws out (node:26972) Warning: Accessing non-existent property 'padLevels' of module exports inside circular dependency
which is logged as an error in AWS Lambda (and trigger alarms if there are set in CloudWatch).
Later version of aws-xray-sdk-node
removes dependency on winston
which should resolve this issue.
Acceptance Criteria
-
aws-xray-sdk-node
has to be updated to the latest version that supports Node 14.x - Code that uses
aws-xray-sdk-node
still works as expected
Hey team! Please add your planning poker estimate with ZenHub @kovshenin @ferschubert-hm @wisyhambolu @mikelittle
@ferschubert-hm @mikelittle we've estimated this one to 3SP and moved it to the Backlog
TESTING - I tested using the below method
- Created a new Altis project in local-server named
tachyon-test
- Tested the current version of tachyon to confirm the warning by uploading an image
random-picture-2.jpg
and requesting the image usinghttps://tachyon-test.altis.dev/tachyon/2022/07/random-picture-2.jpg?w=300&h=800
which returned the below circular dependency warning. Subsequent requests did not return this warning though.
- Made the necessary dependency changes to
package.json
file - Ran
composer update
- Built the docker image with the command
docker build -t humanmade/tachyon:v2.6.0 --build-arg DEBUG=1 -f Dockerfile.multiarch .
- Replaced
'image' => 'humanmade/tachyon:v2.4.0',
with'image' => 'humanmade/tachyon:v2.6.0',
in the file./tachyon-test/vendor/altis/local-server/inc/composer/class-docker-compose-generator.php
to test the update image. - Ran
composer server stop tachyon
and thencomposer server start tachyon
to recreate the container with the new image. - Tested the updated version
2.6.0
by requesting the image usinghttps://tachyon-test.altis.dev/tachyon/2022/07/random-picture-2.jpg
with different arguments and this didn't return the circular dependency warning or any other warnings/errors.
After this PR is reviewed and merged, I'll push the docker image version 2.6.0
to docker hub.
Created new release v2.6.1 for Tachyon which in turn created a v2.6.1 image on dockerhub
Created new release v2.6.1 for Tachyon which in turn created a v2.6.1 image on dockerhub