Repository navigation
fix(migration-risk): group migrations by configured app label - #322
Merged
Merged
Conversation
|
Caution Review failedThe pull request is closed.
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
# Conflicts: # CHANGELOG.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Addresses the
migration-riskpart of #308.Group migrations by the literal Django app label from an unambiguous
AppConfiginapps.py. This keeps different apps in folders namedtestsfrom sharing a graph, while copies with the same label still share a graph. Map the current model schema by package path so a migration is compared with models from its own app.On the five Ralph test apps named in the report (
b80ca56), this removes all nine false conflict findings. The regression tests also cover local AppConfig inheritance, a real conflict spanning duplicate copies of one app, and a deletion warning for a model still declared in a relabeled app.driftandmigration-depsuse directory-name grouping.Validation: 1,244 pytest tests and 145 subtests passed, with 6 skipped. Ruff and
git diff --checkpassed. Windows Application Control blocked the local mypy executable, so mypy still needs GitHub CI.I used Codex to help reproduce the issue, write the patch, and run the local checks.