-
Notifications
You must be signed in to change notification settings - Fork 67
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
build(deps): bump @elastic/elasticsearch from 7.7.1 to 8.2.1 #158
Conversation
Almost there. Line 62 in 6deb633
Which is throwing |
Hi. I'm not a maintainer of In I also needed a tweak to docker-compose-v8.yml to get Elasticsearch to start using HTTP (as oppsed to HTTPS and auth). After those changes the tests passed for me:
Note that that took 32 seconds. Either there is some hang in the tests or it is intentional that there is a ~30s delay in there. I didn't look into which. diff --git a/docker-compose-v8.yml b/docker-compose-v8.yml
index 04e854a..f9d2be8 100644
--- a/docker-compose-v8.yml
+++ b/docker-compose-v8.yml
@@ -3,8 +3,11 @@ version: '3.8'
services:
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:8.3.3
- environment:
+ environment:
- discovery.type=single-node
+ # Elasticsearch 8.x has HTTPS and auth on by default. This option is
+ # needed to use HTTP and no auth (as used in the tests).
+ - xpack.security.enabled=false
container_name: elasticsearch
ports: ['9200:9200']
diff --git a/lib.js b/lib.js
index 79a6efa..87d9864 100644
--- a/lib.js
+++ b/lib.js
@@ -3,7 +3,7 @@
/* eslint no-prototype-builtins: 0 */
const split = require('split2')
-const { Client, Connection } = require('@elastic/elasticsearch')
+const { Client } = require('@elastic/elasticsearch')
function pinoElasticSearch (opts) {
if (opts['bulk-size']) {
@@ -54,13 +54,16 @@ function pinoElasticSearch (opts) {
return value
}, { autoDestroy: true })
- const client = new Client({
+ const clientOpts = {
node: opts.node,
auth: opts.auth,
cloud: opts.cloud,
- ssl: { rejectUnauthorized: opts.rejectUnauthorized },
- Connection: opts.Connection || Connection
- })
+ ssl: { rejectUnauthorized: opts.rejectUnauthorized }
+ }
+ if (opts.Connection) {
+ clientOpts.Connection = opts.Connection
+ }
+ const client = new Client(clientOpts)
const esVersion = Number(opts['es-version']) || 7
const index = opts.index || 'pino' Cheers. |
Oh, another consideration here.
and I notice this project still claims node v10 support:
So there might be something to consider there. |
closes #147