Fix submodules error checking in prepare-gerrit-repos The prepare-gerrit-repos role has an error checking task that ensures git submodules are properly checked out for projects under test. There was a problem with this check in that it would check all projects in the zuul projects list against the valid submodule criteria even if that particular project is not a submodule. Not being a submodule evaluated to not being a valid submodule. This makes sense except for in these cases we don't care to check submodule critera for non submodules. Simply skip this check for repos that are not submodules. Bug: Issue 40015618 Change-Id: Ia16bf721d4d6d65be23ab54f3c41c05faa20a759
diff --git a/roles/prepare-gerrit-repos/tasks/repo.yaml b/roles/prepare-gerrit-repos/tasks/repo.yaml index 2d542dc..f3bf26f 100644 --- a/roles/prepare-gerrit-repos/tasks/repo.yaml +++ b/roles/prepare-gerrit-repos/tasks/repo.yaml
@@ -30,6 +30,7 @@ - name: Check for unsatisfiable source repo condition when: + - "project_in_gitmodules" - "project.canonical_name != zuul.project.canonical_name" - "not project_branch_exists or not tracking_branch" - "repo_has_dependent_change"