-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
race condition between creation of .pytest_cache
and .pytest_cache/.gitignore
#12167
Comments
tamird
added a commit
to tamird/pytest
that referenced
this issue
Mar 29, 2024
Writing cache data is interruptible; this prevents a pathological case where interrupting a cache write can cause the cache directory to never be properly initialized with its supporting files. Unify `Cache.mkdir` with `Cache.set` while I'm here so the former also properly initializes the cache directory. Fixes pytest-dev#12167.
tamird
added a commit
to tamird/pytest
that referenced
this issue
Mar 29, 2024
Writing cache data is interruptible; this prevents a pathological case where interrupting a cache write can cause the cache directory to never be properly initialized with its supporting files. Unify `Cache.mkdir` with `Cache.set` while I'm here so the former also properly initializes the cache directory. Fixes pytest-dev#12167.
tamird
added a commit
to tamird/pytest
that referenced
this issue
Mar 29, 2024
Writing cache data is interruptible; this prevents a pathological case where interrupting a cache write can cause the cache directory to never be properly initialized with its supporting files. Unify `Cache.mkdir` with `Cache.set` while I'm here so the former also properly initializes the cache directory. Use json.dump instead of json.dumps + write for a tiny perf win. Fixes pytest-dev#12167.
tamird
added a commit
to tamird/pytest
that referenced
this issue
Mar 29, 2024
Writing cache data is interruptible; this prevents a pathological case where interrupting a cache write can cause the cache directory to never be properly initialized with its supporting files. Unify `Cache.mkdir` with `Cache.set` while I'm here so the former also properly initializes the cache directory. Use json.dump instead of json.dumps + write for a tiny perf win. Fixes pytest-dev#12167.
tamird
added a commit
to tamird/pytest
that referenced
this issue
Mar 29, 2024
Writing cache data is interruptible; this prevents a pathological case where interrupting a cache write can cause the cache directory to never be properly initialized with its supporting files. Unify `Cache.mkdir` with `Cache.set` while I'm here so the former also properly initializes the cache directory. Use json.dump instead of json.dumps + write for a tiny perf win. Fixes pytest-dev#12167.
tamird
added a commit
to tamird/pytest
that referenced
this issue
Mar 29, 2024
Writing cache data is interruptible; this prevents a pathological case where interrupting a cache write can cause the cache directory to never be properly initialized with its supporting files. Unify `Cache.mkdir` with `Cache.set` while I'm here so the former also properly initializes the cache directory. Use json.dump instead of json.dumps + write for a tiny perf win. Fixes pytest-dev#12167.
tamird
added a commit
to tamird/pytest
that referenced
this issue
Mar 29, 2024
Writing cache data is interruptible; this prevents a pathological case where interrupting a cache write can cause the cache directory to never be properly initialized with its supporting files. Unify `Cache.mkdir` with `Cache.set` while I'm here so the former also properly initializes the cache directory. Use json.dump instead of json.dumps + write for a tiny perf win. Fixes pytest-dev#12167.
tamird
added a commit
to tamird/pytest
that referenced
this issue
Mar 29, 2024
Writing cache data is interruptible; this prevents a pathological case where interrupting a cache write can cause the cache directory to never be properly initialized with its supporting files. Unify `Cache.mkdir` with `Cache.set` while I'm here so the former also properly initializes the cache directory. Use json.dump instead of json.dumps + write for a tiny perf win. Fixes pytest-dev#12167.
tamird
added a commit
to tamird/pytest
that referenced
this issue
Mar 29, 2024
Writing cache data is interruptible; this prevents a pathological case where interrupting a cache write can cause the cache directory to never be properly initialized with its supporting files. Unify `Cache.mkdir` with `Cache.set` while I'm here so the former also properly initializes the cache directory. Use json.dump instead of json.dumps + write for a tiny perf win. Fixes pytest-dev#12167.
tamird
added a commit
to tamird/pytest
that referenced
this issue
Mar 29, 2024
Writing cache data is interruptible; this prevents a pathological case where interrupting a cache write can cause the cache directory to never be properly initialized with its supporting files. Unify `Cache.mkdir` with `Cache.set` while I'm here so the former also properly initializes the cache directory. Use json.dump instead of json.dumps + write for a tiny perf win. Fixes pytest-dev#12167.
tamird
added a commit
to tamird/pytest
that referenced
this issue
Mar 29, 2024
Writing cache data is interruptible; this prevents a pathological case where interrupting a cache write can cause the cache directory to never be properly initialized with its supporting files. Unify `Cache.mkdir` with `Cache.set` while I'm here so the former also properly initializes the cache directory. Use json.dump instead of json.dumps + write for a tiny perf win. Fixes pytest-dev#12167.
tamird
added a commit
to tamird/pytest
that referenced
this issue
Mar 29, 2024
Writing cache data is interruptible; this prevents a pathological case where interrupting a cache write can cause the cache directory to never be properly initialized with its supporting files. Unify `Cache.mkdir` with `Cache.set` while I'm here so the former also properly initializes the cache directory. Use json.dump instead of json.dumps + write for a tiny perf win. Fixes pytest-dev#12167.
tamird
added a commit
to tamird/pytest
that referenced
this issue
Mar 29, 2024
Writing cache data is interruptible; this prevents a pathological case where interrupting a cache write can cause the cache directory to never be properly initialized with its supporting files. Unify `Cache.mkdir` with `Cache.set` while I'm here so the former also properly initializes the cache directory. Use json.dump instead of json.dumps + write for a tiny perf win. Fixes pytest-dev#12167.
tamird
added a commit
to tamird/pytest
that referenced
this issue
Mar 29, 2024
Writing cache data is interruptible; this prevents a pathological case where interrupting a cache write can cause the cache directory to never be properly initialized with its supporting files. Unify `Cache.mkdir` with `Cache.set` while I'm here so the former also properly initializes the cache directory. Use json.dump instead of json.dumps + write for a tiny perf win. Fixes pytest-dev#12167.
tamird
added a commit
to tamird/pytest
that referenced
this issue
Mar 31, 2024
Writing cache data is interruptible; this prevents a pathological case where interrupting a cache write can cause the cache directory to never be properly initialized with its supporting files. Unify `Cache.mkdir` with `Cache.set` while I'm here so the former also properly initializes the cache directory. Fixes pytest-dev#12167.
tamird
added a commit
to tamird/pytest
that referenced
this issue
Mar 31, 2024
Writing cache data is interruptible; this prevents a pathological case where interrupting a cache write can cause the cache directory to never be properly initialized with its supporting files. Unify `Cache.mkdir` with `Cache.set` while I'm here so the former also properly initializes the cache directory. Fixes pytest-dev#12167.
tamird
added a commit
to tamird/pytest
that referenced
this issue
Mar 31, 2024
Writing cache data is interruptible; this prevents a pathological case where interrupting a cache write can cause the cache directory to never be properly initialized with its supporting files. Unify `Cache.mkdir` with `Cache.set` while I'm here so the former also properly initializes the cache directory. Fixes pytest-dev#12167.
tamird
added a commit
to tamird/pytest
that referenced
this issue
Mar 31, 2024
Writing cache data is interruptible; this prevents a pathological case where interrupting a cache write can cause the cache directory to never be properly initialized with its supporting files. Unify `Cache.mkdir` with `Cache.set` while I'm here so the former also properly initializes the cache directory. Fixes pytest-dev#12167.
tamird
added a commit
to tamird/pytest
that referenced
this issue
Apr 1, 2024
Writing cache data is interruptible; this prevents a pathological case where interrupting a cache write can cause the cache directory to never be properly initialized with its supporting files. Unify `Cache.mkdir` with `Cache.set` while I'm here so the former also properly initializes the cache directory. Fixes pytest-dev#12167.
tamird
added a commit
to tamird/pytest
that referenced
this issue
Apr 1, 2024
Writing cache data is interruptible; this reduces the probability of a pathological case where interrupting a cache write can cause the cache directory to never be properly initialized with its supporting files. Unify `Cache.mkdir` with `Cache.set` while I'm here so the former also properly initializes the cache directory. Closes pytest-dev#12167.
tamird
added a commit
to tamird/pytest
that referenced
this issue
Apr 1, 2024
Creating and initializing the cache directory is interruptible; this avoids a pathological case where interrupting a cache write can cause the cache directory to never be properly initialized with its supporting files. Unify `Cache.mkdir` with `Cache.set` while I'm here so the former also properly initializes the cache directory. Closes pytest-dev#12167.
tamird
added a commit
to tamird/pytest
that referenced
this issue
Apr 1, 2024
Creating and initializing the cache directory is interruptible; this avoids a pathological case where interrupting a cache write can cause the cache directory to never be properly initialized with its supporting files. Unify `Cache.mkdir` with `Cache.set` while I'm here so the former also properly initializes the cache directory. Closes pytest-dev#12167.
tamird
added a commit
to tamird/pytest
that referenced
this issue
Apr 1, 2024
Creating and initializing the cache directory is interruptible; this avoids a pathological case where interrupting a cache write can cause the cache directory to never be properly initialized with its supporting files. Unify `Cache.mkdir` with `Cache.set` while I'm here so the former also properly initializes the cache directory. Closes pytest-dev#12167.
tamird
added a commit
to tamird/pytest
that referenced
this issue
Apr 1, 2024
Creating and initializing the cache directory is interruptible; this avoids a pathological case where interrupting a cache write can cause the cache directory to never be properly initialized with its supporting files. Unify `Cache.mkdir` with `Cache.set` while I'm here so the former also properly initializes the cache directory. Closes pytest-dev#12167.
tamird
added a commit
to tamird/pytest
that referenced
this issue
Apr 1, 2024
Creating and initializing the cache directory is interruptible; this avoids a pathological case where interrupting a cache write can cause the cache directory to never be properly initialized with its supporting files. Unify `Cache.mkdir` with `Cache.set` while I'm here so the former also properly initializes the cache directory. Closes pytest-dev#12167.
tamird
added a commit
to tamird/pytest
that referenced
this issue
Apr 1, 2024
Creating and initializing the cache directory is interruptible; this avoids a pathological case where interrupting a cache write can cause the cache directory to never be properly initialized with its supporting files. Unify `Cache.mkdir` with `Cache.set` while I'm here so the former also properly initializes the cache directory. Closes pytest-dev#12167.
tamird
added a commit
to tamird/pytest
that referenced
this issue
Apr 2, 2024
Creating and initializing the cache directory is interruptible; this avoids a pathological case where interrupting a cache write can cause the cache directory to never be properly initialized with its supporting files. Unify `Cache.mkdir` with `Cache.set` while I'm here so the former also properly initializes the cache directory. Closes pytest-dev#12167.
tamird
added a commit
to tamird/pytest
that referenced
this issue
Apr 2, 2024
Creating and initializing the cache directory is interruptible; this avoids a pathological case where interrupting a cache write can cause the cache directory to never be properly initialized with its supporting files. Unify `Cache.mkdir` with `Cache.set` while I'm here so the former also properly initializes the cache directory. Closes pytest-dev#12167.
tamird
added a commit
to tamird/pytest
that referenced
this issue
Apr 2, 2024
Creating and initializing the cache directory is interruptible; this avoids a pathological case where interrupting a cache write can cause the cache directory to never be properly initialized with its supporting files. Unify `Cache.mkdir` with `Cache.set` while I'm here so the former also properly initializes the cache directory. Closes pytest-dev#12167.
tamird
added a commit
to tamird/pytest
that referenced
this issue
Apr 3, 2024
Creating and initializing the cache directory is interruptible; this avoids a pathological case where interrupting a cache write can cause the cache directory to never be properly initialized with its supporting files. Unify `Cache.mkdir` with `Cache.set` while I'm here so the former also properly initializes the cache directory. Closes pytest-dev#12167.
tamird
added a commit
to tamird/pytest
that referenced
this issue
Apr 3, 2024
Creating and initializing the cache directory is interruptible; this avoids a pathological case where interrupting a cache write can cause the cache directory to never be properly initialized with its supporting files. Unify `Cache.mkdir` with `Cache.set` while I'm here so the former also properly initializes the cache directory. Closes pytest-dev#12167.
tamird
added a commit
to tamird/pytest
that referenced
this issue
Apr 3, 2024
Creating and initializing the cache directory is interruptible; this avoids a pathological case where interrupting a cache write can cause the cache directory to never be properly initialized with its supporting files. Unify `Cache.mkdir` with `Cache.set` while I'm here so the former also properly initializes the cache directory. Closes pytest-dev#12167.
tamird
added a commit
to tamird/pytest
that referenced
this issue
Apr 3, 2024
Creating and initializing the cache directory is interruptible; this avoids a pathological case where interrupting a cache write can cause the cache directory to never be properly initialized with its supporting files. Unify `Cache.mkdir` with `Cache.set` while I'm here so the former also properly initializes the cache directory. Closes pytest-dev#12167.
flying-sheep
pushed a commit
to flying-sheep/pytest
that referenced
this issue
Apr 9, 2024
Creating and initializing the cache directory is interruptible; this avoids a pathological case where interrupting a cache write can cause the cache directory to never be properly initialized with its supporting files. Unify `Cache.mkdir` with `Cache.set` while I'm here so the former also properly initializes the cache directory. Closes pytest-dev#12167.
4 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The solution implemented in #3982 is not robust - in case test execution is interrupted while a cache element is being written, the
.pytest_cache
directory will exist and be non-empty, but will not contain.gitignore
.Because of this check
.gitignore
ends up never being created.The text was updated successfully, but these errors were encountered: