From cdfa7a2a8a92c7d488e69c4e42426207263f8e1e Mon Sep 17 00:00:00 2001 From: Laura Trotta <153528055+l-trotta@users.noreply.github.com> Date: Mon, 30 Jun 2025 17:11:20 +0200 Subject: [PATCH] Fixing nodes info response (#4636) * fix node info res * Update specification/nodes/info/types.ts Co-authored-by: Quentin Pradet * address review --------- Co-authored-by: Quentin Pradet (cherry picked from commit 36e78a1c9fe6b599ca29dc022d61da2d3fda54dd) --- specification/nodes/info/types.ts | 35 +++++++++++++++++-------------- 1 file changed, 19 insertions(+), 16 deletions(-) diff --git a/specification/nodes/info/types.ts b/specification/nodes/info/types.ts index 43658aff0e..7c4473a4dc 100644 --- a/specification/nodes/info/types.ts +++ b/specification/nodes/info/types.ts @@ -17,7 +17,7 @@ * under the License. */ -import { ByteSize, Name, VersionString } from '@_types/common' +import { ByteSize, Name, VersionNumber, VersionString } from '@_types/common' import { Host, Ip, TransportAddress } from '@_types/Networking' import { NodeRoles } from '@_types/Node' import { integer, long } from '@_types/Numeric' @@ -26,6 +26,7 @@ import { Duration, DurationValue, EpochTime, UnitMillis } from '@_types/Time' import { IndexRouting } from '@indices/_types/IndexRouting' import { AdditionalProperties } from '@spec_utils/behaviors' import { Dictionary } from '@spec_utils/Dictionary' +import { Stringified } from '@spec_utils/Stringified' import { UserDefinedValue } from '@spec_utils/UserDefinedValue' export class NodeInfo { @@ -34,15 +35,16 @@ export class NodeInfo { /** Short hash of the last git commit in this release. */ build_hash: string build_type: string + component_versions: Dictionary /** The node’s host name. */ host: Host http?: NodeInfoHttp + index_version: VersionNumber /** The node’s IP address. */ ip: Ip jvm?: NodeJvmInfo /** The node's name */ name: Name - network?: NodeInfoNetwork os?: NodeOperatingSystemInfo plugins?: PluginStats[] process?: NodeProcessInfo @@ -59,11 +61,19 @@ export class NodeInfo { transport?: NodeInfoTransport /** Host and port where transport HTTP connections are accepted. */ transport_address: TransportAddress + transport_version: VersionNumber + /** Elasticsearch version running on this node. */ version: VersionString modules?: PluginStats[] ingest?: NodeInfoIngest aggregations?: Dictionary + remote_cluster_server?: RemoveClusterServer +} + +export class RemoveClusterServer { + bound_address: TransportAddress[] + publish_address: TransportAddress } export class NodeInfoSettings { @@ -133,7 +143,7 @@ export class NodeInfoSettingsCluster { name: Name routing?: IndexRouting election: NodeInfoSettingsClusterElection - initial_master_nodes?: string[] + initial_master_nodes?: string[] | string /** * @availability stack since=7.16.0 * @availability serverless @@ -176,7 +186,7 @@ export class NodeInfoRepositoriesUrl { export class NodeInfoDiscover implements AdditionalProperties { - seed_hosts?: string[] + seed_hosts?: string[] | string type?: string seed_providers?: string[] } @@ -209,6 +219,11 @@ export class NodeInfoSettingsTransport { type: NodeInfoSettingsTransportType 'type.default'?: string // TODO this clashes with NodeInfoSettingsTransportType features?: NodeInfoSettingsTransportFeatures + /** + * Only used in unit tests + * @availability stack visibility=private + * */ + ignore_deserialization_errors?: Stringified } /** @shortcut_property default */ @@ -333,17 +348,6 @@ export class NodeInfoMemory { total_in_bytes: long } -export class NodeInfoNetwork { - primary_interface: NodeInfoNetworkInterface - refresh_interval: integer -} - -export class NodeInfoNetworkInterface { - address: string - mac_address: string - name: Name -} - export class NodeInfoOSCPU { cache_size: string cache_size_in_bytes: integer @@ -371,7 +375,6 @@ export class NodeJvmInfo { vm_name: Name vm_vendor: string vm_version: VersionString - /** @aliases bundled_jdk */ using_bundled_jdk: boolean using_compressed_ordinary_object_pointers?: boolean | string input_arguments: string[]