Skip to content

Support Gitlab v16

gitlab.com updated to v16 and that broke this linter:

genesis $ gc -m'Remove obsolete image override'
Terraform fmt........................................(no files to check)Skipped
Terraform validate...................................(no files to check)Skipped
Terraform validate with tflint.......................(no files to check)Skipped
.gitlab-ci.yml linter....................................................Failed
- hook id: gitlab-ci-linter
- exit code: 1

Traceback (most recent call last):
  File "/home/varac/.cache/pre-commit/repod5qofa7i/py_env-python3/bin/gitlab-ci-linter", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/home/varac/.cache/pre-commit/repod5qofa7i/py_env-python3/lib/python3.11/site-packages/gitlab_ci_linter/__init__.py", line 43, in main
    return gitlab_ci_linter(
           ^^^^^^^^^^^^^^^^^
  File "/home/varac/.cache/pre-commit/repod5qofa7i/py_env-python3/lib/python3.11/site-packages/gitlab_ci_linter/__init__.py", line 78, in gitlab_ci_linter
    with urllib.request.urlopen(r, context=ssl_ctx) as gitlab:
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/urllib/request.py", line 216, in urlopen
    return opener.open(url, data, timeout)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/urllib/request.py", line 525, in open
    response = meth(req, response)
               ^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/urllib/request.py", line 634, in http_response
    response = self.parent.error(
               ^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/urllib/request.py", line 563, in error
    return self._call_chain(*args)
           ^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/urllib/request.py", line 496, in _call_chain
    result = func(*args)
             ^^^^^^^^^^^
  File "/usr/lib/python3.11/urllib/request.py", line 643, in http_error_default
    raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 410: Gone

I found this comment which gives details what have changed in the lint API.