This is an automated email from the ASF dual-hosted git repository.

sbp pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tooling-trusted-releases.git


The following commit(s) were added to refs/heads/main by this push:
     new d358918  Allow check caching to be configured using an environment 
variable
d358918 is described below

commit d358918483bad3c825a77c324adca1cc9fda823a
Author: Sean B. Palmer <[email protected]>
AuthorDate: Tue Jan 13 15:46:40 2026 +0000

    Allow check caching to be configured using an environment variable
---
 Makefile                     | 2 +-
 atr/config.py                | 1 +
 atr/tasks/checks/__init__.py | 4 ++++
 3 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index fd00346..beb28fc 100644
--- a/Makefile
+++ b/Makefile
@@ -110,7 +110,7 @@ serve:
          atr.server:app --debug --reload --worker-class uvloop
 
 serve-local:
-       APP_HOST=localhost.apache.org:8080 SECRET_KEY=insecure-local-key \
+       APP_HOST=localhost.apache.org:8080 SECRET_KEY=insecure-local-key 
DISABLE_CHECK_CACHE=1 \
          ALLOW_TESTS=1 SSH_HOST=127.0.0.1 uv run --frozen hypercorn --bind 
$(BIND) \
          --keyfile localhost.apache.org+2-key.pem --certfile 
localhost.apache.org+2.pem \
          atr.server:app --debug --reload --worker-class uvloop
diff --git a/atr/config.py b/atr/config.py
index a455d82..b2427e8 100644
--- a/atr/config.py
+++ b/atr/config.py
@@ -45,6 +45,7 @@ def _config_secrets(key: str, state_dir: str, default: str | 
None = None, cast:
 
 class AppConfig:
     ALLOW_TESTS = decouple.config("ALLOW_TESTS", default=False, cast=bool)
+    DISABLE_CHECK_CACHE = decouple.config("DISABLE_CHECK_CACHE", 
default=False, cast=bool)
     APP_HOST = decouple.config("APP_HOST", default="127.0.0.1")
     SSH_HOST = decouple.config("SSH_HOST", default="0.0.0.0")
     SSH_PORT = decouple.config("SSH_PORT", default=2222, cast=int)
diff --git a/atr/tasks/checks/__init__.py b/atr/tasks/checks/__init__.py
index 6bcfb36..9f3d5c5 100644
--- a/atr/tasks/checks/__init__.py
+++ b/atr/tasks/checks/__init__.py
@@ -33,6 +33,7 @@ if TYPE_CHECKING:
 
     import atr.models.schema as schema
 
+import atr.config as config
 import atr.db as db
 import atr.models.sql as sql
 import atr.util as util
@@ -204,6 +205,9 @@ class Recorder:
         if not await aiofiles.os.path.isfile(path):
             return False
 
+        if config.get().DISABLE_CHECK_CACHE:
+            return False
+
         no_cache_file = self.abs_path_base() / ".atr-no-cache"
         if await aiofiles.os.path.exists(no_cache_file):
             return False


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to