Skip to content

Commit

Permalink
Remove degraded state from ES status service (elastic#75007)
Browse files Browse the repository at this point in the history
  • Loading branch information
joshdover committed Aug 14, 2020
1 parent b00307c commit af09b30
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/core/server/elasticsearch/status.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand All @@ -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: [],
Expand Down Expand Up @@ -188,7 +188,7 @@ describe('calculateStatus', () => {
"summary": "Incompatible with Elasticsearch",
},
Object {
"level": degraded,
"level": available,
"meta": Object {
"incompatibleNodes": Array [],
"warningNodes": Array [
Expand Down
2 changes: 1 addition & 1 deletion src/core/server/elasticsearch/status.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 ??
Expand Down

0 comments on commit af09b30

Please sign in to comment.