[QA] [Code Coverage] Doc update (#69204)

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
This commit is contained in:
Tre 2020-06-16 14:59:26 -06:00 committed by GitHub
parent 5c327a12dd
commit 885a42ca15
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 213 additions and 5 deletions

View file

@ -1,9 +1,12 @@
# Create index mapping
# Index Mapping
Execute the following in Kibana Dev Tools.
This is usually done in Kibana's dev tools ui.
```
"mappings" : {
PUT /kibana_code_coverage
{
"mappings" : {
"properties" : {
"@timestamp" : {
"type" : "date"
@ -189,6 +192,7 @@ This is usually done in Kibana's dev tools ui.
}
}
}
}
```
_The main portion of the above mapping, is the timestamp-date mapping._

View file

@ -1,7 +1,18 @@
# Convert Code Coverage Json Summary and Send to ES
# Massage and Ingest Code Coverage Json Summary and Send to ES
## Currently, we have 4 indexes
### 2 for the Code Coverage Job
https://kibana-ci.elastic.co/job/elastic+kibana+code-coverage/
1. kibana_code_coverage
2. kibana_total_code_coverage
### 2 for the R & D Job
https://kibana-ci.elastic.co/job/elastic+kibana+qa-research/
1. qa_research_code_coverage
2. qa_research_total_code_coverage
## How it works
It starts with this jenkins pipeline file:
@ -19,6 +30,6 @@ From there, an event stream is created, that massages the data to an output form
## Configuration
There is really only one config step.
The index [mapping](src/dev/code_coverage/ingest_coverage/index_mapping.md) for one of
The index [mapping](./code_coverage_job/kibana_code_coverage_index_mapping.md) for one of
of the indexes has to be manually created.
Currently, we just add it using Kibana's Dev Tools.

Binary file not shown.

After

Width:  |  Height:  |  Size: 810 KiB

View file

@ -0,0 +1,193 @@
```
PUT /qa_research_code_coverage
{
"mappings" : {
"properties" : {
"@timestamp" : {
"type" : "date"
},
"BUILD_ID" : {
"type" : "text",
"fields" : {
"keyword" : {
"type" : "keyword",
"ignore_above" : 256
}
}
},
"branches" : {
"properties" : {
"covered" : {
"type" : "long"
},
"pct" : {
"type" : "long"
},
"skipped" : {
"type" : "long"
},
"total" : {
"type" : "long"
}
}
},
"ciRunUrl" : {
"type" : "text",
"fields" : {
"keyword" : {
"type" : "keyword",
"ignore_above" : 256
}
}
},
"coveredFilePath" : {
"type" : "text",
"fields" : {
"keyword" : {
"type" : "keyword",
"ignore_above" : 256
}
}
},
"functions" : {
"properties" : {
"covered" : {
"type" : "long"
},
"pct" : {
"type" : "long"
},
"skipped" : {
"type" : "long"
},
"total" : {
"type" : "long"
}
}
},
"isTotal" : {
"type" : "boolean"
},
"jsonSummaryPath" : {
"type" : "text",
"fields" : {
"keyword" : {
"type" : "keyword",
"ignore_above" : 256
}
}
},
"lines" : {
"properties" : {
"covered" : {
"type" : "long"
},
"pct" : {
"type" : "long"
},
"skipped" : {
"type" : "long"
},
"total" : {
"type" : "long"
}
}
},
"path" : {
"type" : "text",
"fields" : {
"keyword" : {
"type" : "keyword",
"ignore_above" : 256
}
}
},
"statements" : {
"properties" : {
"covered" : {
"type" : "long"
},
"pct" : {
"type" : "long"
},
"skipped" : {
"type" : "long"
},
"total" : {
"type" : "long"
}
}
},
"staticSiteUrl" : {
"type" : "text",
"fields" : {
"keyword" : {
"type" : "keyword",
"ignore_above" : 256
}
}
},
"testRunnerType" : {
"type" : "text",
"fields" : {
"keyword" : {
"type" : "keyword",
"ignore_above" : 256
}
}
},
"vcs" : {
"properties" : {
"author" : {
"type" : "text",
"fields" : {
"keyword" : {
"type" : "keyword",
"ignore_above" : 256
}
}
},
"branch" : {
"type" : "text",
"fields" : {
"keyword" : {
"type" : "keyword",
"ignore_above" : 256
}
}
},
"commitMsg" : {
"type" : "text",
"fields" : {
"keyword" : {
"type" : "keyword",
"ignore_above" : 256
}
}
},
"sha" : {
"type" : "text",
"fields" : {
"keyword" : {
"type" : "keyword",
"ignore_above" : 256
}
}
},
"vcsUrl" : {
"type" : "text",
"fields" : {
"keyword" : {
"type" : "keyword",
"ignore_above" : 256
}
}
}
}
}
}
}
}
```
Execute the above in Kibana Dev Tools, eg: ![Index Mapping Screenshot](./put_qa_research_code_coverage_with_mapping.png "QA Research Code Coverage Index Mapping")