Skip to content

fix: add managemement command to filter hook#200

Open
ktyagiapphelix2u wants to merge 5 commits into
release-ulmofrom
ktyagi/filter
Open

fix: add managemement command to filter hook#200
ktyagiapphelix2u wants to merge 5 commits into
release-ulmofrom
ktyagi/filter

Conversation

@ktyagiapphelix2u

Copy link
Copy Markdown

Description

Add a pluggable filter hook in manage.py so Django management command execution can be intercepted by configured Open edX filter pipelines. This keeps edx-platform limited to the public integration point and avoids embedding org-specific monitoring logic here

Reference Ticket

https://2u-internal.atlassian.net/browse/BOMS-151

@ktyagiapphelix2u
ktyagiapphelix2u marked this pull request as ready for review July 14, 2026 13:37
Copilot AI review requested due to automatic review settings July 14, 2026 13:37

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Adds an Open edX Filters integration point to manage.py so Django management command execution can be intercepted (e.g., wrapped/monitored) via configured filter pipelines, keeping org-specific logic out of edx-platform.

Changes:

  • Introduces a new public filter type (org.openedx.platform.management.command.execute.requested.v1) for management command execution.
  • Wraps execute_from_command_line in a command_runner callable and passes it through the filter pipeline before execution.

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

Comment thread manage.py Outdated
Comment thread manage.py Outdated
Copilot AI review requested due to automatic review settings July 20, 2026 09:30

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.

Comments suppressed due to low confidence (1)

manage.py:135

  • OpenEdxPublicFilter.run_pipeline() appears to return a tuple of the filtered values (as used elsewhere in this repo via tuple-unpacking of *.run_filter(...)). Treating the result as a dict (pipeline_output.get(...)) will raise AttributeError and cause the broad except to always fall back to command_runner, effectively preventing the filter pipeline from ever overriding the runner.
        pipeline_output = ManagementCommandExecutionRequested.run_filter(
            command_name=command_name,
            service_variant=os.environ.get("SERVICE_VARIANT", edx_args.service_variant),
            command_runner=command_runner,
        )

Comment thread manage.py Outdated
Copilot AI review requested due to automatic review settings July 23, 2026 05:13

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

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

Comment thread manage.py
Comment thread manage.py
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.

4 participants