fix(metadata): downgrade inline unwired-filter warmup log from alert to debug#8408
Open
alexisLefebvre wants to merge 1 commit into
Open
Conversation
…to debug An inline filter instance passed to a query parameter is never wired with a manager registry, unlike a filter resolved as a service. Reading its legacy description during cache warmup then fails on the Doctrine metadata lookup. This is expected and recoverable, yet it was logged at alert level, spamming one line per such parameter on every cache clear and misleading unrelated diagnostics. Log this known warmup case at debug level, keeping alert for genuinely unexpected registry failures. Closes api-platform#7361 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Downgrades the
ManagerRegistry must be initialized before accessing it.log — emitted while reading a filter's legacy description during cache warmup — fromalerttodebug, but only for the expected case: an inline filter instance that is manager-registry-aware and has no registry wired. Genuinely unexpected registry failures still log atalert.Why
An inline filter instance passed to a
QueryParameter(the canonicalfilter: new NumericFilter()form shown in the docs) is never wired with aManagerRegistry, unlike a filter resolved through the filter locator as a service. Reading its description then throws — a recoverable, expected-during-warmup condition that was nonetheless logged atalert. In practice this spams one identicalALERTline per such parameter on everycache:clear, and (as reported in #7361) surfaces in tooling that treats alerts as actionable, misleading unrelated diagnostics.This addresses the log-spam symptom without a BC break or new configuration. The deeper concern — inline instances losing their description-derived OpenAPI/schema enrichment, and
FilterInterface::getDescription()being deprecated for removal in the next major — is left for a separate, larger change.🤖 Generated with Claude Code