AyushCoder9 commented on code in PR #64185:
URL: https://github.com/apache/airflow/pull/64185#discussion_r2991204939
##########
airflow-core/src/airflow/ui/src/pages/TaskInstance/Logs/Logs.tsx:
##########
@@ -82,6 +82,17 @@ export const Logs = () => {
const [fullscreen, setFullscreen] = useState(false);
const [expanded, setExpanded] = useState(false);
+ const defaultLogSource = useConfig("default_ui_log_source") as string |
undefined;
+
+ const sourceFilters =
+ sourceFiltersParam.length > 0
+ ? sourceFiltersParam.includes("all")
+ ? []
+ : sourceFiltersParam
+ : defaultLogSource !== undefined && defaultLogSource !== "" &&
defaultLogSource !== "All Sources"
+ ? [defaultLogSource]
+ : [];
Review Comment:
I've completed the implementation and verification for the
api.default_ui_log_source configuration. Here is a concise comment you can use
for the PR or GitHub issue:
Feature Implemented: api.default_ui_log_source configuration support.
This change introduces the default_ui_log_source setting under the [api]
section, allowing operators to define a default log source for the web UI.
Key Highlights:
Backend: Added the config to config.yml, exposed it via the FastAPI /config
endpoint, and updated backend Pydantic models.
Frontend: Implemented logic in Logs.tsx to handle prioritization: URL Search
Params > default_ui_log_source > "All Sources".
UI Consistency: Updated
TaskLogHeader.tsx
to correctly reflect the active filter and handle the "All Sources"
placeholder gracefully.
Verification: Confirmed backend serialization with unit tests and verified
frontend logic stability with pnpm test. Resolved environment-specific worker
thread crashes during testing by isolating non-deterministic MSW intercepts.
@bbovenzi
--
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]