From 95cb50ab84cafeedc1acf1f1f06979f7959cec02 Mon Sep 17 00:00:00 2001 From: Josh Dover Date: Fri, 14 Aug 2020 07:32:08 -0600 Subject: [PATCH] Remove degraded state from ES status service (#75007) (#75014) --- src/core/server/elasticsearch/status.test.ts | 6 +++--- src/core/server/elasticsearch/status.ts | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/core/server/elasticsearch/status.test.ts b/src/core/server/elasticsearch/status.test.ts index ef7ca7cd04608..5dfadba4c88b2 100644 --- a/src/core/server/elasticsearch/status.test.ts +++ b/src/core/server/elasticsearch/status.test.ts @@ -65,7 +65,7 @@ describe('calculateStatus', () => { }); }); - it('changes to degraded when isCompatible and warningNodes present', async () => { + it('changes to available with a differemnt message when isCompatible and warningNodes present', async () => { expect( await calculateStatus$( of({ @@ -81,7 +81,7 @@ describe('calculateStatus', () => { .pipe(take(2)) .toPromise() ).toEqual({ - level: ServiceStatusLevels.degraded, + level: ServiceStatusLevels.available, summary: 'Some nodes are a different version', meta: { incompatibleNodes: [], @@ -188,7 +188,7 @@ describe('calculateStatus', () => { "summary": "Incompatible with Elasticsearch", }, Object { - "level": degraded, + "level": available, "meta": Object { "incompatibleNodes": Array [], "warningNodes": Array [ diff --git a/src/core/server/elasticsearch/status.ts b/src/core/server/elasticsearch/status.ts index 1eaa338af1239..1be32d03c60cb 100644 --- a/src/core/server/elasticsearch/status.ts +++ b/src/core/server/elasticsearch/status.ts @@ -55,7 +55,7 @@ export const calculateStatus$ = ( }; } else if (warningNodes.length > 0) { return { - level: ServiceStatusLevels.degraded, + level: ServiceStatusLevels.available, summary: // Message should always be present, but this is a safe fallback message ??