GitHub user dosubot[bot] added a comment to the discussion: Superset db upgrade 
is not triggering upgrade

<!-- Answer -->
Superset doesn't have a built-in progress bar or percentage indicator for 
database upgrades. However, some migration scripts do log progress in the 
console or logs. For example, you might see lines like `Progress: 1000/16000 
(6.25%)` or `Upgraded X/Y charts` in your logs if the migration uses batch 
utilities or paginated updates. You can tail your migration logs (stdout or log 
files) to watch for these messages and estimate how far along the upgrade is by 
comparing the current count to the total number of records being processed 
([source](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset/migrations/shared/utils.py#L138-L310),
 
[source](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset/migrations/shared/migrate_viz/base.py#L206-L213)).

If you don't see any progress logs, you can still monitor database activity 
(like you're doing with `pg_stat_activity`) to confirm the upgrade is running, 
but this won't give you a percentage. If you want more granular progress 
tracking in the future, you could modify your migration scripts to use these 
batch utilities, which will emit progress updates as they process records.


<!-- Dosu Comment Footer -->
*To reply, just mention [@dosu](https://go.dosu.dev/dosubot).*

---
<sup>How did I do? 
[Good](https://app.dosu.dev/response-feedback/9bca1b63-0467-4a53-8aef-ad0d177f02da?feedback_type=great_response)
 | 
[Irrelevant](https://app.dosu.dev/response-feedback/9bca1b63-0467-4a53-8aef-ad0d177f02da?feedback_type=irrelevant_answer)
 | 
[Incorrect](https://app.dosu.dev/response-feedback/9bca1b63-0467-4a53-8aef-ad0d177f02da?feedback_type=incorrect_sources)
 | 
[Verbose](https://app.dosu.dev/response-feedback/9bca1b63-0467-4a53-8aef-ad0d177f02da?feedback_type=too_verbose)
 | 
[Hallucination](https://app.dosu.dev/response-feedback/9bca1b63-0467-4a53-8aef-ad0d177f02da?feedback_type=hallucination)
 | [Report 
🐛](https://app.dosu.dev/response-feedback/9bca1b63-0467-4a53-8aef-ad0d177f02da?feedback_type=bug_report)
 | 
[Other](https://app.dosu.dev/response-feedback/9bca1b63-0467-4a53-8aef-ad0d177f02da?feedback_type=other)</sup>

[![Chat with 
Dosu](https://dosu.dev/dosu-chat-badge.svg)](https://app.dosu.dev/a28d3c7e-a9d3-459e-9fb6-3a6f9ff4f357/ask?utm_source=github)&nbsp;[![Open
 in 
Cursor](https://dosu.dev/dosu-in-cursor.svg)](https://cursor.com/link/prompt?text=Superset%20doesn%27t%20have%20a%20built-in%20progress%20bar%20or%20percentage%20indicator%20for%20database%20upgrades.%20However%2C%20some%20migration%20scripts%20do%20log%20progress%20in%20the%20console%20or%20logs.%20For%20example%2C%20you%20might%20see%20lines%20like%20%60Progress%3A%201000/16000%20%286.25%25%29%60%20or%20%60Upgraded%20X/Y%20charts%60%20in%20your%20logs%20if%20the%20migration%20uses%20batch%20utilities%20or%20paginated%20updates.%20You%20can%20tail%20your%20migration%20logs%20%28stdout%20or%20log%20files%29%20to%20watch%20for%20these%20messages%20and%20estimate%20how%20far%20along%20the%20upgrade%20is%20by%20comparing%20the%20current%20count%20to%20the%20total%20number%20of%20records%20being%20processed%C2%A0%28%5Bsource%5D%28https
 
%3A//github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset/migrations/shared/utils.py%23L138-L310%29%2C%C2%A0%5Bsource%5D%28https%3A//github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset/migrations/shared/migrate_viz/base.py%23L206-L213%29%29.%0A%0AIf%20you%20don%27t%20see%20any%20progress%20logs%2C%20you%20can%20still%20monitor%20database%20activity%20%28like%20you%27re%20doing%20with%20%60pg_stat_activity%60%29%20to%20confirm%20the%20upgrade%20is%20running%2C%20but%20this%20won%27t%20give%20you%20a%20percentage.%20If%20you%20want%20more%20granular%20progress%20tracking%20in%20the%20future%2C%20you%20could%20modify%20your%20migration%20scripts%20to%20use%20these%20batch%20utilities%2C%20which%20will%20emit%20progress%20updates%20as%20they%20process%20records.)&nbsp;[![Join
 
Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[![Share
 on X](https://img.sh
 
ields.io/badge/X-share-black)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/apache/superset/discussions/37261)

GitHub link: 
https://github.com/apache/superset/discussions/37261#discussioncomment-15544923

----
This is an automatically sent email for [email protected].
To unsubscribe, please send an email to: 
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to