AAP-56032 Do not run feature flag logic for partial migrations#918
Open
AlanCoding wants to merge 2 commits intoansible:develfrom
Open
AAP-56032 Do not run feature flag logic for partial migrations#918AlanCoding wants to merge 2 commits intoansible:develfrom
AlanCoding wants to merge 2 commits intoansible:develfrom
Conversation
|
DVCS PR Check Results: PR appears valid (JIRA key(s) found) |
|
13 tasks
zkayyali812
added a commit
that referenced
this pull request
Feb 13, 2026
## Description Alternativate fix to - #918, with more concise check and corrected log message - What is being changed? Adds logic to block feature flags loading code from running during partial migrations - Why is this change needed? This change is needed to ensure restore flow works reliably - How does this change address the issue? This change addresses the issue by adding a guard to ensure that the feature flags load logic does not run when migrations are incomplete ## Type of Change <!-- Mandatory: Check one or more boxes that apply --> - [x] Bug fix (non-breaking change which fixes an issue) ## Self-Review Checklist <!-- These items help ensure quality - they complement our automated CI checks --> - [ ] I have performed a self-review of my code - [ ] I have added relevant comments to complex code sections - [ ] I have updated documentation where needed - [ ] I have considered the security impact of these changes - [ ] I have considered performance implications - [ ] I have thought about error handling and edge cases - [ ] I have tested the changes in my local environment ## Testing Instructions <!-- Optional for test-only changes. Mandatory for all other changes --> <!-- Must be detailed enough for reviewers to reproduce --> ### Prerequisites <!-- List any specific setup required --> ### Steps to Test 1. 2. 3. ### Expected Results <!-- Describe what should happen after following the steps --> ## Additional Context <!-- Optional but helpful information --> ### Required Actions <!-- Check if changes require work in other areas --> <!-- Remove section if no external actions needed --> - [ ] Requires documentation updates <!-- API docs, feature docs, deployment guides --> - [ ] Requires downstream repository changes <!-- Specify repos: django-ansible-base, eda-server, etc. --> - [ ] Requires infrastructure/deployment changes <!-- CI/CD, installer updates, new services --> - [ ] Requires coordination with other teams <!-- UI team, platform services, infrastructure --> - [ ] Blocked by PR/MR: #XXX <!-- Reference blocking PRs/MRs with brief context --> ### Screenshots/Logs <!-- Add if relevant to demonstrate the changes --> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Improved database migration reliability by adding a safety check that defers feature flag initialization until all pending migrations are complete, reducing potential errors during migration processes. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
huffmanca
pushed a commit
to huffmanca/django-ansible-base
that referenced
this pull request
Apr 13, 2026
## Description Alternativate fix to - ansible#918, with more concise check and corrected log message - What is being changed? Adds logic to block feature flags loading code from running during partial migrations - Why is this change needed? This change is needed to ensure restore flow works reliably - How does this change address the issue? This change addresses the issue by adding a guard to ensure that the feature flags load logic does not run when migrations are incomplete ## Type of Change <!-- Mandatory: Check one or more boxes that apply --> - [x] Bug fix (non-breaking change which fixes an issue) ## Self-Review Checklist <!-- These items help ensure quality - they complement our automated CI checks --> - [ ] I have performed a self-review of my code - [ ] I have added relevant comments to complex code sections - [ ] I have updated documentation where needed - [ ] I have considered the security impact of these changes - [ ] I have considered performance implications - [ ] I have thought about error handling and edge cases - [ ] I have tested the changes in my local environment ## Testing Instructions <!-- Optional for test-only changes. Mandatory for all other changes --> <!-- Must be detailed enough for reviewers to reproduce --> ### Prerequisites <!-- List any specific setup required --> ### Steps to Test 1. 2. 3. ### Expected Results <!-- Describe what should happen after following the steps --> ## Additional Context <!-- Optional but helpful information --> ### Required Actions <!-- Check if changes require work in other areas --> <!-- Remove section if no external actions needed --> - [ ] Requires documentation updates <!-- API docs, feature docs, deployment guides --> - [ ] Requires downstream repository changes <!-- Specify repos: django-ansible-base, eda-server, etc. --> - [ ] Requires infrastructure/deployment changes <!-- CI/CD, installer updates, new services --> - [ ] Requires coordination with other teams <!-- UI team, platform services, infrastructure --> - [ ] Blocked by PR/MR: #XXX <!-- Reference blocking PRs/MRs with brief context --> ### Screenshots/Logs <!-- Add if relevant to demonstrate the changes --> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Improved database migration reliability by adding a safety check that defers feature flag initialization until all pending migrations are complete, reducing potential errors during migration processes. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
Contributor
|
Hey @AlanCoding I think this PR can be closed now. This fix was already resolved here - #942 |
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.




Description
Trying to test #916, I couldn't do this:
for
Because the feature flags failed on non-existing table, which is bad practice.
Type of Change
Self-Review Checklist
Note
Prevents feature-flag DB operations during partial migrations.
migrations_are_complete()guard inload_feature_flags()andpurge_feature_flags()to early-return with a debug logdab_feature_flags.AAPFlagwhen schema/tables aren’t ready during partial/incomplete migrationsWritten by Cursor Bugbot for commit 3c3a27c. This will update automatically on new commits. Configure here.