Skip to content

Commit 19e1619

Browse files
kitlordclaude
andauthored
fix(devserver): exclude .artifacts from granian reload watcher (#117609)
Fixes getsentry/self-hosted#4379 Granian's watchfiles-based reloader watches the entire repo directory by default. The TeeStream introduced in #117486 writes all honcho output to .artifacts/dev.log inside the repo root, which triggered an infinite reload cycle: server logs →-> dev.log updated -> watchfiles detects change -> granian reloads -> repeat. Fix by passing reload_ignore_dirs=[".artifacts"] to Granian so watchfiles skips that directory. The option is surfaced through the existing options dict so it can be overridden via SENTRY_WEB_OPTIONS if needed. <!-- Describe your PR here. --> <!-- Sentry employees and contractors can delete or ignore the following. --> ### Legal Boilerplate Look, I get it. The entity doing business as "Sentry" was incorporated in the State of Delaware in 2015 as Functional Software, Inc. and is gonna need some rights from me in order to utilize my contributions in this here PR. So here's the deal: I retain all rights, title and interest in and to my contributions, and by keeping this boilerplate intact I confirm that Sentry can use, modify, copy, and redistribute my contributions, under Sentry's choice of terms. Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 4c69f4f commit 19e1619

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

src/sentry/services/http.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ def _run_server(options: dict[str, Any]):
2121
blocking_threads=options["threads"],
2222
respawn_failed_workers=True,
2323
reload=options["reload"],
24+
reload_ignore_dirs=options.get("reload-ignore-dirs"),
2425
reload_ignore_worker_failure=options["reload-ignore-worker-failure"],
2526
process_name=options["proc-name"],
2627
workers_lifetime=options["max-worker-lifetime"],
@@ -67,6 +68,7 @@ def __init__(
6768
options.setdefault("log-enabled", True)
6869
options.setdefault("proc-name", "sentry")
6970
options.setdefault("reload", reload)
71+
options.setdefault("reload-ignore-dirs", [".artifacts"])
7072
options.setdefault("reload-ignore-worker-failure", reload)
7173
options.setdefault("workers-kill-timeout", 3 if reload else 30)
7274
options.setdefault("max-worker-lifetime", None)

0 commit comments

Comments
 (0)