Repository: godaddy/kubernetes-external-secrets (js)

Issue:
2.2.0 killing container on SyntaxError
Not sure when exactly this is being thrown in the poller. But it's causing the container to constantly restart as well. Is anyone else running into this problem on 2.2.0? Make sure if you're using helm to install that you update the image to point to 2.2.0. it's currently pointing to 2.1.0.

```
SyntaxError: Unexpected token '%'
    at actualWrite (/app/node_modules/sonic-boom/index.js:242:3)
    at SonicBoom.write (/app/node_modules/sonic-boom/index.js:142:5)
    at Pino.write (/app/node_modules/pino/lib/proto.js:109:43)
    at Pino.LOG [as info] (/app/node_modules/pino/lib/tools.js:36:26)
    at Poller._poll (/app/lib/poller.js:110:18)
    at listOnTimeout (internal/timers.js:531:17)
    at processTimers (internal/timers.js:475:7)
npm info lifecycle kubernetes-external-secrets@2.2.0~start: Failed to exec start script
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! kubernetes-external-secrets@2.2.0 start: `./bin/daemon.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the kubernetes-external-secrets@2.2.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm timing npm Completed in 564066ms

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/node/.npm/_logs/2019-11-15T15_11_16_694Z-debug.log
```

Pull request:
fix: bump pino and sub dependency flatstr, fixes #218
fixes #218 

Patch:
diff --git a/lib/backends/kv-backend.js b/lib/backends/kv-backend.js
index e7820ca..7762e1d 100644
--- a/lib/backends/kv-backend.js
+++ b/lib/backends/kv-backend.js
@@ -60,7 +60,7 @@ class KVBackend extends AbstractBackend {
    */
   _fetchDataFromValues ({ dataFrom, specOptions }) {
     return Promise.all(dataFrom.map(async key => {
-      const value = await this._get({ key, specOptions })
+      const value = await this._get({ key, specOptions, keyOptions: {} })
 
       try {
         return JSON.parse(value)
diff --git a/package-lock.json b/package-lock.json
index b76e85c..05b551f 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -2471,14 +2471,14 @@
       "dev": true
     },
     "fast-redact": {
-      "version": "1.5.0",
-      "resolved": "https://registry.npmjs.org/fast-redact/-/fast-redact-1.5.0.tgz",
-      "integrity": "sha512-Afo61CgUjkzdvOKDHn08qnZ0kwck38AOGcMlvSGzvJbIab6soAP5rdoQayecGCDsD69AiF9vJBXyq31eoEO2tQ=="
+      "version": "2.0.0",
+      "resolved": "https://registry.npmjs.org/fast-redact/-/fast-redact-2.0.0.tgz",
+      "integrity": "sha512-zxpkULI9W9MNTK2sJ3BpPQrTEXFNESd2X6O1tXMFpK/XM0G5c5Rll2EVYZH2TqI3xRGK/VaJ+eEOt7pnENJpeA=="
     },
     "fast-safe-stringify": {
-      "version": "2.0.6",
-      "resolved": "https://registry.npmjs.org/fast-safe-stringify/-/fast-safe-stringify-2.0.6.tgz",
-      "integrity": "sha512-q8BZ89jjc+mz08rSxROs8VsrBBcn1SIw1kq9NjolL509tkABRk9io01RAjSaEv1Xb2uFLt8VtRiZbGp5H8iDtg=="
+      "version": "2.0.7",
+      "resolved": "https://registry.npmjs.org/fast-safe-stringify/-/fast-safe-stringify-2.0.7.tgz",
+      "integrity": "sha512-Utm6CdzT+6xsDk2m8S6uL8VHxNwI6Jub+e9NYTcAms28T84pTa25GJQV9j0CY0N1rM8hK4x6grpF2BQf+2qwVA=="
     },
     "figures": {
       "version": "2.0.0",
@@ -2626,9 +2626,9 @@
       }
     },
     "flatstr": {
-      "version": "1.0.9",
-      "resolved": "https://registry.npmjs.org/flatstr/-/flatstr-1.0.9.tgz",
-      "integrity": "sha512-qFlJnOBWDfIaunF54/lBqNKmXOI0HqNhu+mHkLmbaBXlS71PUd9OjFOdyevHt/aHoHB1+eW7eKHgRKOG5aHSpw=="
+      "version": "1.0.12",
+      "resolved": "https://registry.npmjs.org/flatstr/-/flatstr-1.0.12.tgz",
+      "integrity": "sha512-4zPxDyhCyiN2wIAtSLI6gc82/EjqZc1onI4Mz/l0pWrAlsSfYH/2ZIcU+e3oA2wDwbzIWNKwa23F8rh6+DRWkw=="
     },
     "flatted": {
       "version": "2.0.0",
@@ -5827,22 +5827,22 @@
       }
     },
     "pino": {
-      "version": "5.12.0",
-      "resolved": "https://registry.npmjs.org/pino/-/pino-5.12.0.tgz",
-      "integrity": "sha512-tXlxRVUuYrsS8jfmki3lennOcibfmGnloitY8Zn1HUMNNtOCiYH8ctQFdK+cg/7QmE2vEnfMNAIK8H3/hPBUQw==",
+      "version": "5.13.6",
+      "resolved": "https://registry.npmjs.org/pino/-/pino-5.13.6.tgz",
+      "integrity": "sha512-cYhvK4lopLnW/OtU3uRqBNsPiBt0Cdv97LGJg4yPGbGajlOjWWaODwD66q3Ynqnj6bSNw8HSofYcEOKZqh4Gcg==",
       "requires": {
-        "fast-redact": "^1.4.4",
-        "fast-safe-stringify": "^2.0.6",
-        "flatstr": "^1.0.9",
-        "pino-std-serializers": "^2.3.0",
-        "quick-format-unescaped": "^3.0.2",
-        "sonic-boom": "^0.7.3"
+        "fast-redact": "^2.0.0",
+        "fast-safe-stringify": "^2.0.7",
+        "flatstr": "^1.0.12",
+        "pino-std-serializers": "^2.4.2",
+        "quick-format-unescaped": "^3.0.3",
+        "sonic-boom": "^0.7.5"
       }
     },
     "pino-std-serializers": {
-      "version": "2.3.0",
-      "resolved": "https://registry.npmjs.org/pino-std-serializers/-/pino-std-serializers-2.3.0.tgz",
-      "integrity": "sha512-klfGoOsP6sJH7ON796G4xoUSx2fkpFgKHO4YVVO2zmz31jR+etzc/QzGJILaOIiCD6HTCFgkPx+XN8nk+ruqPw=="
+      "version": "2.4.2",
+      "resolved": "https://registry.npmjs.org/pino-std-serializers/-/pino-std-serializers-2.4.2.tgz",
+      "integrity": "sha512-WaL504dO8eGs+vrK+j4BuQQq6GLKeCCcHaMB2ItygzVURcL1CycwNEUHTD/lHFHs/NL5qAz2UKrjYWXKSf4aMQ=="
     },
     "pkg-dir": {
       "version": "2.0.0",
@@ -5992,9 +5992,9 @@
       "integrity": "sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA="
     },
     "quick-format-unescaped": {
-      "version": "3.0.2",
-      "resolved": "https://registry.npmjs.org/quick-format-unescaped/-/quick-format-unescaped-3.0.2.tgz",
-      "integrity": "sha512-FXTaCkwvpIlkdKeGDNgcq07SXWS383noQUuZjvdE1QcTt+eLuqof6/BDiEPqB59FWLie/l91+HtlJSw7iCViSA=="
+      "version": "3.0.3",
+      "resolved": "https://registry.npmjs.org/quick-format-unescaped/-/quick-format-unescaped-3.0.3.tgz",
+      "integrity": "sha512-dy1yjycmn9blucmJLXOfZDx1ikZJUi6E8bBZLnhPG5gBrVhHXx2xVyqqgKBubVNEXmx51dBACMHpoMQK/N/AXQ=="
     },
     "quick-lru": {
       "version": "1.1.0",
@@ -6686,11 +6686,11 @@
       }
     },
     "sonic-boom": {
-      "version": "0.7.3",
-      "resolved": "https://registry.npmjs.org/sonic-boom/-/sonic-boom-0.7.3.tgz",
-      "integrity": "sha512-A9EyoIeLD+g9vMLYQKjNCatJtAKdBQMW03+L8ZWWX/A6hq+srRCwdqHrBD1R8oSMLXov3oHN13dljtZf12q2Ow==",
+      "version": "0.7.6",
+      "resolved": "https://registry.npmjs.org/sonic-boom/-/sonic-boom-0.7.6.tgz",
+      "integrity": "sha512-k9E2QQ4zxuVRLDW+ZW6ISzJs3wlEorVdmM7ApDgor7wsGKSDG5YGHsGmgLY4XYh4DMlr/2ap2BWAE7yTFJtWnQ==",
       "requires": {
-        "flatstr": "^1.0.9"
+        "flatstr": "^1.0.12"
       }
     },
     "source-map": {
@@ -6805,7 +6805,7 @@
     },
     "sprintf-js": {
       "version": "1.0.3",
-      "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz",
+      "resolved": "http://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz",
       "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw="
     },
     "sshpk": {
diff --git a/package.json b/package.json
index 9be0dab..59b4617 100644
--- a/package.json
+++ b/package.json
@@ -38,7 +38,7 @@
     "lodash.merge": "^4.6.2",
     "make-promises-safe": "^5.0.0",
     "node-vault": "^0.9.8",
-    "pino": "^5.12.0",
+    "pino": "^5.13.6",
     "prom-client": "^11.5.3"
   },
   "devDependencies": {


Test patch:
diff --git a/lib/backends/kv-backend.test.js b/lib/backends/kv-backend.test.js
index 9f4b0eb..a0c5ee2 100644
--- a/lib/backends/kv-backend.test.js
+++ b/lib/backends/kv-backend.test.js
@@ -192,6 +192,7 @@ describe('kv-backend', () => {
 
       expect(kvBackend._get.getCall(0).args[0]).to.deep.equal({
         key: 'fakePropertyKey1',
+        keyOptions: {},
         specOptions: { passMeAlong: true }
       })
       expect(dataFromValues).deep.equals([undefined])
@@ -208,10 +209,12 @@ describe('kv-backend', () => {
 
       expect(kvBackend._get.getCall(0).args[0]).to.deep.equal({
         key: 'fakePropertyKey1',
+        keyOptions: {},
         specOptions: { roleArn: 'secretDescriptiorRole' }
       })
       expect(kvBackend._get.getCall(1).args[0]).to.deep.equal({
         key: 'fakePropertyKey2',
+        keyOptions: {},
         specOptions: { roleArn: 'secretDescriptiorRole' }
       })
       expect(dataFromValues).deep.equals([{ fakePropertyName1: 'fakePropertyValue1' }, { fakePropertyName2: 'fakePropertyValue2' }])