UI: Add option to configure default task log source#64185
UI: Add option to configure default task log source#64185AyushCoder9 wants to merge 4 commits intoapache:mainfrom
Conversation
|
Congratulations on your first Pull Request and welcome to the Apache Airflow community! If you have any issues or are unsure about any anything please check our Contributors' Guide (https://github.com/apache/airflow/blob/main/contributing-docs/README.rst)
|
| const sourceFilters = | ||
| sourceFiltersParam.length > 0 | ||
| ? sourceFiltersParam.includes("all") | ||
| ? [] | ||
| : sourceFiltersParam | ||
| : defaultLogSource !== undefined && defaultLogSource !== "" && defaultLogSource !== "All Sources" | ||
| ? [defaultLogSource] | ||
| : []; |
There was a problem hiding this comment.
Would love a UI unit test here to make sure that we properly respect config vs when a user manually changes the filter.
There was a problem hiding this 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
Description
Introduces a new configuration setting
api.default_ui_log_sourceto specify a default log source for reading task logs in the web UI instead of defaulting strictly to "All Sources".Backend:
default_ui_log_sourceparameter within airflow/config_templates/config.yml under the[api]section.Frontend:
SOURCEare empty.closes: #64159