Skip to content

[DEPR]: Local codejail #36639

Description

@robrap

Proposal Date

2025-04-30

Target Ticket Acceptance Date

TBD

Earliest Open edX Named Release Without This Functionality

Ulmo - 2025-10

Rationale

The capability of using codejail for problems with code execution is not going away. This DEPR is for removing the ability to run this locally as part of edx-platform, in favor of running remotely in a new codejail-service.

Using the new service for code execution is more secure, most especially because if anyone were able to break out of the layers of security, they would not be executing code on the same box as the LMS, which has access to data which is important to keep secure. Keeping code execution in another service entirely also allows additional layers of security that would not be possible when colocated with the LMS, such as preventing all outbound network connections.

Removal

The local codejail allows unsafe execution (non-sandboxed) for configured courses. This functionality will likely not be carried over to the new remote service.

The darklaunch feature, which enables one to choose between local and remote, is a good starting place to find all of the local codejail code that can be removed. See this github search for locations.

Replacement

The replacement is the new codejail-service.

Note: 2U/edX is running this in production.

Courses on COURSES_WITH_UNSAFE_CODE: there is no replacement for running a course's code outside the sandbox. If a course was on the list because its code exceeded the default resource limits, use per-course limits on the service instead:

  • Set CODE_JAIL["limit_overrides"] in the codejail-service settings to a dict keyed by the full course run key, using the same limit names as CODE_JAIL["limits"] (CPU, REALTIME, VMEM, FSIZE, NPROC).
  • The platform sends the course id with every execution. The key is matched exactly, not as a regex.
  • A limit of 0 disables it, except FSIZE where 0 means no files can be created.
  • Extra packages for the sandbox can be added with CODEJAIL_EXTRA_PIP_REQUIREMENTS in the plugin.

More information:

Deprecation

The legacy local calls could be marked as deprecated when someone moves this ticket forward.

Migration

A darklaunch capability was added so that the new remote codejail-service could be tested and tuned in production without causing issues. Once all is well, edx-platform configuration can be updated to switch users to the new service.

See https://docs.openedx.org/projects/edx-platform/en/latest/references/featuretoggles.html#featuretoggle-ENABLE_CODEJAIL_DARKLAUNCH

Additional Info

No response

Task List

  • Complete readiness of new replacement codejail-service
  • Make codejail-service Tutor plugin
  • Duplicate requirements in new codejail-service. It currently uses this defined in edx-platform to avoid duplication.
  • Remove local capability for codejail, including current darklaunch feature. Note: there are ideas for future darklaunch features for Python upgrades, but that must be handled differently.
  • Consider whether this is the last remaining OS-specific functionality in edx-platform, and if we could update workflows to use ubuntu-latest like in this PR: build: updated ubuntu version to latest edx/edx-platform#75.

Activity

  1. added
    deprProposal for deprecation & removal per OEP-21
    on Apr 30, 2025
  2. robrap commented on May 23, 2025

    @robrap
    ContributorAuthor

    [inform] This DEPR is in the Draft state. It can't move forward without a DEPR coordinator to help update it to match the updated DEPR template. No action is required, unless anyone wants to move this out of Draft.

  3. MoisesGSalas commented on Oct 30, 2025

    @MoisesGSalas

    To clarify a little bit more regarding the codejail-service plugin. We plan to provide support for the new codejail service in the current eduNEXT/tutor-contrib-codejail plugin. The idea would be to support both implementations during ulmo (edunext's and 2U's) and eventually transition to the openedx/codejail-service in verawood.

  4. robrap commented on Jan 8, 2026

    @robrap
    ContributorAuthor

    Thanks @MoisesGSalas. Note that this DEPR was documented, but never announced, because it doesn't yet have an owner. Do you have interest in owning this DEPR and following up with legacy removal in Verawood?

  5. MoisesGSalas commented on Jan 15, 2026

    @MoisesGSalas

    @robrap, I can take on that. It would be mostly the announcement and updating this ticket accordingly?

  6. robrap commented on Jan 15, 2026

    @robrap
    ContributorAuthor

    @MoisesGSalas: See the Task List under this issue's description. We need someone to take on responsibility for that DEPR work as a prerequisite to announcing.

  7. added theissue type on Jan 28, 2026
  8. feanil commented on Mar 5, 2026

    @feanil
    Contributor

    @MoisesGSalas are you working on this?

  9. MoisesGSalas commented on Mar 6, 2026

    @MoisesGSalas

    @feanil, I had this frozen for a while, but I can take on it next week. I would like little bit of clarification though:

    When @robrap says "We need someone to take on responsibility for that DEPR work as a prerequisite to announcing." It doesn't mean fulfilling the checklist is a requirement for the announcement, right? It means that I will make sure it gets done by the Verawood release.

  10. robrap commented on Mar 6, 2026

    @robrap
    ContributorAuthor

    When @robrap says "We need someone to take on responsibility for that DEPR work as a prerequisite to announcing." It doesn't mean fulfilling the checklist is a requirement for the announcement, right? It means that I will make sure it gets done by the Verawood release.

    That is correct, @MoisesGSalas. A requirement for announcing is simply to have someone willing to take the DEPR forward. Since you are willing to do that, you are free to start the process (via announcing) whenever you are ready. Thank you!

  11. feanil commented on Mar 11, 2026

    @feanil
    Contributor

    @MoisesGSalas if you're doing the work, I can help with the DEPR part of the process of communicating this. It sounds like you're ready to start on this work? Do you want me to go ahead and do the comms?

  12. MoisesGSalas commented on Mar 11, 2026

    @MoisesGSalas

    @feanil, I posted: https://discuss.openedx.org/t/deprecation-removal-local-codejail/18587. If there's anything wrong with it let me know.

    I also don't seem to be able to edit this ticket. Is there anything that I need to do?

  13. 10 remaining items

  14. feanil commented on Aug 10, 2026

    @feanil
    Contributor

    I don't think I currently have cycles to support Moises on this. If others do, they are welcome to take this but I think we need a few minds to make sure we don't break things as we move. Unlikely to be resolved by Willow currently.

  15. robrap commented on Aug 11, 2026

    @robrap
    ContributorAuthor

    @MoisesGSalas: For this DEPR, it is really about transitioning from local codejail to openedx-codejail, not from eduNext to openedx.

    Once the transition has been tested by someone using Tutor, assuming this was ready in Ulmo (or possibly Verawood if any other changes were made), we should be ready to delete the local=>service darklaunch feature (for release in the following named release). This deletion is what we (2U) want to do, to transition it to a service1=>service2 darklaunch feature, which could be used for eduNext=>openedx codejail move, or for Python upgrades (which is what we want it for), etc. At the same time, local codejail implementation code could also be removed to wrap up this DEPR. But before we contract, let's ensure that the expand phase was actually completed.

  16. robrap commented on Aug 11, 2026

    @robrap
    ContributorAuthor

    [Updates]

    • @peter-fogg: Apologies, I meant to tag @pdpinch in my comment above, and I seem to be unable to edit it as well.
    • @pdpinch: See comment above.
    • All: The beauty of the darklaunch feature is that we can really test our readiness ahead of time, and ensure it is just a question of documentation.
  17. timmc-edx commented on Aug 11, 2026

    @timmc-edx
    Contributor

    Another approach would be to change the existing darklaunch so it makes a more generic A/B comparison, and broadening its settings so that it can do either of these:

    • A = local, B = remote
    • A = remote1, B = remote2

    It would be a bit more confusing to configure, but it's an option that allows both kinds of darklaunch to coexist.

    (Although yes, I also just want local codejail gone!)

  18. robrap commented on Aug 11, 2026

    @robrap
    ContributorAuthor

    As long as we can prove openedx/codejail is fully supported in Ulmo or Verawood, we are ready to remove local codejail.

  19. MoisesGSalas commented on Aug 12, 2026

    @MoisesGSalas

    Regarding Tutor: It was never possible to run local codejail in Tutor, that was actually the original reason for creating the remote service, so Tutor users won't need to migrate out of local execution. The only change they will experience is between remote service implementations. In Ulmo Tutor users can chose between https://github.com/edunext/codejailservice and https://github.com/openedx/codejail-service. In Verawood only the latter is available; Ulmo is the transition release.

    IMO, the large majority of Tutor users won't need the darklaunch feature to make the move between remote services, so it would be fair to say we only need to add documentation and remove the current code? The tools to perform the migration that 2U used are in Ulmo and Verawood, we can validate with the MIT if they are sufficient and formalize the docs and simply start removing the code right? Afterwards a more flexible darklaunch can be reintroduced (the one Tim have been proposing in the forums).

  20. pdpinch commented on Aug 13, 2026

    @pdpinch
    Contributor

    MIT switched from local codejail to the edunext codejail service some time ago, when we moved to containerized deployments. We are fine with the deprecation of local codejail.

    Perhaps we should take a look at the darklaunch feature to evaluate moving from the edunext server to the openedx version, but I don't think that blocks the local codejail deprecation.

  21. robrap commented on Aug 24, 2026

    @robrap
    ContributorAuthor

    @pdpinch: [inform] The existing darklaunch feature is local codejail => codejail service only. There does not yet exist a darklaunch feature for service A => service B. There may someday.

  22. moved this from RFC to Transition Unblocked in DEPR: Deprecation & Removalon Sep 14, 2026
  23. moved this from Transition Unblocked to Breaking Changes Unblocked in DEPR: Deprecation & Removalon Sep 14, 2026
  24. robrap commented on Sep 14, 2026

    @robrap
    ContributorAuthor

    @feanil: Based on the above announcement and discussions, I don't see any blockers to marking this as "Breaking Changes Unblocked", so I made that change. Do you see any blockers? Otherwise, is @MoisesGSalas free to work on local codejail removal at this point?

  25. feanil commented on Sep 16, 2026

    @feanil
    Contributor

    No, I think it's safe to drop local codejail in that case it sounds like.

  26. MoisesGSalas commented on Sep 21, 2026

    @MoisesGSalas

    Great, how can i get some eyes on this PR: openedx/xblocks-core#222? It should be most of the removal work.

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

Metadata

Metadata

Assignees

Labels

deprProposal for deprecation & removal per OEP-21

Type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions