Skip to content

Commit 93fb1a4

Browse files
committed
Fix index
1 parent ca195db commit 93fb1a4

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

.buildkite/scripts/steps/test/ftr_configs.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,9 @@ fi
4747
failedConfigs=""
4848
results=()
4949

50+
echo "--- Test checking for existing scout event for config x-pack/solutions/observability/test/serverless/functional/configs/config.logs_essentials.ts"
51+
node scripts/scout check-event --buildNumber 348122 --testConfig "x-pack/solutions/observability/test/serverless/functional/configs/config.logs_essentials.ts" --dontFailOnError
52+
5053
while read -r config; do
5154
if [[ ! "$config" ]]; then
5255
continue;

src/platform/packages/private/kbn-scout-reporting/src/cli/check_event.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import {
1212
SCOUT_REPORTER_ES_URL,
1313
SCOUT_REPORTER_ES_API_KEY,
1414
SCOUT_REPORTER_ES_VERIFY_CERTS,
15+
SCOUT_TEST_EVENTS_DATA_STREAM_NAME,
1516
} from '@kbn/scout-info';
1617
import { getValidatedESClient } from '../helpers/elasticsearch';
1718

@@ -59,11 +60,9 @@ export const checkEventCommand: Command<void> = {
5960

6061
log.info(`Checking for event with buildNumber: ${buildNumber} and testConfig: ${testConfig}`);
6162

62-
const indexName = '.ds-scout-events-v1-*-*';
63-
6463
try {
65-
log.info(`Refreshing index ${indexName}`);
66-
await es.indices.refresh({ index: indexName });
64+
log.info(`Index ${SCOUT_TEST_EVENTS_DATA_STREAM_NAME}`);
65+
// await es.indices.refresh({ index: indexName });
6766

6867
log.info(
6968
`Query: ${JSON.stringify(
@@ -90,7 +89,7 @@ export const checkEventCommand: Command<void> = {
9089
)}`
9190
);
9291
const result = await es.search({
93-
index: indexName,
92+
index: SCOUT_TEST_EVENTS_DATA_STREAM_NAME,
9493
query: {
9594
bool: {
9695
filter: [
@@ -111,6 +110,7 @@ export const checkEventCommand: Command<void> = {
111110
},
112111
});
113112

113+
console.log('Search result:', JSON.stringify(result, null, 2));
114114
if ((result.hits.total as any).value > 0) {
115115
log.success('Event found!');
116116
} else {

0 commit comments

Comments
 (0)