Vamsi-klu commented on PR #69402: URL: https://github.com/apache/airflow/pull/69402#issuecomment-4912281112
Confirmed the root cause: _LazyLogRecordDict.__getitem__ fell back to the "(unknown)" string (missing key) or None (key present but None) for callsite params, so a format using %(process)d/%(thread)d raised "TypeError: %d format: a real number is required" when callsite info was absent (e.g. a stdlib warning routed through the logging bridge before CallsiteParameterAdder runs). Returning self.event.get(key) or 0 mirrors the lineno branch directly above it, and since CallsiteParameter.PROCESS.value/THREAD.value equal "process"/"thread", get(key) reads the same keys the callsite adder populates -- equivalent to the generic lookup below, just with a numeric default. The "(unknown)" fallback is correctly kept for the %s text params. The parametrized regression test covers both the missing-keys repro and the explicit-None case and is red before / green after. This also cleanly supersedes the now-closed #66230, which took a heavier route (live os.getpid()/threading.get_ident() plus a wa rning-bridge change in structlog.py). LGTM. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
