We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a569c0c commit 6589cd4Copy full SHA for 6589cd4
python/activator/repo_tracker.py
@@ -43,6 +43,10 @@
43
_log.setLevel(logging.DEBUG)
44
45
46
+# Absolute path on this worker's system where local repos may be created
47
+local_repos = os.environ.get("LOCAL_REPOS", "/tmp")
48
+
49
50
class LocalRepoTracker:
51
"""A mapping of process IDs to repo locations.
52
@@ -56,7 +60,10 @@ class LocalRepoTracker:
56
60
"""
57
61
_instance: typing.Self | None = None
58
62
59
- _BACKEND_FILE = os.path.join(os.path.expanduser("~"), ".repo.tracker.csv")
63
+ # Temp space is guaranteed to be in persistent storage (local disk
64
+ # in unit tests, ephemeral in container). The same is NOT true for
65
+ # ~ or /app.
66
+ _BACKEND_FILE = os.path.join(local_repos, ".repo.tracker.csv")
67
68
@staticmethod
69
def get() -> typing.Self:
0 commit comments