fix: point to new models in channel_migrations app#41
fix: point to new models in channel_migrations app#41sameenfatima78 merged 1 commit intorelease-ulmofrom
Conversation
fix: fixed tests and quality failures
There was a problem hiding this comment.
Pull Request Overview
This PR backports changes to support the migration from integrated_channels to channel_integrations module paths by introducing conditional imports based on the ENABLE_LEGACY_INTEGRATED_CHANNELS feature flag.
- Adds conditional imports that check the feature flag to determine which module path to use
- Updates both production code and test mocks to support both legacy and new channel integration paths
- Ensures backward compatibility during the transition period
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| openedx/features/enterprise_support/signals.py | Adds conditional imports for task functions based on the feature flag |
| openedx/features/enterprise_support/tests/test_signals.py | Updates test mocks to conditionally patch the correct task paths |
| openedx/core/djangoapps/user_api/management/commands/create_user_gdpr_testing.py | Adds conditional import for SapSuccessFactors model |
| openedx/core/djangoapps/user_api/accounts/views.py | Adds conditional imports for Degreed and SapSuccessFactors models with aliasing for Degreed2 |
| openedx/core/djangoapps/user_api/accounts/tests/test_retirement_views.py | Adds conditional import for SapSuccessFactors model in tests |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| from channel_integrations.degreed2.models import Degreed2LearnerDataTransmissionAudit \ | ||
| as DegreedLearnerDataTransmissionAudit |
There was a problem hiding this comment.
[nitpick] The backslash line continuation can be avoided by using parentheses, which is the preferred Python style. Consider wrapping the import statement in parentheses instead:\npython\nfrom channel_integrations.degreed2.models import (\n Degreed2LearnerDataTransmissionAudit as DegreedLearnerDataTransmissionAudit\n)\n
| from channel_integrations.degreed2.models import Degreed2LearnerDataTransmissionAudit \ | |
| as DegreedLearnerDataTransmissionAudit | |
| from channel_integrations.degreed2.models import ( | |
| Degreed2LearnerDataTransmissionAudit as DegreedLearnerDataTransmissionAudit | |
| ) |
Backports changes from openedx#37654