Skip to content

fix(devserver): exclude .artifacts from granian reload watcher#117609

Merged
trevor-e merged 1 commit into
getsentry:masterfrom
kitlord:kitlord/fix/granian-reload-artifacts-watchloop
Jun 15, 2026
Merged

fix(devserver): exclude .artifacts from granian reload watcher#117609
trevor-e merged 1 commit into
getsentry:masterfrom
kitlord:kitlord/fix/granian-reload-artifacts-watchloop

Conversation

@kitlord

@kitlord kitlord commented Jun 14, 2026

Copy link
Copy Markdown
Contributor

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.

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.

Granian's watchfiles-based reloader watches the entire repo directory by
default. The TeeStream introduced in getsentry#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.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@github-actions github-actions Bot added the Scope: Backend Automatically applied to PRs that change backend components label Jun 14, 2026
@ryan953 ryan953 requested review from a team June 14, 2026 19:08
@trevor-e trevor-e added the Trigger: getsentry tests Once code is reviewed: apply label to PR to trigger getsentry tests label Jun 15, 2026
@trevor-e

Copy link
Copy Markdown
Member

Thanks for noticing + fixing! Going ahead and merging this in.

@trevor-e trevor-e merged commit 19e1619 into getsentry:master Jun 15, 2026
116 of 118 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Backend Automatically applied to PRs that change backend components Trigger: getsentry tests Once code is reviewed: apply label to PR to trigger getsentry tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

devserver: granian reload watcher enters infinite loop when .artifacts/dev.log is written

2 participants