Backed out 7 changesets (bug 1387862) for yaml linting failures.
authorRyan VanderMeulen <ryanvm@gmail.com>
Wed, 09 Aug 2017 21:31:30 -0400
changeset 423235 0cd4ced6047668902e3dbb2373c2dab0e99dd04f
parent 423234 c1e9798e0c70b9d14b9f019e700e0436d3d3de71
child 423236 94b2ffaa5ff79fdce96a83849d81fe54d45cdc96
push id7761
push userjlund@mozilla.com
push dateFri, 15 Sep 2017 00:19:52 +0000
treeherdermozilla-beta@c38455951db4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1387862
milestone57.0a1
backs out63f87f6db7d68188f6fcc7bbdeb46a2f3f74306c
a85b7e7d9f24c26390ccd43ae14360c327dd3edf
3713ea9672e8c6bb6cc1d0b36b15bedc7de3b054
22c1094e387f580ad2621dc006cbd44939826b38
e0bfb35b0eec7dd77ffe64492c077a620c573044
5bb5dc7655ec63628f287ea25f851ab68c43e994
cc4c01794114b8f756f916d00109bf56ce5d2402
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Backed out 7 changesets (bug 1387862) for yaml linting failures. Backed out changeset 63f87f6db7d6 (bug 1387862) Backed out changeset a85b7e7d9f24 (bug 1387862) Backed out changeset 3713ea9672e8 (bug 1387862) Backed out changeset 22c1094e387f (bug 1387862) Backed out changeset e0bfb35b0eec (bug 1387862) Backed out changeset 5bb5dc7655ec (bug 1387862) Backed out changeset cc4c01794114 (bug 1387862)
.cron.yml
python/mozlint/test/linters/badreturncode.yml
python/mozlint/test/linters/explicit_path.yml
python/mozlint/test/linters/external.yml
python/mozlint/test/linters/invalid_exclude.yml
python/mozlint/test/linters/invalid_extension.ym
python/mozlint/test/linters/invalid_include.yml
python/mozlint/test/linters/invalid_type.yml
python/mozlint/test/linters/missing_attrs.yml
python/mozlint/test/linters/raises.yml
python/mozlint/test/linters/regex.yml
python/mozlint/test/linters/string.yml
python/mozlint/test/linters/structured.yml
taskcluster/.yamllint
taskcluster/ci/source-test/mozlint.yml
tools/lint/eslint.yml
tools/lint/flake8.yml
tools/lint/wpt.yml
tools/lint/wpt_manifest.yml
tools/lint/yaml.yml
tools/lint/yamllint_/__init__.py
tools/lint/yamllint_/yamllint_requirements.txt
--- a/.cron.yml
+++ b/.cron.yml
@@ -1,49 +1,47 @@
 # Definitions for jobs that run periodically.  For details on the format, see
 # `taskcluster/taskgraph/cron/schema.py`.  For documentation, see
 # `taskcluster/docs/cron.rst`.
 
----
-
 jobs:
     - name: nightly-desktop
       job:
           type: decision-task
           treeherder-symbol: Nd
           target-tasks-method: nightly_desktop
       run-on-projects:
           - mozilla-central
           - date
       when:
           by-project:
-              # Match buildbot starts for now
-              date: [{hour: 15, minute: 0}]
-              mozilla-central: [{hour: 10, minute: 0}]
-              # No default
+            # Match buildbot starts for now
+            date: [{hour: 15, minute: 0}]
+            mozilla-central: [{hour: 10, minute: 0}]
+            # No default
 
     - name: nightly-desktop-linux
       job:
           type: decision-task
           treeherder-symbol: Nd-Ln
           target-tasks-method: nightly_linux
       run-on-projects:
           - mozilla-central
           - date
-      when: []  # never (hook only)
+      when: [] # never (hook only)
 
     - name: nightly-desktop-osx
       job:
           type: decision-task
           treeherder-symbol: Nd-OSX
           target-tasks-method: nightly_macosx
       run-on-projects:
           - mozilla-central
           - date
-      when: []  # never (hook only)
+      when: [] # never (hook only)
 
     - name: nightly-desktop-win32
       job:
           type: decision-task
           treeherder-symbol: Nd-win32
           target-tasks-method: nightly_win32
       run-on-projects:
           - mozilla-central
@@ -53,32 +51,32 @@ jobs:
     - name: nightly-desktop-win64
       job:
           type: decision-task
           treeherder-symbol: Nd-win64
           target-tasks-method: nightly_win64
       run-on-projects:
           - mozilla-central
           - date
-      when: []  # never (hook only)
+      when: [] # never (hook only)
 
     - name: nightly-android
       job:
           type: decision-task
           treeherder-symbol: Na
           target-tasks-method: nightly_fennec
       run-on-projects:
           - mozilla-central
           - date
       when:
-          by-project:
-              # Match buildbot starts for now
-              date: [{hour: 15, minute: 0}]
-              mozilla-central: [{hour: 10, minute: 0}]
-              # No default
+        by-project:
+            # Match buildbot starts for now
+            date: [{hour: 15, minute: 0}]
+            mozilla-central: [{hour: 10, minute: 0}]
+            # No default
 
     - name: nightly-mochitest-valgrind
       job:
           type: decision-task
           treeherder-symbol: Vg
           target-tasks-method: mochitest_valgrind
       run-on-projects:
           - mozilla-central
@@ -90,10 +88,10 @@ jobs:
       job:
           type: decision-task
           treeherder-symbol: Ndmd
           target-tasks-method: nightly_dmd
       run-on-projects:
           - mozilla-central
       when:
           by-project:
-              mozilla-central: [{hour: 10, minute: 0}]
-              # No default
+            mozilla-central: [{hour: 10, minute: 0}]
+            # No default
--- a/python/mozlint/test/linters/badreturncode.yml
+++ b/python/mozlint/test/linters/badreturncode.yml
@@ -1,8 +1,7 @@
----
 BadReturnCodeLinter:
     description: Returns an error code no matter what
     include:
         - files
     type: external
     extensions: ['.js', '.jsm']
     payload: external:badreturncode
--- a/python/mozlint/test/linters/explicit_path.yml
+++ b/python/mozlint/test/linters/explicit_path.yml
@@ -1,8 +1,7 @@
----
 ExplicitPathLinter:
     description: Only lint a specific file name
     rule: no-foobar
     include:
         - no_foobar.js
     type: string
     payload: foobar
--- a/python/mozlint/test/linters/external.yml
+++ b/python/mozlint/test/linters/external.yml
@@ -1,8 +1,7 @@
----
 ExternalLinter:
     description: It's bad to have the string foobar in js files.
     include:
         - files
     type: external
     extensions: ['.js', '.jsm']
     payload: external:external
--- a/python/mozlint/test/linters/invalid_exclude.yml
+++ b/python/mozlint/test/linters/invalid_exclude.yml
@@ -1,6 +1,5 @@
----
 BadExcludeLinter:
     description: Has an invalid exclude directive.
     exclude: [0, 1]  # should be a list of strings
     type: string
     payload: foobar
--- a/python/mozlint/test/linters/invalid_extension.ym
+++ b/python/mozlint/test/linters/invalid_extension.ym
@@ -1,5 +1,4 @@
----
 BadExtensionLinter:
     description: Has an invalid file extension.
     type: string
     payload: foobar
--- a/python/mozlint/test/linters/invalid_include.yml
+++ b/python/mozlint/test/linters/invalid_include.yml
@@ -1,6 +1,5 @@
----
 BadIncludeLinter:
     description: Has an invalid include directive.
     include: should be a list
     type: string
     payload: foobar
--- a/python/mozlint/test/linters/invalid_type.yml
+++ b/python/mozlint/test/linters/invalid_type.yml
@@ -1,5 +1,4 @@
----
 BadTypeLinter:
     description: Has an invalid type.
     type: invalid
     payload: foobar
--- a/python/mozlint/test/linters/missing_attrs.yml
+++ b/python/mozlint/test/linters/missing_attrs.yml
@@ -1,3 +1,2 @@
----
 MissingAttrsLinter:
     description: Missing type and payload
--- a/python/mozlint/test/linters/raises.yml
+++ b/python/mozlint/test/linters/raises.yml
@@ -1,5 +1,4 @@
----
 RaisesLinter:
     description: Raises an exception
     type: external
     payload: external:raises
--- a/python/mozlint/test/linters/regex.yml
+++ b/python/mozlint/test/linters/regex.yml
@@ -1,11 +1,8 @@
----
 RegexLinter:
-    description: >-
-        Make sure the string foobar never appears in a js variable
-        file because it is bad.
+    description: Make sure the string foobar never appears in a js variable file because it is bad.
     rule: no-foobar
     include:
         - '**/*.js'
         - '**/*.jsm'
     type: regex
     payload: foobar
--- a/python/mozlint/test/linters/string.yml
+++ b/python/mozlint/test/linters/string.yml
@@ -1,12 +1,9 @@
----
 StringLinter:
-    description: >-
-        Make sure the string foobar never appears in browser js
-        files because it is bad
+    description: Make sure the string foobar never appears in browser js files because it is bad
     rule: no-foobar
     include:
         - '**/*.js'
         - '**/*.jsm'
     type: string
     extensions: ['.js', 'jsm']
     payload: foobar
--- a/python/mozlint/test/linters/structured.yml
+++ b/python/mozlint/test/linters/structured.yml
@@ -1,8 +1,7 @@
----
 StructuredLinter:
     description: "It's bad to have the string foobar in js files."
     include:
         - files
     type: structured_log
     extensions: ['.js', '.jsm']
     payload: external:structured
deleted file mode 100644
--- a/taskcluster/.yamllint
+++ /dev/null
@@ -1,16 +0,0 @@
----
-
-extends: default
-
-rules:
-  document-end:
-     present: false
-  # Checks currently failing
-  brackets: disable
-  commas: disable
-  comments: disable
-  comments-indentation: disable
-  document-start: disable
-  hyphens: disable
-  indentation: disable
-  line-length: disable
--- a/taskcluster/ci/source-test/mozlint.yml
+++ b/taskcluster/ci/source-test/mozlint.yml
@@ -52,38 +52,16 @@ mozlint-flake8:
         mach: lint -l flake8 -f treeherder
     when:
         files-changed:
             - '**/*.py'
             - '**/.flake8'
             - 'python/mozlint/**'
             - 'tools/lint/**'
 
-mozlint-yaml:
-    description: yamllint run over the gecko codebase
-    platform: lint/opt
-    treeherder:
-        symbol: yaml
-        kind: test
-        tier: 1
-    worker-type: aws-provisioner-v1/gecko-t-linux-xlarge
-    worker:
-        docker-image: {in-tree: "lint"}
-        max-run-time: 1800
-    run:
-        using: mach
-        mach: lint -l yamllint -f treeherder
-    when:
-        files-changed:
-            - '**/*.yml'
-            - '**/*.yaml'
-            - '**/.ymllint'
-            - 'python/mozlint/**'
-            - 'tools/lint/**'
-
 wptlint-gecko:
     description: web-platform-tests linter
     platform: lint/opt
     treeherder:
         symbol: W
         kind: test
         tier: 1
     worker-type: aws-provisioner-v1/gecko-t-linux-xlarge
--- a/tools/lint/eslint.yml
+++ b/tools/lint/eslint.yml
@@ -1,9 +1,8 @@
----
 eslint:
     description: JavaScript linter
     # ESLint infra handles its own path filtering, so just include cwd
     include: ['.']
     exclude: []
     # Make sure these are defined on the same line until the hack
     # in hook_helper.py is fixed.
     extensions: ['js', 'jsm', 'jsx', 'xml', 'html', 'xhtml']
--- a/tools/lint/flake8.yml
+++ b/tools/lint/flake8.yml
@@ -1,9 +1,8 @@
----
 flake8:
     description: Python linter
     include:
         - layout/tools/reftest
         - python/mozlint
         - security/manager
         - taskcluster
         - testing/firefox-ui
--- a/tools/lint/wpt.yml
+++ b/tools/lint/wpt.yml
@@ -1,8 +1,7 @@
----
 wpt:
     description: web-platform-tests lint
     include:
         - testing/web-platform/tests
     exclude: []
     type: external
     payload: wpt.wpt:lint
--- a/tools/lint/wpt_manifest.yml
+++ b/tools/lint/wpt_manifest.yml
@@ -1,9 +1,8 @@
----
 wpt_manifest:
     description: web-platform-tests manifest lint
     include:
         - testing/web-platform/tests
         - testing/web-platform/mozilla/tests
     exclude: []
     type: structured_log
     payload: wpt.wpt_manifest:lint
deleted file mode 100644
--- a/tools/lint/yaml.yml
+++ /dev/null
@@ -1,13 +0,0 @@
----
-yamllint:
-    description: YAML linter
-    include:
-        - .cron.yml
-        - python/mozlint/
-        - security/nss/.taskcluster.yml
-        - taskcluster
-        - testing/mozharness
-        - tools
-    extensions: ['yml', 'yaml']
-    type: external
-    payload: yamllint_:lint
deleted file mode 100644
--- a/tools/lint/yamllint_/__init__.py
+++ /dev/null
@@ -1,154 +0,0 @@
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
-import re
-import os
-import signal
-import subprocess
-
-import which
-from mozprocess import ProcessHandlerMixin
-
-from mozlint import result
-
-
-here = os.path.abspath(os.path.dirname(__file__))
-YAMLLINT_REQUIREMENTS_PATH = os.path.join(here, 'yamllint_requirements.txt')
-
-
-YAMLLINT_INSTALL_ERROR = """
-Unable to install correct version of yamllint
-Try to install it manually with:
-    $ pip install -U --require-hashes -r {}
-""".strip().format(YAMLLINT_REQUIREMENTS_PATH)
-
-YAMLLINT_FORMAT_REGEX = re.compile(r'(.*):(.*):(.*): \[(error|warning)\] (.*) \((.*)\)$')
-
-results = []
-
-
-class YAMLLintProcess(ProcessHandlerMixin):
-    def __init__(self, config, *args, **kwargs):
-        self.config = config
-        kwargs['processOutputLine'] = [self.process_line]
-        ProcessHandlerMixin.__init__(self, *args, **kwargs)
-
-    def process_line(self, line):
-        try:
-            match = YAMLLINT_FORMAT_REGEX.match(line)
-            abspath, line, col, level, message, code = match.groups()
-        except AttributeError:
-            print('Unable to match yaml regex against output: {}'.format(line))
-            return
-
-        res = {'path': os.path.relpath(abspath, self.config['root']),
-               'message': message,
-               'level': level,
-               'lineno': line,
-               'column': col,
-               'rule': code,
-               }
-
-        results.append(result.from_config(self.config, **res))
-
-    def run(self, *args, **kwargs):
-        # protect against poor SIGINT handling. Handle it here instead
-        # so we can kill the process without a cryptic traceback.
-        orig = signal.signal(signal.SIGINT, signal.SIG_IGN)
-        ProcessHandlerMixin.run(self, *args, **kwargs)
-        signal.signal(signal.SIGINT, orig)
-
-
-def get_yamllint_binary():
-    """
-    Returns the path of the first yamllint binary available
-    if not found returns None
-    """
-    binary = os.environ.get('YAMLLINT')
-    if binary:
-        return binary
-
-    try:
-        return which.which('yamllint')
-    except which.WhichError:
-        return None
-
-
-def _run_pip(*args):
-    """
-    Helper function that runs pip with subprocess
-    """
-    try:
-        subprocess.check_output(['pip'] + list(args),
-                                stderr=subprocess.STDOUT)
-        return True
-    except subprocess.CalledProcessError as e:
-        print(e.output)
-        return False
-
-
-def reinstall_yamllint():
-    """
-    Try to install yamllint at the target version, returns True on success
-    otherwise prints the otuput of the pip command and returns False
-    """
-    if _run_pip('install', '-U',
-                '--require-hashes', '-r',
-                YAMLLINT_REQUIREMENTS_PATH):
-        return True
-
-    return False
-
-
-def run_process(config, cmd):
-    proc = YAMLLintProcess(config, cmd)
-    proc.run()
-    try:
-        proc.wait()
-    except KeyboardInterrupt:
-        proc.kill()
-
-
-def gen_yamllint_args(cmdargs, paths=None, conf_file=None):
-    args = cmdargs[:]
-    if isinstance(paths, basestring):
-        paths = [paths]
-    if conf_file:
-        return args + ['-c', conf_file] + paths
-    return args + paths
-
-
-def lint(files, config, **lintargs):
-
-    if not reinstall_yamllint():
-        print(YAMLLINT_INSTALL_ERROR)
-        return 1
-
-    binary = get_yamllint_binary()
-
-    cmdargs = [
-        binary,
-        '-f', 'parsable'
-    ]
-
-    config = config.copy()
-    config['root'] = lintargs['root']
-
-    # Run any paths with a .yamllint file in the directory separately so
-    # it gets picked up. This means only .yamllint files that live in
-    # directories that are explicitly included will be considered.
-    no_config = []
-    for f in files:
-        yamllint_config = os.path.join(f, '.yamllint')
-        if not os.path.isfile(yamllint_config):
-            no_config.append(f)
-            continue
-        run_process(config,
-                    gen_yamllint_args(cmdargs, conf_file=yamllint_config, paths=f))
-
-    if no_config:
-        run_process(config,
-                    gen_yamllint_args(cmdargs, paths=no_config))
-
-    return results
deleted file mode 100644
--- a/tools/lint/yamllint_/yamllint_requirements.txt
+++ /dev/null
@@ -1,21 +0,0 @@
-yamllint==1.8.1 \
-    --hash=sha256:806b21828ca92fd6e9f20d8eccfa53035e38041854bb4d1b666f271a7788dbcf \
-    --hash=sha256:048743567ca9511e19222233ebb53795586a2cede07b79e801577e0a9b4f173c
-PyYAML==3.12 \
-    --hash=sha256:3262c96a1ca437e7e4763e2843746588a965426550f3797a79fca9c6199c431f \
-    --hash=sha256:16b20e970597e051997d90dc2cddc713a2876c47e3d92d59ee198700c5427736 \
-    --hash=sha256:e863072cdf4c72eebf179342c94e6989c67185842d9997960b3e69290b2fa269 \
-    --hash=sha256:bc6bced57f826ca7cb5125a10b23fd0f2fff3b7c4701d64c439a300ce665fff8 \
-    --hash=sha256:c01b880ec30b5a6e6aa67b09a2fe3fb30473008c85cd6a67359a1b15ed6d83a4 \
-    --hash=sha256:827dc04b8fa7d07c44de11fabbc888e627fa8293b695e0f99cb544fdfa1bf0d1 \
-    --hash=sha256:592766c6303207a20efc445587778322d7f73b161bd994f227adaa341ba212ab \
-    --hash=sha256:592766c6303207a20efc445587778322d7f73b161bd994f227adaa341ba212ab \
-    --hash=sha256:5f84523c076ad14ff5e6c037fe1c89a7f73a3e04cf0377cb4d017014976433f3 \
-    --hash=sha256:0c507b7f74b3d2dd4d1322ec8a94794927305ab4cebbe89cc47fe5e81541e6e8 \
-    --hash=sha256:b4c423ab23291d3945ac61346feeb9a0dc4184999ede5e7c43e1ffb975130ae6 \
-    --hash=sha256:ca233c64c6e40eaa6c66ef97058cdc80e8d0157a443655baa1b2966e812807ca \
-    --hash=sha256:4474f8ea030b5127225b8894d626bb66c01cda098d47a2b0d3429b6700af9fd8 \
-    --hash=sha256:326420cbb492172dec84b0f65c80942de6cedb5233c413dd824483989c000608 \
-    --hash=sha256:5ac82e411044fb129bae5cfbeb3ba626acb2af31a8d17d175004b70862a741a7
-pathspec==0.5.3 \
-    --hash=sha256:54478a66a360f4ebe4499c9235e4206fca5dec837b8e272d1ce37e0a626cc64d