AyushCoder9 opened a new pull request, #64185:
URL: https://github.com/apache/airflow/pull/64185

   ### Description
   Introduces a new configuration setting `api.default_ui_log_source` to 
specify a default log source for reading task logs in the web UI instead of 
defaulting strictly to "All Sources".
   
   - **Backend:** 
     - Added `default_ui_log_source` parameter within 
[airflow/config_templates/config.yml](cci:7://file:///Users/ayushkumarsingh/Desktop/PROJECTS/OpenSource/airflow/airflow-core/src/airflow/config_templates/config.yml:0:0-0:0)
 under the `[api]` section.
     - Expose the parameter in the general UI payload models inside 
[datamodels/ui/config.py](cci:7://file:///Users/ayushkumarsingh/Desktop/PROJECTS/OpenSource/airflow/airflow-core/src/airflow/api_fastapi/core_api/datamodels/ui/config.py:0:0-0:0)
 and returned aggregator routing endpoints at 
[routes/ui/config.py](cci:7://file:///Users/ayushkumarsingh/Desktop/PROJECTS/OpenSource/airflow/airflow-core/src/airflow/api_fastapi/core_api/routes/ui/config.py:0:0-0:0).
     - Regenerated UI openapi types to support the strictly typed fallback 
references.
   
   - **Frontend:**
     - Modified 
[Logs.tsx](cci:7://file:///Users/ayushkumarsingh/Desktop/PROJECTS/OpenSource/airflow/airflow-core/src/airflow/ui/src/queries/useLogs.tsx:0:0-0:0)
 query logic to fall back accurately on 
[useConfig](cci:1://file:///Users/ayushkumarsingh/Desktop/PROJECTS/OpenSource/airflow/airflow-core/src/airflow/ui/src/queries/useConfig.tsx:21:0-25:2)
 defaults when query search parameters for `SOURCE` are empty.
     - Adapted 
[TaskLogHeader.tsx](cci:7://file:///Users/ayushkumarsingh/Desktop/PROJECTS/OpenSource/airflow/airflow-core/src/airflow/ui/src/pages/TaskInstance/Logs/TaskLogHeader.tsx:0:0-0:0)
 visually select mapping default layouts to represent the configured fallback 
parameters neatly.
     - Successfully verified linting and all unit tests passed flawlessly with 
0 errors natively.
   
   ---
   
   closes: #64159
   
   ---
   
   ##### Was generative AI tooling used to co-author this PR?
   
   - [x] Yes (Antigravity)
   
   Generated-by: Antigravity following [the 
guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions)
   


-- 
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]

Reply via email to