)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":9311,"name":"Tristan Cacqueray","email":"tdecacqu@redhat.com","username":"tristanC"},"change_message_id":"e02d1a1d599b975170a59f4c8bbc476dfa724a05","unresolved":false,"context_lines":[{"line_number":28,"context_line":"          parent: base-windows"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"This will expand to the jobs:"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"- tox-py37-linux"},{"line_number":33,"context_line":"- tox-py38-linux"},{"line_number":34,"context_line":"- tox-py37-windows"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"3fa7e38b_1442953d","line":31,"updated":"2020-02-19 12:42:39.000000000","message":"I think the expansion needs to be well defined. iiuc, matrix attributes are recursively merged. what about list attributes, are they replaced or extented?","commit_id":"9999ba5904c76f0de08ea27acd493bab2e36d9e3"},{"author":{"_account_id":27582,"name":"Simon Westphahl","email":"simon.westphahl@bmw.de","username":"simon.westphahl"},"change_message_id":"e99e7ddd9e91b747bf5b4de13236f7fa8fd5ebc7","unresolved":false,"context_lines":[{"line_number":28,"context_line":"          parent: base-windows"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"This will expand to the jobs:"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"- tox-py37-linux"},{"line_number":33,"context_line":"- tox-py38-linux"},{"line_number":34,"context_line":"- tox-py37-windows"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"3fa7e38b_9453e56e","line":31,"in_reply_to":"3fa7e38b_144055a3","updated":"2020-02-19 13:17:38.000000000","message":"Maybe it shouldn\u0027t be called \u0027matrix jobs\u0027 as this is more of a config meta-programming :)","commit_id":"9999ba5904c76f0de08ea27acd493bab2e36d9e3"},{"author":{"_account_id":27582,"name":"Simon Westphahl","email":"simon.westphahl@bmw.de","username":"simon.westphahl"},"change_message_id":"411fca5e8d41d260f6b2f89753b80906b1cd23f2","unresolved":false,"context_lines":[{"line_number":28,"context_line":"          parent: base-windows"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"This will expand to the jobs:"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"- tox-py37-linux"},{"line_number":33,"context_line":"- tox-py38-linux"},{"line_number":34,"context_line":"- tox-py37-windows"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"3fa7e38b_144055a3","line":31,"in_reply_to":"3fa7e38b_1442953d","updated":"2020-02-19 13:13:41.000000000","message":"There is no merging. Those matrix attributes will shadow what\u0027s defined on the job itself. But since we are expanding this to distinct jobs during config loading they will behave the same as if defined separately.\n\nE.g. fully expanded the jobs look like:\n\n\t- job:\n\t    name: tox-py37-linux\n\t    parent: base\n\t    vars:\n\t      python_version: python3.7\n\n\t- job:\n\t    name: tox-py37-windows\n\t    parent: base-windows\n\t    vars:\n\t      python_version: python3.7\n\n\t- job:\n\t    name: tox-py38-linux\n\t    parent: base\n\t    vars:\n\t      python_version: python3.8\n\n\t- job:\n\t    name: tox-py38-windows\n\t    parent: base-windows\n\t    vars:\n\t      python_version: python3.8","commit_id":"9999ba5904c76f0de08ea27acd493bab2e36d9e3"},{"author":{"_account_id":27582,"name":"Simon Westphahl","email":"simon.westphahl@bmw.de","username":"simon.westphahl"},"change_message_id":"b4d97f401e07c75d7649fe1b11f9c2be9233e35e","unresolved":false,"context_lines":[{"line_number":28,"context_line":"          parent: base-windows"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"This will expand to the jobs:"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"- tox-py37-linux"},{"line_number":33,"context_line":"- tox-py38-linux"},{"line_number":34,"context_line":"- tox-py37-windows"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"3fa7e38b_9a86af5f","line":31,"in_reply_to":"3fa7e38b_9453e56e","updated":"2020-02-19 13:39:53.000000000","message":"I think what we need to define is how those \u0027matrix\u0027 attributes will behave in case there is a collision of some sort.\n\nE.g. what happens in case of a job like:\n\n    - job:\n\tname: {foo,bar}-{x,y}\n\tmatrix:\n\t  foo:\n\t    parent: foo\n\t  bar:\n\t    parent: bar\n\t  x:\n\t    parent: foo\n\t  y:\n\t    parent: bar\n\nMaybe that\u0027s what you meant?","commit_id":"9999ba5904c76f0de08ea27acd493bab2e36d9e3"},{"author":{"_account_id":27582,"name":"Simon Westphahl","email":"simon.westphahl@bmw.de","username":"simon.westphahl"},"change_message_id":"a18ce9556fc56fb1812c743513e05fa516778c9f","unresolved":false,"context_lines":[{"line_number":28,"context_line":"          parent: base-windows"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"This will expand to the jobs:"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"- tox-py37-linux"},{"line_number":33,"context_line":"- tox-py38-linux"},{"line_number":34,"context_line":"- tox-py37-windows"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"3fa7e38b_1a3e3f8a","line":31,"in_reply_to":"3fa7e38b_9a86af5f","updated":"2020-02-19 13:43:26.000000000","message":"... and yes, we probably have to merge e.g. the vars so we have the same behavior as with normal job inheritance. Thanks for the input!","commit_id":"9999ba5904c76f0de08ea27acd493bab2e36d9e3"},{"author":{"_account_id":9311,"name":"Tristan Cacqueray","email":"tdecacqu@redhat.com","username":"tristanC"},"change_message_id":"526574007b89aa3e15b3aff31a6a2f2232e4cd65","unresolved":false,"context_lines":[{"line_number":28,"context_line":"          parent: base-windows"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"This will expand to the jobs:"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"- tox-py37-linux"},{"line_number":33,"context_line":"- tox-py38-linux"},{"line_number":34,"context_line":"- tox-py37-windows"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"3fa7e38b_7a65f3af","line":31,"in_reply_to":"3fa7e38b_9a86af5f","updated":"2020-02-19 13:45:41.000000000","message":"Yes, or even:\n\n  - job:\n      name: {foo,bar}\n      matrix:\n        foo:\n          vars:\n            list: [42]\n            nested:\n              value: 1\n        bar:\n          vars:\n            list: [43]\n            nested:\n              other: value","commit_id":"9999ba5904c76f0de08ea27acd493bab2e36d9e3"}],"tests/unit/test_model.py":[{"author":{"_account_id":9311,"name":"Tristan Cacqueray","email":"tdecacqu@redhat.com","username":"tristanC"},"change_message_id":"c09bc656165fd373bab2a779b8a942d20df1f8e7","unresolved":false,"context_lines":[{"line_number":346,"context_line":"        jobs \u003d self.pcontext.job_parser.fromYaml({"},{"line_number":347,"context_line":"            \u0027_source_context\u0027: self.context,"},{"line_number":348,"context_line":"            \u0027_start_mark\u0027: self.start_mark,"},{"line_number":349,"context_line":"            \u0027name\u0027: \u0027job-{py37,py38}-{linux,windows}\u0027,"},{"line_number":350,"context_line":"            \u0027parent\u0027: None,"},{"line_number":351,"context_line":"            \u0027matrix\u0027: {"},{"line_number":352,"context_line":"                \"py37\": {"}],"source_content_type":"text/x-python","patch_set":1,"id":"3fa7e38b_b97ffcdc","line":349,"range":{"start_line":349,"start_character":38,"end_line":349,"end_character":43},"updated":"2020-02-19 12:39:15.000000000","message":"what\u0027s the expected behavior for the `linux` part, is it implicitly linux because of the default parent? I worry this can be abused (e.g. job changing behavior because of their name), and perhaps un-declared part in the matrix should raise an exception.","commit_id":"9999ba5904c76f0de08ea27acd493bab2e36d9e3"},{"author":{"_account_id":27582,"name":"Simon Westphahl","email":"simon.westphahl@bmw.de","username":"simon.westphahl"},"change_message_id":"411fca5e8d41d260f6b2f89753b80906b1cd23f2","unresolved":false,"context_lines":[{"line_number":346,"context_line":"        jobs \u003d self.pcontext.job_parser.fromYaml({"},{"line_number":347,"context_line":"            \u0027_source_context\u0027: self.context,"},{"line_number":348,"context_line":"            \u0027_start_mark\u0027: self.start_mark,"},{"line_number":349,"context_line":"            \u0027name\u0027: \u0027job-{py37,py38}-{linux,windows}\u0027,"},{"line_number":350,"context_line":"            \u0027parent\u0027: None,"},{"line_number":351,"context_line":"            \u0027matrix\u0027: {"},{"line_number":352,"context_line":"                \"py37\": {"}],"source_content_type":"text/x-python","patch_set":1,"id":"3fa7e38b_f48b3913","line":349,"range":{"start_line":349,"start_character":38,"end_line":349,"end_character":43},"in_reply_to":"3fa7e38b_b97ffcdc","updated":"2020-02-19 13:13:41.000000000","message":"The \u0027linux\u0027 part just doesn\u0027t have any overrides (and I think that\u0027s a legit use-case). Not quite sure what you have in mind regarding abuse of this feature. Worst thing that can happen is that there is another job variant (e.g. when there is already a job \"job-py37-linux\").","commit_id":"9999ba5904c76f0de08ea27acd493bab2e36d9e3"},{"author":{"_account_id":9311,"name":"Tristan Cacqueray","email":"tdecacqu@redhat.com","username":"tristanC"},"change_message_id":"6e48585d3eac2f6ef8d60d1de8f9c37ef2a67e81","unresolved":false,"context_lines":[{"line_number":346,"context_line":"        jobs \u003d self.pcontext.job_parser.fromYaml({"},{"line_number":347,"context_line":"            \u0027_source_context\u0027: self.context,"},{"line_number":348,"context_line":"            \u0027_start_mark\u0027: self.start_mark,"},{"line_number":349,"context_line":"            \u0027name\u0027: \u0027job-{py37,py38}-{linux,windows}\u0027,"},{"line_number":350,"context_line":"            \u0027parent\u0027: None,"},{"line_number":351,"context_line":"            \u0027matrix\u0027: {"},{"line_number":352,"context_line":"                \"py37\": {"}],"source_content_type":"text/x-python","patch_set":1,"id":"3fa7e38b_9432050e","line":349,"range":{"start_line":349,"start_character":38,"end_line":349,"end_character":43},"in_reply_to":"3fa7e38b_f48b3913","updated":"2020-02-19 13:30:44.000000000","message":"I meant, user might be tempted to just define an empty matrix \u0027job-{arch1,arch2}-{version1,version2,...}\u0027 and do the switch logic in the job playbook, e.g. \u0027{% if \u0027arch1\u0027 in zuul.job %}\u0027","commit_id":"9999ba5904c76f0de08ea27acd493bab2e36d9e3"}],"zuul/configloader.py":[{"author":{"_account_id":27582,"name":"Simon Westphahl","email":"simon.westphahl@bmw.de","username":"simon.westphahl"},"change_message_id":"15a9518fae65ead0dc33b12a81d2831689c160b7","unresolved":false,"context_lines":[{"line_number":684,"context_line":"        job_axes \u003d list(itertools.product(*(a for a in axes if a)))"},{"line_number":685,"context_line":"        parts \u003d [a or [t] for a, t in zip(axes, tokens)]"},{"line_number":686,"context_line":"        return [MatrixJob(\"\".join(n), a) for n, a in"},{"line_number":687,"context_line":"                zip(itertools.product(*parts), job_axes)]"},{"line_number":688,"context_line":""},{"line_number":689,"context_line":"    def fromYaml(self, conf, project_pipeline\u003dFalse, name\u003dNone,"},{"line_number":690,"context_line":"                 validate\u003dTrue):"}],"source_content_type":"text/x-python","patch_set":1,"id":"3fa7e38b_1989706f","line":687,"updated":"2020-02-19 11:48:57.000000000","message":"I know this is pretty dense code, but this is mainly to kick off the discussion around this feature.","commit_id":"9999ba5904c76f0de08ea27acd493bab2e36d9e3"}]}
