diff options
author | Zuul <zuul@review.opendev.org> | 2023-03-10 01:44:51 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2023-03-10 01:44:51 +0000 |
commit | 0d35927e2c0a010aae92b8f08997b036c318d55a (patch) | |
tree | ab06b0e86ada4a98506a41f1ea3b1de36f61cd43 | |
parent | d6d592f5a75d6ee50a67115230698501a5cd0b24 (diff) | |
parent | 8c6b87cfff410164c84a4db64ba58ff7fa31acf3 (diff) | |
download | zuul-0d35927e2c0a010aae92b8f08997b036c318d55a.tar.gz |
Merge "Elasticsearch: filter zuul data from job returned vars"
3 files changed, 11 insertions, 1 deletions
diff --git a/releasenotes/notes/elasticsearch-filter-zuul-returned-vars-4a883813481cc313.yaml b/releasenotes/notes/elasticsearch-filter-zuul-returned-vars-4a883813481cc313.yaml new file mode 100644 index 000000000..70b388b16 --- /dev/null +++ b/releasenotes/notes/elasticsearch-filter-zuul-returned-vars-4a883813481cc313.yaml @@ -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. diff --git a/tests/fixtures/config/elasticsearch-driver/git/common-config/playbooks/test.yaml b/tests/fixtures/config/elasticsearch-driver/git/common-config/playbooks/test.yaml index 75e5b6934..7902f19d0 100644 --- a/tests/fixtures/config/elasticsearch-driver/git/common-config/playbooks/test.yaml +++ b/tests/fixtures/config/elasticsearch-driver/git/common-config/playbooks/test.yaml @@ -2,4 +2,6 @@ tasks: - zuul_return: data: + zuul: + log_url: some-log-url foo: 'bar' diff --git a/zuul/driver/elasticsearch/reporter.py b/zuul/driver/elasticsearch/reporter.py index 7802cb609..e5e90e052 100644 --- a/zuul/driver/elasticsearch/reporter.py +++ b/zuul/driver/elasticsearch/reporter.py @@ -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) |