Bug description
When I try upgrade the image to 5.0.0rc3,But error happend:
ERROR [flask_migrate] Error: Can't locate revision identified by '32bf93dfe2a4'
Screenshots/recordings
No response
Superset version
5.0.0rc3
Python version
3.10
Node version
18
Browser
Chrome
Additional context
No response
Checklist
- [ ] I have searched Superset docs and Slack and didn't find a solution to my problem.
- [ ] I have searched the GitHub issue tracker and didn't find a similar bug report.
- [ ] I have checked Superset's logs for errors and if I found a relevant Python stacktrace, I included it here as text in the "additional context" section.
Comment From: dosubot[bot]
The error "Can't locate revision identified by '32bf93dfe2a4'" means Alembic can't find the migration script for that revision. This script is present in the Superset 5.0.0rc3 migration chain and is required for the upgrade—it adds "ON DELETE CASCADE" to some foreign keys in the ab_permission_view_role
and ab_user_role
tables (source).
This error usually happens if your migration scripts directory is missing files, out of sync, or if your image/container doesn't include the latest migrations. Here are some things to check:
- Make sure your deployment includes all migration scripts from the new version, especially the one for
32bf93dfe2a4
. If you mount or copy thesuperset/migrations/versions
directory, verify it matches the 5.0.0rc3 source. - If you use custom Docker images, rebuild them from the 5.0.0rc3 base to ensure all migrations are present.
- If you have multiple environments or containers, ensure they all use the same set of migration scripts and aren't mixing files from different versions.
- If you previously skipped or deleted migration files, restore them from the official release.
If the migration script is present and you still see the error, check your Alembic version and configuration, but the Superset codebase uses standard Alembic patterns and should work with recent Alembic releases (source).
If you need to manually recover, you can copy the missing migration script from the 5.0.0rc3 source into your superset/migrations/versions
directory and rerun the migration.
Let me know if you need the contents of the migration script or more specific recovery steps.
To reply, just mention @dosu.
How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other
Comment From: zhangdong1015
but it is not in 5.0.0rc3 @dosu
Comment From: dosubot[bot]
The migration script 32bf93dfe2a4_add_on_cascade_in_fab_tables.py
is present in the Superset repository and is part of the migration chain for 5.0.0rc3, as confirmed by its inclusion and references in the migration scripts directory at the time of the release tag (source). If it's missing from your environment, your local files or image might be out of sync with the official release. Double-check that your superset/migrations/versions
directory matches the official 5.0.0rc3 source. If the script is missing, you can copy it from the repository and rerun the migration. If you’re using a custom Docker image, rebuild it from the official 5.0.0rc3 base to ensure all migrations are present.
To reply, just mention @dosu.
How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other
Comment From: zhangdong1015
The 5.0.0rc3
branch of superset
does not contain the path superset/migrations/versions/2025-03-19_17-46_32bf93dfe2a4_add_on_cascade_in_fab_tables.py. @dusu
Comment From: sadpandajoe
Looks like we might have cherried two migration files:
- https://github.com/apache/superset/blob/5.0.0rc2/superset/migrations/versions/2025-03-03_20-52_94e7a3499973_add_folders_column_to_dataset.py
- https://github.com/apache/superset/blob/5.0.0rc2/superset/migrations/versions/2025-03-19_17-46_32bf93dfe2a4_add_on_cascade_in_fab_tables.py
in RC2 that are removed in RC3. Because of this if you've already upgraded using rc2, it may run into a problem. I believe if you just downgrade your database to revision 74ad1125881c
and run the rc3 upgrade again you should be fine. cc: @michael-s-molina in case others are running into this in future RCs.
Comment From: michael-s-molina
You're correct @sadpandajoe. We had to remove migrations from RC3 due to reverting the FAB bump. People can follow your instructions in case they are upgrading from RC2.