Skip to content

Update GeoLite Database#44

Closed
ktyagiapphelix2u wants to merge 10 commits intorelease-ulmofrom
ktyagiapphelix2u/geoip2-bot-update-country-database-bf2c271
Closed

Update GeoLite Database#44
ktyagiapphelix2u wants to merge 10 commits intorelease-ulmofrom
ktyagiapphelix2u/geoip2-bot-update-country-database-bf2c271

Conversation

@ktyagiapphelix2u
Copy link

PR generated by workflow on behalf of @ktyagiapphelix2u.

@ktyagiapphelix2u ktyagiapphelix2u requested review from a team and Copilot November 21, 2025 08:01
@ktyagiapphelix2u ktyagiapphelix2u deleted the ktyagiapphelix2u/geoip2-bot-update-country-database-bf2c271 branch November 21, 2025 08:02
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR contains two distinct sets of changes that appear to have been merged together: workflow configuration updates for the GeoLite database automation, and code changes implementing conditional imports for a package migration from integrated_channels to channel_integrations.

Key Changes:

  • Updated GitHub workflow to target release-ulmo branch instead of master, with improved reviewer configuration and authentication
  • Implemented conditional import pattern across multiple files to support migration from integrated_channels to channel_integrations package based on ENABLE_LEGACY_INTEGRATED_CHANNELS setting
  • Updated test mocks to use the same conditional import pattern for maintaining test compatibility during the migration

Reviewed Changes

Copilot reviewed 6 out of 7 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
.github/workflows/update-geolite-database.yml Updated workflow to target release-ulmo branch, changed reviewer to team, and switched to PAT authentication for org access
openedx/features/enterprise_support/signals.py Added conditional imports to support migration from integrated_channels to channel_integrations
openedx/features/enterprise_support/tests/test_signals.py Updated test mocks to use conditional import paths matching the signal changes
openedx/core/djangoapps/user_api/accounts/views.py Added conditional imports for Degreed and SAP SuccessFactors models with package migration support
openedx/core/djangoapps/user_api/management/commands/create_user_gdpr_testing.py Added conditional import for SAP SuccessFactors models to support package migration
openedx/core/djangoapps/user_api/accounts/tests/test_retirement_views.py Added conditional import for SAP SuccessFactors models in test file to match main code changes

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +200 to +202
'integrated_channels.integrated_channel.tasks.transmit_single_learner_data.apply_async'
if getattr(settings, 'ENABLE_LEGACY_INTEGRATED_CHANNELS', True) else
'channel_integrations.integrated_channel.tasks.transmit_single_learner_data.apply_async',
Copy link

Copilot AI Nov 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] The conditional expression spans multiple lines but is missing proper parentheses for clarity. While Python allows this syntax, wrapping the entire expression in parentheses would improve readability and make it clear that this is a single argument to patch().

Consider reformatting as:

with patch(
    (
        'integrated_channels.integrated_channel.tasks.transmit_single_learner_data.apply_async'
        if getattr(settings, 'ENABLE_LEGACY_INTEGRATED_CHANNELS', True) else
        'channel_integrations.integrated_channel.tasks.transmit_single_learner_data.apply_async'
    ),
    return_value=None
) as mock_task_apply:
Suggested change
'integrated_channels.integrated_channel.tasks.transmit_single_learner_data.apply_async'
if getattr(settings, 'ENABLE_LEGACY_INTEGRATED_CHANNELS', True) else
'channel_integrations.integrated_channel.tasks.transmit_single_learner_data.apply_async',
(
'integrated_channels.integrated_channel.tasks.transmit_single_learner_data.apply_async'
if getattr(settings, 'ENABLE_LEGACY_INTEGRATED_CHANNELS', True) else
'channel_integrations.integrated_channel.tasks.transmit_single_learner_data.apply_async'
),

Copilot uses AI. Check for mistakes.
Comment on lines +224 to +226
'integrated_channels.integrated_channel.tasks.transmit_single_subsection_learner_data.apply_async'
if getattr(settings, 'ENABLE_LEGACY_INTEGRATED_CHANNELS', True) else
'channel_integrations.integrated_channel.tasks.transmit_single_subsection_learner_data.apply_async',
Copy link

Copilot AI Nov 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] The conditional expression spans multiple lines but is missing proper parentheses for clarity. While Python allows this syntax, wrapping the entire expression in parentheses would improve readability and make it clear that this is a single argument to patch().

Consider reformatting as:

with patch(
    (
        'integrated_channels.integrated_channel.tasks.transmit_single_subsection_learner_data.apply_async'
        if getattr(settings, 'ENABLE_LEGACY_INTEGRATED_CHANNELS', True) else
        'channel_integrations.integrated_channel.tasks.transmit_single_subsection_learner_data.apply_async'
    ),
    return_value=None
) as mock_task_apply:

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants