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

   `airflow db clean` can run many batches across multiple metadata tables, but 
its progress lines do not identify the source table. A line such as `Performing 
Delete (batch 240, max 10000 rows)...` is therefore difficult to attribute or 
filter when reading cleanup logs.
   
   This change makes each per-table cleanup message self-contained:
   
   - row-count, delete, archive-copy, and completion messages include the 
source table name;
   - each successful delete reports the number of rows actually deleted;
   - batched delete results include the batch number;
   - singular and plural row labels are handled correctly.
   
   For example:
   
   ```text
   Performing Delete from xcom (batch 240, max 10000 rows)...
   Deleted 5000 rows from xcom (batch 240).
   Finished Performing Delete from xcom
   ```
   
   ## Tests
   
   - `uv run --project airflow-core pytest 
airflow-core/tests/unit/utils/test_db_cleanup.py --with-db-init -xq` (SQLite: 
100 passed, 3 backend-specific skipped)
   - Focused batched and unbatched progress-output tests (2 passed)
   - `prek run --from-ref upstream/main --stage pre-commit`
   - `prek run --from-ref upstream/main --stage manual --skip 
compile-ui-assets-dev --skip view-skill-eval --skip run-skill-eval-codex`
   
   ---
   
   ##### Was generative AI tooling used to co-author this PR?
   
   - [X] Yes (Codex)
   
   Generated-by: Codex following [the 
guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions)
   
   ---
   
   * Read the **[Pull Request 
Guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#pull-request-guidelines)**
 for more information. Note: commit author/co-author name and email in commits 
become permanently public when merged.
   * For fundamental code changes, an Airflow Improvement Proposal (AIP) is 
needed.
   * When adding dependency, check compliance with the ASF 3rd Party License 
Policy.
   


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