Elasticsearch: filter zuul data from job returned vars
Remove data under the `zuul` key from the job returned vars. These returned values are meant to be used only by Zuul and shouldn't be included in documents as it may include large amount of data such as file comments. Change-Id: Ie6de7e3373b21b7c234ffedd5db7d3ca5a0645b6
This commit is contained in:
parent
20e89b83cc
commit
8c6b87cfff
@ -0,0 +1,6 @@
|
||||
---
|
||||
deprecations:
|
||||
- |
|
||||
The Elasticsearch reporter now filters `zuul` data from the job returned vars.
|
||||
The job returned vars under the `zuul` key are meant for Zuul and may include large
|
||||
amount of data such as file comments.
|
@ -2,4 +2,6 @@
|
||||
tasks:
|
||||
- zuul_return:
|
||||
data:
|
||||
zuul:
|
||||
log_url: some-log-url
|
||||
foo: 'bar'
|
||||
|
@ -103,7 +103,9 @@ class ElasticsearchReporter(BaseReporter):
|
||||
build_doc['job_vars'] = job.variables
|
||||
|
||||
if self.index_returned_vars:
|
||||
build_doc['job_returned_vars'] = build.result_data
|
||||
rdata = build.result_data.copy()
|
||||
rdata.pop('zuul', None)
|
||||
build_doc['job_returned_vars'] = rdata
|
||||
|
||||
docs.append(build_doc)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user