-
Notifications
You must be signed in to change notification settings - Fork 25.2k
Script for indexing micro benchmark results #128557
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Pinging @elastic/es-delivery (Team:Delivery) |
#!/bin/bash | ||
|
||
METRICS_HOST=$(vault read -field=es_host /secret/performance/employees/cloud/esbench-metrics) | ||
METRICS_INDEX_NAME="dummy-micro-benchmarks" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The index name is temporary and will be replaced with a data stream soon
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are Infra Vault paths. We need to copy the necessary fields into esbench-repo Elasticsearch repo location in CI Vault. I suggest to use micro-benchmarks
in the name of the secret. We will upate its contents (host, username, password) once this moves into "production". @breskeby Can you help with creating the necessary CI Vault secret?
I love it, but get someone who knows more about this to approve it for real. |
|
||
jq -c '.[]' "benchmarks/build/result.json" | while read -r doc; do | ||
curl -s -X POST "https://$METRICS_HOST/$METRICS_INDEX_NAME/_doc" \ | ||
-u "$METRICS_USERNAME:$METRICS_PASSWORD" \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we leak the credentials here to console log? @brianseeders
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It doesn't look like it, but the vault read
commands above need to happen inside of .buildkite/hooks/pre-command
. If they happen there, then they will get automatically redacted if they are accidentally printed.
Take a look at the other vault
commands in that script, there's a few different ways to do it. I usually prefer introducing an env var like USE_ES_BENCH_CREDENTIALS
. You can also do it based on something like the step label periodic-micro-benchmarks
, but then it will break if you rename the step.
@gbanasiak @idegtiarenko I've copied those credentials to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# Conflicts: # .buildkite/pipelines/periodic-micro-benchmarks.yml
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
This change adds a bash script that indexes micro benchmarks results into elasticsearch so that we could visualize them.