Skip to content

feat!: remove local codejail - #39382

Open
MoisesGSalas wants to merge 1 commit into
openedx:masterfrom
eduNEXT:mgs/remove-local-codejail
Open

MoisesGSalas wants to merge 1 commit into
openedx:masterfrom
eduNEXT:mgs/remove-local-codejail

Conversation

@MoisesGSalas

@MoisesGSalas MoisesGSalas commented Nov 17, 2026 •

Copy link
Copy Markdown

As part of #36639 we are removing the ability to invoke the codejail library from within the platform directly and instead will only support the remote REST service as the only interface.

Most of the actual removal happened at xblocks-core@v3.0.0

  • All the settings used to configure the codejail library alongside the configuration middleware (codejail.django_integration.ConfigureCodeJailMiddleware) have been removed.
  • The UseUnsafeCodejail decorators that invoked codejail directly were moved in favor of a mock implementation of the remote service provided by xblock-core (xblock_problem.capa.testing.codejail.send_safe_exec_request_locally) configured in the test settings.
  • The sandbox requirements were removed and are now defined in the openedx/codejail-service repository.
  • The ENABLE_CODEJAIL_REST_SERVICE setting have been removed in favor of
    CODE_JAIL_REST_SERVICE_HOST which defaults to None.

BREAKING CHANGE: Courses matched by COURSES_WITH_UNSAFE_CODE fail when their Python code executes. Remove those courses from the setting

Additional notes

I updated lms/djangoapps/debug/views.py to actually use the safe_exec interface provided by xblocks-core instead of calling directly codejail, but I'm pretty sure we can remove this view.

Should i also remove the xmodule/capa/safe_exec/remote_exec.py shim? It was added on cd733fe#diff-0610b7a1b6b61077dcc9235b7de205e20f5f0e1e5da991b3f860444a08ac4610 and landed on verawood, so maybe it's ready to be deleted?

@openedx-webhooks openedx-webhooks added open-source-contribution PR author is not from Axim or 2U core contributor PR author is a Core Contributor (who may or may not have write access to this repo). labels Nov 17, 2026
@openedx-webhooks

openedx-webhooks commented Nov 17, 2026 •

Copy link
Copy Markdown

Thanks for the pull request, @MoisesGSalas!

This repository is currently maintained by @openedx/wg-maintenance-openedx-platform-oncall.

Once you've gone through the following steps feel free to tag them in a comment and let them know that your changes are ready for engineering review.

🔘 Get product approval

If you haven't already, check this list to see if your contribution needs to go through the product review process.

  • If it does, you'll need to submit a product proposal for your contribution, and have it reviewed by the Product Working Group.
    • This process (including the steps you'll need to take) is documented here.
  • If it doesn't, simply proceed with the next step.
🔘 Provide context

To help your reviewers and other members of the community understand the purpose and larger context of your changes, feel free to add as much of the following information to the PR description as you can:

  • Dependencies

    This PR must be merged before / after / at the same time as ...

  • Blockers

    This PR is waiting for OEP-1234 to be accepted.

  • Timeline information

    This PR must be merged by XX date because ...

  • Partner information

    This is for a course on edx.org.

  • Supporting documentation
  • Relevant Open edX discussion forum threads
🔘 Get a green build

If one or more checks are failing, continue working on your changes until this is no longer the case and your build turns green.

Details
Where can I find more information?

If you'd like to get more details on all aspects of the review process for open source pull requests (OSPRs), check out the following resources:

When can I expect my changes to be merged?

Our goal is to get community contributions seen and reviewed as efficiently as possible.

However, the amount of time that it takes to review and merge a PR can vary significantly based on factors such as:

  • The size and impact of the changes that it introduces
  • The need for product review
  • Maintenance status of the parent repository

💡 As a result it may take up to several weeks or months to complete a review and merge your PR.

@MoisesGSalas

Copy link
Copy Markdown
Author

@feanil i think this one is ready for review.

feanil pushed a commit that referenced this pull request Nov 19, 2026
Upgrades edx-submissions to 4.1.2 and xblocks-core to 2.0.2 so that the
lang, hide_output, and skip_grader keys in a problem's <grader_payload>
reach xqueue-watcher again. They were being dropped when the XQueue body
was rebuilt from ExternalGraderDetail, which only kept "grader". Losing
skip_grader was the worst of it: the watcher would try to grade code the
course never meant to run.

These releases also make submission_time use XQueue's format, stop
sending a hardcoded random_seed, and surface send_to_submission errors to
the learner instead of leaving the submission "queued".

edx-submissions 4.1.1 adds a migration for the new ExternalGraderDetail
fields.

xblocks-core is pinned to 2.0.2 rather than 3.0.0, since 3.0.0 removes
local CodeJail and is being handled in #39382.

See openedx/edx-submissions#390

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
feanil added a commit that referenced this pull request Nov 19, 2026
Upgrades edx-submissions to 4.1.2 and xblocks-core to 2.0.2 so that the
lang, hide_output, and skip_grader keys in a problem's <grader_payload>
reach xqueue-watcher again. They were being dropped when the XQueue body
was rebuilt from ExternalGraderDetail, which only kept "grader". Losing
skip_grader was the worst of it: the watcher would try to grade code the
course never meant to run.

These releases also make submission_time use XQueue's format, stop
sending a hardcoded random_seed, and surface send_to_submission errors to
the learner instead of leaving the submission "queued".

edx-submissions 4.1.1 adds a migration for the new ExternalGraderDetail
fields.

xblocks-core is pinned to 2.0.2 rather than 3.0.0, since 3.0.0 removes
local CodeJail and is being handled in #39382.

See openedx/edx-submissions#390

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
As part of <openedx#36639> we are
removing the ability to invoke the codejail library from within the platform
directly and instead will only support the remote REST service as the only interface.

Most of the actual removal happened at xblocks-core@v3.0.0

- All the settings used to configure the codejail library alongside the
  configuration middleware
  (`codejail.django_integration.ConfigureCodeJailMiddleware`) have been
  removed.
- The `UseUnsafeCodejail` decorators that invoked codejail directly were moved
  in favor of a mock implementation of the remote service provided by
  `xblock-core`
  (`xblock_problem.capa.testing.codejail.send_safe_exec_request_locally`)
  configured in the test settings.
- The sandbox requirements were removed and are now defined in the
  openedx/codejail-service repository.
- The `ENABLE_CODEJAIL_REST_SERVICE` setting have been removed in favor of
  `CODE_JAIL_REST_SERVICE_HOST` which defaults to None.

BREAKING CHANGE: Courses matched by COURSES_WITH_UNSAFE_CODE fail when
their Python code executes. Remove those courses from the setting
@MoisesGSalas
MoisesGSalas force-pushed the mgs/remove-local-codejail branch from a094747 to 3ae28f7 Compare November 20, 2026 17:51

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core contributor PR author is a Core Contributor (who may or may not have write access to this repo). open-source-contribution PR author is not from Axim or 2U

Projects

Status: Needs Triage

Development

Successfully merging this pull request may close these issues.

2 participants