Fixing of finding logic for XML paths#454
Fixing of finding logic for XML paths#454MaximilianSoerenPollak wants to merge 1 commit intoeclipse-score:mainfrom
Conversation
License Check Results🚀 The license check job ran with the Bazel command: bazel run --lockfile_mode=error //src:license-checkStatus: Click to expand output |
|
The created documentation from the pull request is available at: docu-html |
| xml_paths.append(Path(os.path.join(root, test_file_name))) | ||
|
|
||
| return xml_paths | ||
| return [x for x in search_path.rglob(test_file_name)] |
There was a problem hiding this comment.
How does this change behavior?
Coincidentally, I know that rglob does not follow symlinks while os.walk does. At least, not by default and not with our Python 3.12. Is that the relevant change here?
There was a problem hiding this comment.
[x.resolve() for x in search_path.rglob(test_file_name)]
will follow symlinks
There was a problem hiding this comment.
Ok, so that is not the change. What is it? From looking at it the code looks equivalent. 🤔
There was a problem hiding this comment.
It is equivalent, but the os.walk did behave differently than this code does.
This finds all of the files locally & in ref-integration as well as ci/cd
THe old code did work locally but in CI/CD in ref-integration it didn't work anymore and found 0 test files.
Even though the path was correct (that it searched) and the test files were there.
There was a problem hiding this comment.
This change here:
for root, dirs, files in os.walk(dir, topdown=False, followlinks=True):
Also worked, though I found the now proposed solution cleaner to read
📌 Description
🚨 Impact Analysis
✅ Checklist