CircleCI-Public / path-filtering-orb

MIT License
24 stars 62 forks source link

Error: Multiple repeat at position X #54

Closed iwt-kschoenrock closed 2 years ago

iwt-kschoenrock commented 2 years ago

Orb version: 0.1.3

What happened:

After checking out the code, the path-filtering/filter job fails with the following message:

HEAD is now at f6c750f build dependencies between jobs for stages preview and live
Previous HEAD position was f6c750f build dependencies between jobs for stages preview and live
HEAD is now at 6e2e5fc use previous commit to check for changes to model files
Comparing f6c750f23849a723211ed319f040668239077e2f...6e2e5fcb257f66b5c73629b741af11448fe92246
Traceback (most recent call last):
  File "<string>", line 77, in <module>
  File "<string>", line 66, in check_mapping
  File "/home/circleci/.pyenv/versions/3.8.13/lib/python3.8/re.py", line 252, in compile
    return _compile(pattern, flags)
  File "/home/circleci/.pyenv/versions/3.8.13/lib/python3.8/re.py", line 304, in _compile
    p = sre_compile.compile(pattern, flags)
  File "/home/circleci/.pyenv/versions/3.8.13/lib/python3.8/sre_compile.py", line 764, in compile
    p = sre_parse.parse(p, flags)
  File "/home/circleci/.pyenv/versions/3.8.13/lib/python3.8/sre_parse.py", line 948, in parse
    p = _parse_sub(source, state, flags & SRE_FLAG_VERBOSE, 0)
  File "/home/circleci/.pyenv/versions/3.8.13/lib/python3.8/sre_parse.py", line 443, in _parse_sub
    itemsappend(_parse(source, state, verbose, nested + 1,
  File "/home/circleci/.pyenv/versions/3.8.13/lib/python3.8/sre_parse.py", line 671, in _parse
    raise source.error("multiple repeat",
re.error: multiple repeat at position 9

Exited with code exit status 1

Expected behavior:

A job should be started when any files in a directory were changed (expression: "model/**/*").

Additional Information:

Job is configured as follows:

workflows:
  main:
    jobs:
      - path-filtering/filter:
          base-revision: origin/main
          config-path: .circleci/publish-model.yml
          mapping: |
            "model/**/*" publish-metrics-job true
iwt-kschoenrock commented 2 years ago

Sorry, I was using glob syntax for the files instead of regex. Guess I overlooked the . in the example.