Merge "Remove implied run" into feature/zuulv3
diff --git a/doc/source/user/config.rst b/doc/source/user/config.rst
index 80c9136..0019932 100644
--- a/doc/source/user/config.rst
+++ b/doc/source/user/config.rst
@@ -781,42 +781,55 @@
 
    .. attr:: pre-run
 
-      The name of a playbook or list of playbooks without file
-      extension to run before the main body of a job.  The full path
-      to the playbook in the repo where the job is defined is
-      expected.
+      The name of a playbook or list of playbooks to run before the
+      main body of a job.  The full path to the playbook in the repo
+      where the job is defined is expected.
 
       When a job inherits from a parent, the child's pre-run playbooks
       are run after the parent's.  See :ref:`job` for more
       information.
 
+      .. warning::
+
+         If the path as specified does not exist, Zuul will try
+         appending the extensions ``.yaml`` and ``.yml``.  This
+         behavior is deprecated and will be removed in the future all
+         playbook paths should include the file extension.
+
    .. attr:: post-run
 
-      The name of a playbook or list of playbooks without file
-      extension to run after the main body of a job.  The full path to
-      the playbook in the repo where the job is defined is expected.
+      The name of a playbook or list of playbooks to run after the
+      main body of a job.  The full path to the playbook in the repo
+      where the job is defined is expected.
 
       When a job inherits from a parent, the child's post-run
       playbooks are run before the parent's.  See :ref:`job` for more
       information.
 
+      .. warning::
+
+         If the path as specified does not exist, Zuul will try
+         appending the extensions ``.yaml`` and ``.yml``.  This
+         behavior is deprecated and will be removed in the future all
+         playbook paths should include the file extension.
+
    .. attr:: run
 
-      The name of the main playbook for this job.  This parameter is
-      not normally necessary, as it defaults to a playbook with the
-      same name as the job inside of the ``playbooks/`` directory
-      (e.g., the ``foo`` job would default to ``playbooks/foo``.
-      However, if a playbook with a different name is needed, it can
-      be specified here.  The file extension is not required, but the
-      full path within the repo is.  When a child inherits from a
-      parent, a playbook with the name of the child job is implicitly
-      searched first, before falling back on the playbook used by the
-      parent job (unless the child job specifies a ``run`` attribute,
-      in which case that value is used).  Example:
+      The name of the main playbook for this job.  If it is not
+      supplied, the parent's playbook will be used (and likewise up
+      the inheritance chain).  The full path within the repo is
+      required.  Example:
 
       .. code-block:: yaml
 
-         run: playbooks/<name of the job>
+         run: playbooks/job-playbook.yaml
+
+      .. warning::
+
+         If the path as specified does not exist, Zuul will try
+         appending the extensions ``.yaml`` and ``.yml``.  This
+         behavior is deprecated and will be removed in the future all
+         playbook paths should include the file extension.
 
    .. attr:: roles
 
diff --git a/tests/base.py b/tests/base.py
index 2da4d47..2a2f164 100755
--- a/tests/base.py
+++ b/tests/base.py
@@ -2230,8 +2230,6 @@
                                      files={'README': ''},
                                      branch='master', tag='init')
             if 'job' in item:
-                jobname = item['job']['name']
-                files['playbooks/%s.yaml' % jobname] = ''
                 if 'run' in item['job']:
                     files['%s.yaml' % item['job']['run']] = ''
                 for fn in zuul.configloader.as_list(
diff --git a/zuul/configloader.py b/zuul/configloader.py
index 2cb23d9..ec2c1e0 100644
--- a/zuul/configloader.py
+++ b/zuul/configloader.py
@@ -612,12 +612,6 @@
             run = model.PlaybookContext(job.source_context, conf['run'],
                                         job.roles, secrets)
             job.run = (run,)
-        else:
-            if not project_pipeline:
-                run_name = os.path.join('playbooks', job.name)
-                run = model.PlaybookContext(job.source_context, run_name,
-                                            job.roles, secrets)
-                job.implied_run = (run,)
 
         for k in JobParser.simple_attributes:
             a = k.replace('-', '_')
diff --git a/zuul/model.py b/zuul/model.py
index 30d4b26..8a44785 100644
--- a/zuul/model.py
+++ b/zuul/model.py
@@ -856,7 +856,6 @@
             source_line=None,
             inheritance_path=(),
             parent_data=None,
-            implied_run=(),
         )
 
         self.inheritable_attributes = {}
@@ -914,10 +913,6 @@
     def setBase(self):
         self.inheritance_path = self.inheritance_path + (repr(self),)
 
-    def setRun(self):
-        if not self.run:
-            self.run = self.implied_run
-
     def addRoles(self, roles):
         newroles = []
         # Start with a copy of the existing roles, but if any of them
@@ -1036,11 +1031,6 @@
         if other._get('roles') is not None:
             self.addRoles(other.roles)
 
-        # We only want to update implied run for inheritance, not
-        # variance.
-        if self.name != other.name:
-            other_implied_run = self.freezePlaybooks(other.implied_run)
-            self.implied_run = other_implied_run + self.implied_run
         if other._get('run') is not None:
             other_run = self.freezePlaybooks(other.run)
             self.run = other_run
@@ -2551,11 +2541,7 @@
                 else:
                     frozen_job.applyVariant(variant)
                     frozen_job.name = variant.name
-            # Set the implied run based on the last top-level job
-            # definition, before we start applying project-pipeline
-            # variants.
             frozen_job.name = jobname
-            frozen_job.setRun()
             # Whether the change matches any of the project pipeline
             # variants
             matched = False