Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| af385f0bac | |||
| 02c5b8664e | |||
| 63cd655e79 | |||
| 11a5711409 | |||
| 3f01fafd9e | |||
| cca9a7b212 |
@ -1,6 +1,6 @@
|
||||
---
|
||||
STACK_VERSION:
|
||||
- "7.17.11-SNAPSHOT"
|
||||
- "7.17.12-SNAPSHOT"
|
||||
|
||||
NODE_JS_VERSION:
|
||||
- 16
|
||||
|
||||
@ -1,6 +1,35 @@
|
||||
[[changelog-client]]
|
||||
== Release notes
|
||||
|
||||
[discrete]
|
||||
=== 7.17.13
|
||||
|
||||
[discrete]
|
||||
==== Fixes
|
||||
|
||||
Fixes a bug where newly-added nodes that don't have HTTP information yet should be skipped during sniffing, to prevent an unexpected `TypeError`. https://github.com/elastic/elasticsearch-js/issues/1230[#1230]
|
||||
|
||||
[discrete]
|
||||
=== 7.17.12
|
||||
|
||||
[discrete]
|
||||
==== Notes
|
||||
|
||||
This is the first 7.x release where patch versions of the client will no longer (intentionally) align with patch versions of Elasticsearch. The latest patch release of the client will always be compatible with the corresponding minor release of Elasticsearch.
|
||||
|
||||
[discrete]
|
||||
==== Fixes
|
||||
|
||||
[discrete]
|
||||
===== TypeScript build failure
|
||||
|
||||
Fixes a type declaration bug that caused TypeScript builds to fail. https://github.com/elastic/elasticsearch-js/pull/1927[#1927]
|
||||
|
||||
[discrete]
|
||||
===== Add TypeScript type declarations to exports
|
||||
|
||||
Adds TypeScript type declarations file to package.json `exports` https://github.com/elastic/elasticsearch-js/pull/1930[#1930]
|
||||
|
||||
[discrete]
|
||||
=== 7.17.11
|
||||
|
||||
@ -54,7 +83,6 @@ https://www.elastic.co/guide/en/elasticsearch/reference/7.16/release-notes-7.16.
|
||||
[discrete]
|
||||
===== Fixed export field deprecation log https://github.com/elastic/elasticsearch-js/pull/1593#[#1593]
|
||||
|
||||
|
||||
[discrete]
|
||||
=== 7.15.0
|
||||
|
||||
@ -70,7 +98,7 @@ https://www.elastic.co/guide/en/elasticsearch/reference/7.15/release-notes-7.15.
|
||||
[discrete]
|
||||
===== Support mapbox content type https://github.com/elastic/elasticsearch-js/pull/1500[#1500]
|
||||
|
||||
If you call an API that returns a mapbox conten type, the response body will be a buffer.
|
||||
If you call an API that returns a mapbox content type, the response body will be a buffer.
|
||||
|
||||
[discrete]
|
||||
===== Support CA fingerprint validation https://github.com/elastic/elasticsearch-js/pull/1499[#1499]
|
||||
|
||||
@ -206,6 +206,10 @@ class BaseConnectionPool {
|
||||
|
||||
for (let i = 0, len = ids.length; i < len; i++) {
|
||||
const node = nodes[ids[i]]
|
||||
|
||||
// newly-added nodes do not have http assigned yet, so skip
|
||||
if (node.http === undefined) continue
|
||||
|
||||
// If there is no protocol in
|
||||
// the `publish_address` new URL will throw
|
||||
// the publish_address can have two forms:
|
||||
|
||||
@ -6,13 +6,14 @@
|
||||
"exports": {
|
||||
".": {
|
||||
"require": "./index.js",
|
||||
"import": "./index.mjs"
|
||||
"import": "./index.mjs",
|
||||
"types": "./index.d.ts"
|
||||
},
|
||||
"./*": "./*.js"
|
||||
},
|
||||
"homepage": "http://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/index.html",
|
||||
"version": "7.17.11-patch.1",
|
||||
"versionCanary": "7.17.11-canary.2",
|
||||
"version": "7.17.13",
|
||||
"versionCanary": "7.17.13-canary.1",
|
||||
"keywords": [
|
||||
"elasticsearch",
|
||||
"elastic",
|
||||
|
||||
@ -313,6 +313,36 @@ test('API', t => {
|
||||
t.end()
|
||||
})
|
||||
|
||||
t.test('Should skip nodes that do not have an http property yet', t => {
|
||||
const pool = new BaseConnectionPool({ Connection })
|
||||
const nodes = {
|
||||
a1: {
|
||||
http: {
|
||||
publish_address: '127.0.0.1:9200'
|
||||
},
|
||||
roles: ['master', 'data', 'ingest']
|
||||
},
|
||||
a2: {
|
||||
roles: ['master', 'data', 'ingest']
|
||||
}
|
||||
}
|
||||
|
||||
t.same(pool.nodesToHost(nodes, 'http:'), [{
|
||||
url: new URL('http://127.0.0.1:9200'),
|
||||
id: 'a1',
|
||||
roles: {
|
||||
master: true,
|
||||
data: true,
|
||||
ingest: true,
|
||||
ml: false
|
||||
}
|
||||
}])
|
||||
|
||||
t.equal(pool.nodesToHost(nodes, 'http:').length, 1)
|
||||
t.equal(pool.nodesToHost(nodes, 'http:')[0].url.host, '127.0.0.1:9200')
|
||||
t.end()
|
||||
})
|
||||
|
||||
t.end()
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user