Skip to content

Remove redundant log messages from database migrations#18938

Merged
harupy merged 2 commits intomasterfrom
copilot/remove-redundant-logs-db-migration
Nov 20, 2025
Merged

Remove redundant log messages from database migrations#18938
harupy merged 2 commits intomasterfrom
copilot/remove-redundant-logs-db-migration

Conversation

Copy link
Contributor

Copilot AI commented Nov 20, 2025

Related Issues/PRs

#xxx

What changes are proposed in this pull request?

Database migrations were emitting redundant log messages that duplicated Alembic's built-in migration logging, creating confusing output:

INFO  [alembic.runtime.migration] Running upgrade 89d4b8295536 -> 2b4d017a5e9b, add model registry tables to db
INFO  [2b4d017a5e9b_add_model_registry_tables_to_db_py] Adding registered_models and model_versions tables to database.
INFO  [2b4d017a5e9b_add_model_registry_tables_to_db_py] Migration complete!

Changes:

  • Remove "Migration complete!" log from 89d4b8295536_create_latest_metrics_table.py
  • Remove "Adding registered_models and model_versions tables to database." and "Migration complete!" logs from 2b4d017a5e9b_add_model_registry_tables_to_db.py
  • Remove unused logging imports from 2b4d017a5e9b_add_model_registry_tables_to_db.py
  • Preserve important warnings and database statistics in 89d4b8295536_create_latest_metrics_table.py

How is this PR tested?

  • Existing unit/integration tests
  • New unit/integration tests
  • Manual tests

Does this PR require documentation update?

  • No. You can skip the rest of this section.
  • Yes. I've updated:
    • Examples
    • API references
    • Instructions

Release Notes

Is this a user-facing change?

  • No. You can skip the rest of this section.
  • Yes. Give a description of this change to be included in the release notes for MLflow users.

What component(s), interfaces, languages, and integrations does this PR affect?

Components

  • area/tracking: Tracking Service, tracking client APIs, autologging
  • area/models: MLmodel format, model serialization/deserialization, flavors
  • area/model-registry: Model Registry service, APIs, and the fluent client calls for Model Registry
  • area/scoring: MLflow Model server, model deployment tools, Spark UDFs
  • area/evaluation: MLflow model evaluation features, evaluation metrics, and evaluation workflows
  • area/gateway: MLflow AI Gateway client APIs, server, and third-party integrations
  • area/prompts: MLflow prompt engineering features, prompt templates, and prompt management
  • area/tracing: MLflow Tracing features, tracing APIs, and LLM tracing functionality
  • area/projects: MLproject format, project running backends
  • area/uiux: Front-end, user experience, plotting, JavaScript, JavaScript dev server
  • area/build: Build and test infrastructure for MLflow
  • area/docs: MLflow documentation pages

How should the PR be classified in the release notes? Choose one:

  • rn/none - No description will be included. The PR will be mentioned only by the PR number in the "Small Bugfixes and Documentation Updates" section
  • rn/breaking-change - The PR will be mentioned in the "Breaking Changes" section
  • rn/feature - A new user-facing feature worth mentioning in the release notes
  • rn/bug-fix - A user-facing bug fix worth mentioning in the release notes
  • rn/documentation - A user-facing documentation change worth mentioning in the release notes

Should this PR be included in the next patch release?

  • Yes (this PR will be cherry-picked and included in the next patch release)
  • No (this PR will be included in the next minor release)
Original prompt

Remove redundant logs (marked with 👈) shown during DB migration. They are confusing and don't provide any extra/useful information

...
2025-11-20 10:09:40 INFO  [alembic.runtime.migration] Running upgrade  -> 451aebb31d03, add metric step
2025-11-20 10:09:40 INFO  [alembic.runtime.migration] Running upgrade 451aebb31d03 -> 90e64c465722, migrate user column to tags
2025-11-20 10:09:40 INFO  [alembic.runtime.migration] Running upgrade 90e64c465722 -> 181f10493468, allow nulls for metric values
2025-11-20 10:09:40 INFO  [alembic.runtime.migration] Running upgrade 181f10493468 -> df50e92ffc5e, Add Experiment Tags Table
2025-11-20 10:09:40 INFO  [alembic.runtime.migration] Running upgrade df50e92ffc5e -> 7ac759974ad8, Update run tags with larger limit
2025-11-20 10:09:40 INFO  [alembic.runtime.migration] Running upgrade 7ac759974ad8 -> 89d4b8295536, create latest metrics table
2025-11-20 10:09:40 INFO  [89d4b8295536_create_latest_metrics_table_py] Migration complete! 👈
2025-11-20 10:09:40 INFO  [alembic.runtime.migration] Running upgrade 89d4b8295536 -> 2b4d017a5e9b, add model registry tables to db
2025-11-20 10:09:40 INFO  [2b4d017a5e9b_add_model_registry_tables_to_db_py] Adding registered_models and model_versions tables to database. 👈
2025-11-20 10:09:40 INFO  [2b4d017a5e9b_add_model_registry_tables_to_db_py] Migration complete!  👈
...

💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

@harupy harupy marked this pull request as ready for review November 20, 2025 10:16
@github-actions
Copy link
Contributor

@Copilot Thank you for the contribution! Could you fix the following issue(s)?

⚠ Invalid PR template

This PR does not appear to have been filed using the MLflow PR template. Please copy the PR template from here and fill it out.

Co-authored-by: harupy <17039389+harupy@users.noreply.github.com>
Copilot AI changed the title [WIP] Remove redundant logs during DB migration Remove redundant log messages from database migrations Nov 20, 2025
Copilot AI requested a review from harupy November 20, 2025 10:29
@github-actions github-actions bot added v3.6.1 area/model-registry Model registry, model registry APIs, and the fluent client calls for model registry area/tracking Tracking service, tracking client APIs, autologging rn/none List under Small Changes in Changelogs. labels Nov 20, 2025
@harupy harupy enabled auto-merge November 20, 2025 10:36
@harupy harupy added this pull request to the merge queue Nov 20, 2025
Merged via the queue into master with commit 1c9a63b Nov 20, 2025
59 of 83 checks passed
@harupy harupy deleted the copilot/remove-redundant-logs-db-migration branch November 20, 2025 11:12
Tian-Sky-Lan pushed a commit to Tian-Sky-Lan/mlflow that referenced this pull request Nov 24, 2025
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: harupy <17039389+harupy@users.noreply.github.com>
Signed-off-by: Tian Lan <sky.blue266000@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/model-registry Model registry, model registry APIs, and the fluent client calls for model registry area/tracking Tracking service, tracking client APIs, autologging rn/none List under Small Changes in Changelogs. v3.6.1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants