Skip to content

Commit

Permalink
Logging skipped files on normalized file set (#4127)
Browse files Browse the repository at this point in the history
### Motivation

During the python 3.11 upgrade, a regresion in os.path.realpath made
clusterfuzz delete all its files when paths with mismatching case in the
C: drive were compared raw. In order to recover historical context as to
why we choose to delete files that have a mismatch between real and
absolute path, this log will be introduced.

Part of this
[initiative](#4059)
  • Loading branch information
vitorguidi authored Jul 29, 2024
1 parent 412b2e1 commit b5203e4
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/clusterfuzz/_internal/bot/tasks/update_task.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,10 @@ def update_source_code():
if os.path.altsep:
absolute_filepath = absolute_filepath.replace(os.path.altsep, os.path.sep)

if os.path.realpath(absolute_filepath) != absolute_filepath:
real_path = os.path.realpath(absolute_filepath)
if real_path != absolute_filepath:
logs.info(f'Mismatch between absolute and real filepath. ' +
'Not adding on normalized set: {real_path}')
continue

normalized_file_set.add(absolute_filepath)
Expand Down

0 comments on commit b5203e4

Please sign in to comment.