)]}'
{"doc/source/reference/job_def.rst":[{"author":{"_account_id":1,"name":"James E. Blair","email":"jim@acmegating.com","username":"corvus"},"change_message_id":"a5117dd8950dbe6570aa2d578b92ab5aa4784a87","unresolved":false,"context_lines":[{"line_number":777,"context_line":""},{"line_number":778,"context_line":"      If a tag item is enqueued, we look up the branches which contain"},{"line_number":779,"context_line":"      the commit referenced by the tag.  If any of those branches match a"},{"line_number":780,"context_line":"      branch matcher, the matcher is considered to have matched."},{"line_number":781,"context_line":""},{"line_number":782,"context_line":"      This example illustrates a job called *run-tests* which uses a"},{"line_number":783,"context_line":"      nodeset based on the current release of an operating system to"}],"source_content_type":"text/x-rst","patch_set":18,"id":"1fa4df85_f38653b9","line":780,"updated":"2020-03-06 18:56:23.000000000","message":"Maybe?  I\u0027m not sure how important they will ultimately be.  This is, at least, a concise description of what will happen, and the results of individual circumstances can be predicted from it.  Maybe we should see if there are situations that come up and are particularly confusing and add them as notes?  But otherwise, I\u0027m not sure I want to overdo it on this.","commit_id":"73cf7cd373e80aec1b9efd3b9853b308be5b41c5"},{"author":{"_account_id":4146,"name":"Clark Boylan","email":"cboylan@sapwetik.org","username":"cboylan"},"change_message_id":"2f8612ad45504a5a95fad324d2fb29a41ef404fc","unresolved":false,"context_lines":[{"line_number":777,"context_line":""},{"line_number":778,"context_line":"      If a tag item is enqueued, we look up the branches which contain"},{"line_number":779,"context_line":"      the commit referenced by the tag.  If any of those branches match a"},{"line_number":780,"context_line":"      branch matcher, the matcher is considered to have matched."},{"line_number":781,"context_line":""},{"line_number":782,"context_line":"      This example illustrates a job called *run-tests* which uses a"},{"line_number":783,"context_line":"      nodeset based on the current release of an operating system to"}],"source_content_type":"text/x-rst","patch_set":18,"id":"1fa4df85_7a76b840","line":780,"updated":"2020-03-06 16:59:53.000000000","message":"Some of the consequences of this behavior that are outlined in the commit message should probably go into the documentation too. A follow up for that should be fine.","commit_id":"73cf7cd373e80aec1b9efd3b9853b308be5b41c5"}],"doc/source/user/config.rst":[{"author":{"_account_id":30637,"name":"Jan Kubovy","email":"jan.kubovy@bmw.de","username":"kubovy"},"change_message_id":"4b3ff579c680354a09631ee478e5fac24c2ed2e1","unresolved":false,"context_lines":[{"line_number":1196,"context_line":"      those projects.  This can be used to run a job defined in one"},{"line_number":1197,"context_line":"      project on another project without a matching branch."},{"line_number":1198,"context_line":""},{"line_number":1199,"context_line":"      If a tag item is enqueued, we look up the branches which contain"},{"line_number":1200,"context_line":"      the commit referenced by the tag.  If any of those branches match a"},{"line_number":1201,"context_line":"      branch matcher, the matcher is considered to have matched."},{"line_number":1202,"context_line":""},{"line_number":1203,"context_line":"      This example illustrates a job called *run-tests* which uses a"},{"line_number":1204,"context_line":"      nodeset based on the current release of an operating system to"}],"source_content_type":"text/x-rst","patch_set":17,"id":"3fa7e38b_ec1bffc6","line":1201,"range":{"start_line":1199,"start_character":6,"end_line":1201,"end_character":64},"updated":"2019-09-25 11:55:55.000000000","message":"I have a bit feeling this is too little as an explanation for the user. Just with comparing this with the commit message.\n\nAlso would it be possible to limit the behavior just for the case when a tag is created on HEAD of a branch? If I understand that correctly this is the \"standard\" use-case many are looking for?\n\nIf that\u0027s the case the implementation could be even more simple, correct?","commit_id":"999b94289be8737ffe07d5577c1ebce02c9c55a6"},{"author":{"_account_id":5263,"name":"Jeremy Stanley","display_name":"fungi","email":"fungi@yuggoth.org","username":"fungi","status":"missing, presumed fed"},"change_message_id":"93ff1f187b7bd44773a6de1c6c8ba1a9d4702ff9","unresolved":false,"context_lines":[{"line_number":1198,"context_line":""},{"line_number":1199,"context_line":"      If a tag item is enqueued, we look up the branches which contain"},{"line_number":1200,"context_line":"      the commit referenced by the tag.  If any of those branches match a"},{"line_number":1201,"context_line":"      branch matcher, the matcher is considered to have matched."},{"line_number":1202,"context_line":""},{"line_number":1203,"context_line":"      This example illustrates a job called *run-tests* which uses a"},{"line_number":1204,"context_line":"      nodeset based on the current release of an operating system to"}],"source_content_type":"text/x-rst","patch_set":17,"id":"3fa7e38b_04b0a789","line":1201,"updated":"2019-09-25 19:59:48.000000000","message":"That seems very prone to race conditions. A change can always merge to the branch while you\u0027re in the process of pushing the tag for what you thought was the HEAD but no longer is by the time Zuul receives the event.","commit_id":"999b94289be8737ffe07d5577c1ebce02c9c55a6"},{"author":{"_account_id":31659,"name":"Niklas Borg","email":"niklas.borg.2@volvocars.com","username":"borg"},"change_message_id":"45cef307c162e396979709b7a402faa8f896f10f","unresolved":false,"context_lines":[{"line_number":1196,"context_line":"      those projects.  This can be used to run a job defined in one"},{"line_number":1197,"context_line":"      project on another project without a matching branch."},{"line_number":1198,"context_line":""},{"line_number":1199,"context_line":"      If a tag item is enqueued, we look up the branches which contain"},{"line_number":1200,"context_line":"      the commit referenced by the tag.  If any of those branches match a"},{"line_number":1201,"context_line":"      branch matcher, the matcher is considered to have matched."},{"line_number":1202,"context_line":""},{"line_number":1203,"context_line":"      This example illustrates a job called *run-tests* which uses a"},{"line_number":1204,"context_line":"      nodeset based on the current release of an operating system to"}],"source_content_type":"text/x-rst","patch_set":17,"id":"1fa4df85_15739282","line":1201,"range":{"start_line":1199,"start_character":6,"end_line":1201,"end_character":64},"in_reply_to":"3fa7e38b_ec1bffc6","updated":"2020-02-24 16:30:09.000000000","message":"Limiting to only HEAD would not work in the case where the tag contains metadata.\nFor instance, if you need to re-release for another firmware (this applies to our project). Same when a new firmware is delivered after the software is tagged. Then there will likely be new commits on top of it.","commit_id":"999b94289be8737ffe07d5577c1ebce02c9c55a6"}],"zuul/change_matcher.py":[{"author":{"_account_id":16068,"name":"Tobias Henkel","email":"tobias.henkel@bmw.de","username":"tobias.henkel"},"change_message_id":"84c91bbe3bf5b24bfb68d87bec85b005acbebc3d","unresolved":false,"context_lines":[{"line_number":61,"context_line":""},{"line_number":62,"context_line":"    def matches(self, change):"},{"line_number":63,"context_line":"        if hasattr(change, \u0027branch\u0027):"},{"line_number":64,"context_line":"            if self.regex.match(change.branch):"},{"line_number":65,"context_line":"                return True"},{"line_number":66,"context_line":"            return False"},{"line_number":67,"context_line":"        if self.regex.match(change.ref):"}],"source_content_type":"text/x-python","patch_set":3,"id":"3f79a3b5_94d76bee","line":64,"range":{"start_line":64,"start_character":26,"end_line":64,"end_character":31},"updated":"2018-08-07 17:10:03.000000000","message":"What\u0027s the desired match for explicit branch matchers at the moment? At least for the implied branch matcher we need to do a fullmatch. See I569db50f05c1b53cb1fb26e84ea0af377e3df73c","commit_id":"0314f70cbc05dd6a99c4df33b2ec7bcc3a62a5a4"},{"author":{"_account_id":16068,"name":"Tobias Henkel","email":"tobias.henkel@bmw.de","username":"tobias.henkel"},"change_message_id":"84c91bbe3bf5b24bfb68d87bec85b005acbebc3d","unresolved":false,"context_lines":[{"line_number":68,"context_line":"            return True"},{"line_number":69,"context_line":"        if hasattr(change, \u0027containing_branches\u0027):"},{"line_number":70,"context_line":"            for branch in change.containing_branches:"},{"line_number":71,"context_line":"                if self.regex.match(branch):"},{"line_number":72,"context_line":"                    return True"},{"line_number":73,"context_line":"        return False"},{"line_number":74,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"3f79a3b5_f4e6dfe8","line":71,"range":{"start_line":71,"start_character":30,"end_line":71,"end_character":35},"updated":"2018-08-07 17:10:03.000000000","message":"We should do a fullmatch here. Otherwise we\u0027ll get problems if there are branches like stabe-foo and stable-foo-bar. See I569db50f05c1b53cb1fb26e84ea0af377e3df73c for a similar problem.","commit_id":"0314f70cbc05dd6a99c4df33b2ec7bcc3a62a5a4"}],"zuul/merger/merger.py":[{"author":{"_account_id":4146,"name":"Clark Boylan","email":"cboylan@sapwetik.org","username":"cboylan"},"change_message_id":"2f8612ad45504a5a95fad324d2fb29a41ef404fc","unresolved":false,"context_lines":[{"line_number":555,"context_line":"                return int(m.group(1))"},{"line_number":556,"context_line":"        return None"},{"line_number":557,"context_line":""},{"line_number":558,"context_line":"    def contains(self, hexsha, zuul_event_id\u003dNone):"},{"line_number":559,"context_line":"        repo \u003d self.createRepoObject(zuul_event_id)"},{"line_number":560,"context_line":"        log \u003d get_annotated_logger(self.log, zuul_event_id)"},{"line_number":561,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":18,"id":"1fa4df85_dad80cf0","line":558,"range":{"start_line":558,"start_character":31,"end_line":558,"end_character":49},"updated":"2020-03-06 16:59:53.000000000","message":"This argument doesn\u0027t seem to ever be used. We call this function on line 888 below only passing the hexsha.","commit_id":"73cf7cd373e80aec1b9efd3b9853b308be5b41c5"},{"author":{"_account_id":1,"name":"James E. Blair","email":"jim@acmegating.com","username":"corvus"},"change_message_id":"a5117dd8950dbe6570aa2d578b92ab5aa4784a87","unresolved":false,"context_lines":[{"line_number":555,"context_line":"                return int(m.group(1))"},{"line_number":556,"context_line":"        return None"},{"line_number":557,"context_line":""},{"line_number":558,"context_line":"    def contains(self, hexsha, zuul_event_id\u003dNone):"},{"line_number":559,"context_line":"        repo \u003d self.createRepoObject(zuul_event_id)"},{"line_number":560,"context_line":"        log \u003d get_annotated_logger(self.log, zuul_event_id)"},{"line_number":561,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":18,"id":"1fa4df85_93911ff4","line":558,"updated":"2020-03-06 18:56:23.000000000","message":"True, but it matches the rest of the methods on this object, so I think it\u0027s good to have it here.  If we plumb the event through in the caller, we can add it.","commit_id":"73cf7cd373e80aec1b9efd3b9853b308be5b41c5"},{"author":{"_account_id":1,"name":"James E. Blair","email":"jim@acmegating.com","username":"corvus"},"change_message_id":"cde474a61b8fa6da53d221253b645d2d3cf17083","unresolved":false,"context_lines":[{"line_number":707,"context_line":"        repo.setRefs(project, keep_remotes\u003dself.execution_context,"},{"line_number":708,"context_line":"                     zuul_event_id\u003dzuul_event_id)"},{"line_number":709,"context_line":""},{"line_number":710,"context_line":"    def _mergeChange(self, item, ref, zuul_event_id):"},{"line_number":711,"context_line":"        log \u003d get_annotated_logger(self.log, zuul_event_id)"},{"line_number":712,"context_line":"        repo \u003d self.getRepo(item[\u0027connection\u0027], item[\u0027project\u0027],"},{"line_number":713,"context_line":"                            zuul_event_id\u003dzuul_event_id)"}],"source_content_type":"text/x-python","patch_set":18,"id":"1fa4df85_5fd02af8","line":710,"updated":"2020-02-26 00:19:33.000000000","message":"I believe that will be the case, though it\u0027s still going to apply the branch matchers.  Imagine a case where a job is defined in-repo on the master branch only and has two variants, one that matches \"master\" and one that matches \"stable\".  In that case, we still need to figure out which one to run for our tag, but the configuration of those 2 variants will be determined by the state of the repo in the tag.","commit_id":"73cf7cd373e80aec1b9efd3b9853b308be5b41c5"},{"author":{"_account_id":1,"name":"James E. Blair","email":"jim@acmegating.com","username":"corvus"},"change_message_id":"a5117dd8950dbe6570aa2d578b92ab5aa4784a87","unresolved":false,"context_lines":[{"line_number":707,"context_line":"        repo.setRefs(project, keep_remotes\u003dself.execution_context,"},{"line_number":708,"context_line":"                     zuul_event_id\u003dzuul_event_id)"},{"line_number":709,"context_line":""},{"line_number":710,"context_line":"    def _mergeChange(self, item, ref, zuul_event_id):"},{"line_number":711,"context_line":"        log \u003d get_annotated_logger(self.log, zuul_event_id)"},{"line_number":712,"context_line":"        repo \u003d self.getRepo(item[\u0027connection\u0027], item[\u0027project\u0027],"},{"line_number":713,"context_line":"                            zuul_event_id\u003dzuul_event_id)"}],"source_content_type":"text/x-python","patch_set":18,"id":"1fa4df85_b38c5bd7","line":710,"updated":"2020-03-06 18:56:23.000000000","message":"I think I understand your question, and it\u0027s good to be clear about this.  I have written a follow-up change with a unit test that demonstrates what happens when you change the configuration of a job on a branch, and then retroactively tag a commit before that change.  Zuul will use the newer configuration of the job (i.e., the Zuul configuration that merged after the point of the tag).  But of course, it will check out the tagged version of the repo, so the playbooks, etc, would be from that point in time.\n\nI grant that may be unintuitive from one perspective (\"just run the job as it was defined in the repo at the point of the tag\"), but from others, it may be more intuitive.  Many post/tag jobs are defined centrally, and in those cases, one may not expect a tag of a repo to run with an old version of the central config.  This change keeps parity between the two approaches.\n\nI think it will be difficult to model and implement the approach where we use the job definition at the point of the tag.  Zuul\u0027s variant selection is based on branches, and so while it may be straightforward to create a speculative layout with the contents of the tag and then identify which branches the tag is in in order to identify which variants to apply -- that speculative configuration would still interact with the *current* configuration from other repos.  We can\u0027t rewind the state of the entire system to a tag from a single repo.  It might work most of the time, but in some cases you might end up with a Zuul configuration that doesn\u0027t make sense because the delta between the tagged repo and other repos defining parent jobs, etc, is too great.\n\nAnother consideration is that on a tag it\u0027s difficult to determine whether Zuul needs to create a dynamic configuration.  One approach would be to always have Zuul create a dynamic config for tags.  That\u0027s not efficient, but it\u0027s at least possible.\n\nI think these issues will be difficult to overcome, though we have overcome similarly difficult issues to get even to the point of this change.  I have serious doubts about whether we will be comfortable implementing that approach, particularly because of the first issue (delta between the tagged repo and others).  But If we do decide to proceed with that, I think we can make that change after this one.  In other words, I think it\u0027s a natural progression from the current state, to this change, to (if possible) the state you describe.  I don\u0027t think we will be locked into this behavior.","commit_id":"73cf7cd373e80aec1b9efd3b9853b308be5b41c5"},{"author":{"_account_id":31659,"name":"Niklas Borg","email":"niklas.borg.2@volvocars.com","username":"borg"},"change_message_id":"265f8fef719b615a0112a46c7ece9f1cb3e90bae","unresolved":false,"context_lines":[{"line_number":707,"context_line":"        repo.setRefs(project, keep_remotes\u003dself.execution_context,"},{"line_number":708,"context_line":"                     zuul_event_id\u003dzuul_event_id)"},{"line_number":709,"context_line":""},{"line_number":710,"context_line":"    def _mergeChange(self, item, ref, zuul_event_id):"},{"line_number":711,"context_line":"        log \u003d get_annotated_logger(self.log, zuul_event_id)"},{"line_number":712,"context_line":"        repo \u003d self.getRepo(item[\u0027connection\u0027], item[\u0027project\u0027],"},{"line_number":713,"context_line":"                            zuul_event_id\u003dzuul_event_id)"}],"source_content_type":"text/x-python","patch_set":18,"id":"1fa4df85_1b40a135","line":710,"range":{"start_line":710,"start_character":8,"end_line":710,"end_character":20},"updated":"2020-02-24 18:11:16.000000000","message":"If possible, it would be nice to get the repository in the state it was in the tagged commit.\n\nThen it doesn\u0027t matter which branch is matched, in regards to which job-variant to use. As long as the jobs definitions are parsed from that commit.","commit_id":"73cf7cd373e80aec1b9efd3b9853b308be5b41c5"},{"author":{"_account_id":31659,"name":"Niklas Borg","email":"niklas.borg.2@volvocars.com","username":"borg"},"change_message_id":"5bc2c2110a1c5787717c98f8538c951be488d0b7","unresolved":false,"context_lines":[{"line_number":707,"context_line":"        repo.setRefs(project, keep_remotes\u003dself.execution_context,"},{"line_number":708,"context_line":"                     zuul_event_id\u003dzuul_event_id)"},{"line_number":709,"context_line":""},{"line_number":710,"context_line":"    def _mergeChange(self, item, ref, zuul_event_id):"},{"line_number":711,"context_line":"        log \u003d get_annotated_logger(self.log, zuul_event_id)"},{"line_number":712,"context_line":"        repo \u003d self.getRepo(item[\u0027connection\u0027], item[\u0027project\u0027],"},{"line_number":713,"context_line":"                            zuul_event_id\u003dzuul_event_id)"}],"source_content_type":"text/x-python","patch_set":18,"id":"1fa4df85_68f51283","line":710,"in_reply_to":"1fa4df85_5fd02af8","updated":"2020-02-27 16:51:18.000000000","message":"Hmm. Are we talking about the same thing?\n\nI ment the job as it was defined on the tag itself (assuming the job is defined in the project with the tag). Even if the same commit exists on different branches, the branches should be identical at that commit.\n\nWhen we run check and gate we want to do that on the head of the branch, but a tag we want exactly as it was, without any new features or fixes.","commit_id":"73cf7cd373e80aec1b9efd3b9853b308be5b41c5"},{"author":{"_account_id":4146,"name":"Clark Boylan","email":"cboylan@sapwetik.org","username":"cboylan"},"change_message_id":"2f8612ad45504a5a95fad324d2fb29a41ef404fc","unresolved":false,"context_lines":[{"line_number":883,"context_line":"                    self._alterRepoState("},{"line_number":884,"context_line":"                        item[\u0027connection\u0027], item[\u0027project\u0027], repo_state,"},{"line_number":885,"context_line":"                        item[\u0027ref\u0027], item[\u0027newrev\u0027])"},{"line_number":886,"context_line":"        item \u003d items[-1]"},{"line_number":887,"context_line":"        repo \u003d self.getRepo(item[\u0027connection\u0027], item[\u0027project\u0027])"},{"line_number":888,"context_line":"        item_in_branches \u003d repo.contains(item[\u0027newrev\u0027])"},{"line_number":889,"context_line":"        return (True, repo_state, item_in_branches)"}],"source_content_type":"text/x-python","patch_set":18,"id":"1fa4df85_1a5ea475","line":886,"updated":"2020-03-06 16:59:53.000000000","message":"I believe that items[-1] is important here because it is the tail set of changes in a speculative state?\n\nIs that worth a comment that we choose this specific item for that reason?","commit_id":"73cf7cd373e80aec1b9efd3b9853b308be5b41c5"},{"author":{"_account_id":1,"name":"James E. Blair","email":"jim@acmegating.com","username":"corvus"},"change_message_id":"a5117dd8950dbe6570aa2d578b92ab5aa4784a87","unresolved":false,"context_lines":[{"line_number":883,"context_line":"                    self._alterRepoState("},{"line_number":884,"context_line":"                        item[\u0027connection\u0027], item[\u0027project\u0027], repo_state,"},{"line_number":885,"context_line":"                        item[\u0027ref\u0027], item[\u0027newrev\u0027])"},{"line_number":886,"context_line":"        item \u003d items[-1]"},{"line_number":887,"context_line":"        repo \u003d self.getRepo(item[\u0027connection\u0027], item[\u0027project\u0027])"},{"line_number":888,"context_line":"        item_in_branches \u003d repo.contains(item[\u0027newrev\u0027])"},{"line_number":889,"context_line":"        return (True, repo_state, item_in_branches)"}],"source_content_type":"text/x-python","patch_set":18,"id":"1fa4df85_53c167e4","line":886,"updated":"2020-03-06 18:56:23.000000000","message":"Yes, though this is generally not called in speculative scenarios.  It might be more accurate to just say that this is the item under test.","commit_id":"73cf7cd373e80aec1b9efd3b9853b308be5b41c5"}]}
