-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Uptime] Handle
mode: all
in uptime snapshot calculation (#41335)
Patching this function in #41210 fixed performance but was missing this filter clause. We depend on only processing summary info. This fixes errors around missing destructured data where we expect summary fields to be present.
- Loading branch information
Showing
31 changed files
with
5,383 additions
and
1,315 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
x-pack/test/api_integration/apis/uptime/graphql/expect_fixture_eql.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License; | ||
* you may not use this file except in compliance with the Elastic License. | ||
*/ | ||
|
||
import expect from '@kbn/expect'; | ||
import fs from 'fs'; | ||
import { join } from 'path'; | ||
|
||
const fixturesDir = join(__dirname, 'fixtures'); | ||
|
||
export const expectFixtureEql = (data: any, fixtureName: string) => { | ||
const fixturePath = join(fixturesDir, `${fixtureName}.json`); | ||
if (process.env.UPDATE_UPTIME_FIXTURES) { | ||
fs.writeFileSync(fixturePath, JSON.stringify(data, null, 2)); | ||
} | ||
const fixture = JSON.parse(fs.readFileSync(fixturePath, 'utf8')); | ||
expect(data).to.eql(fixture); | ||
}; |
2 changes: 1 addition & 1 deletion
2
x-pack/test/api_integration/apis/uptime/graphql/fixtures/doc_count.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
{ "statesIndexStatus": { "docCount": { "count": 9231 }, "indexExists": true } } | ||
{ "statesIndexStatus": { "docCount": { "count": 9234 }, "indexExists": true } } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,4 +11,4 @@ | |
"type": "io" | ||
} | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,4 +11,4 @@ | |
"type": "io" | ||
} | ||
] | ||
} | ||
} |
Oops, something went wrong.