epsagon/epsagon-node

Newest version [1.121.0] causing compatibility issues with pg library

mitch3x3 opened this issue · 3 comments

Yesterday on 03/16/2022 version 1.121.0 was published. This version introduced a compatibility issue between the epsagon package and the pg package.

The trace for this error is shown below:

{"errorType":"TypeError","errorMessage":"he.doesContainIgnoredKey is not a function","stack":["TypeError: he.doesContainIgnoredKey is not a function","    at /var/task/node_modules/epsagon/dist/bundle.js:1:156259","    at Array.some (<anonymous>)","    at Query.o (/var/task/node_modules/epsagon/dist/bundle.js:1:156248)","    at Query.handleReadyForQuery (/var/task/node_modules/pg/lib/query.js:138:12)","    at Client._handleReadyForQuery (/var/task/node_modules/pg/lib/client.js:290:19)","    at Connection.emit (events.js:314:20)","    at Connection.EventEmitter.emit (domain.js:483:12)","    at /var/task/node_modules/pg/lib/connection.js:114:12","    at Parser.parse (/var/task/node_modules/pg-protocol/dist/parser.js:40:17)","    at Socket.<anonymous> (/var/task/node_modules/pg-protocol/dist/index.js:11:42)"]}

We fixed this internally by downgrading epsagon back to version 1.120.2 and removing the ^ for epsagon in the package.json file so that this minor version was not upgraded to during the build process.

Edit: Here is the most recent commit compared with master. Offending line seems to be L450 in tracer.js

The line which calls the removed doesContainIgnoredKey is located here:

!tables.some(t => tracer.doesContainIgnoredKey(ignoredTables, t))

Thanks @mitch3x3 and @s0phr0syn3 ! We're rollbacking this version and republishing without the collision

arbiv commented

version 1.121.1 is released with rollback of the problematic commit.
Thanks for reporting this issue!