Skip to content

The prestocpp-format-and-header-check is consistently failing for the PRs that trigger it #26510

@hantangwangd

Description

@hantangwangd

For the last a few days, the prestocpp-format-and-header-check has been failing consistently. The error message is:

license-header...........................................................Failed
- hook id: license-header
- exit code: 1

Traceback (most recent call last):
  File "/home/runner/work/presto/presto/presto-native-execution/scripts/license-header.py", line 112, in <module>
    file_pattern = regex.compile(
        "|".join(["^" + fnmatch.translate(type) + "$" for type in file_types.keys()])
    )
  File "/home/runner/.cache/pre-commit/repos9w26yvu/py_env-python3.14/lib/python3.14/site-packages/regex/_main.py", line 353, in compile
    return _compile(pattern, flags, ignore_unused, kwargs, cache_pattern)
  File "/home/runner/.cache/pre-commit/repos9w26yvu/py_env-python3.14/lib/python3.14/site-packages/regex/_main.py", line 542, in _compile
    raise error(caught_exception.msg, caught_exception.pattern,
      caught_exception.pos)
regex._regex_core.error: bad escape \z at position 23

See: #26373

Comparing it to a previous successful log, it seems that the failure was caused by the CI server's Python version upgrade from 3.13 to 3.14. The regex code in our license-header.py appears to be incompatible with Python 3.14.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Status

✅ Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions