whotracksme / whotracks.me

Data from the largest and longest measurement of online tracking.
https://www.ghostery.com/whotracksme
MIT License
414 stars 73 forks source link

Race condition when creating the "_site/data/trackers/ghostery" directory #259

Closed philipp-classen closed 2 years ago

philipp-classen commented 2 years ago

Sometimes builds or tests can fail because of that, for instance:

 Generate Website API pages 6000/6000 .... done
  File "/opt/hostedtoolcache/Python/3.7.12/x64/lib/python3.7/concurrent/futures/process.py", line 239, in _process_worker
    r = call_item.fn(*call_item.args, **call_item.kwargs)
  File "/home/runner/work/whotracks.me/whotracks.me/whotracksme/website/build/data.py", line 56, in build_tracker_api_batch
    gh_data_dir.mkdir(parents=True)
  File "/opt/hostedtoolcache/Python/3.7.12/x64/lib/python3.7/pathlib.py", line 1273, in mkdir
    self._accessor.mkdir(self, mode)
FileExistsError: [Errno 17] File exists: '_site/data/trackers/ghostery'