From 5271b592afe708d33fc4b3d08d9a2cc97ae0ddfc Mon Sep 17 00:00:00 2001 From: "James E. Blair" Date: Tue, 19 Feb 2019 14:58:25 -0800 Subject: [PATCH] Allow extra data in artifact schema validation The schema validator for zuul.artifacts returned via zuul_return did not allow for extra return data (outside of the zuul hierarchy). Correct the validator to allow that, and update the test to exercise it. Change-Id: Ia8d7ed212b03d978bec1a7de1a2647b0c87b7cf9 --- .../sql-driver/git/common-config/playbooks/project-test1.yaml | 2 ++ zuul/lib/artifacts.py | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/fixtures/config/sql-driver/git/common-config/playbooks/project-test1.yaml b/tests/fixtures/config/sql-driver/git/common-config/playbooks/project-test1.yaml index 38dfbeb181..2afa939013 100644 --- a/tests/fixtures/config/sql-driver/git/common-config/playbooks/project-test1.yaml +++ b/tests/fixtures/config/sql-driver/git/common-config/playbooks/project-test1.yaml @@ -3,6 +3,8 @@ - name: Return artifact data zuul_return: data: + something_else: + foo: bar zuul: artifacts: - name: relative diff --git a/zuul/lib/artifacts.py b/zuul/lib/artifacts.py index 592a7fc4fb..9bbb4694bf 100644 --- a/zuul/lib/artifacts.py +++ b/zuul/lib/artifacts.py @@ -26,7 +26,8 @@ zuul_data = { 'log_url': str, 'artifacts': [artifact], v.Extra: object, - } + }, + v.Extra: object, } artifact_schema = v.Schema(zuul_data)