Skip to content

[DEPR]: Local codejail #36639

Open
Open

Description

@robrap

Proposal Date

2025-04-30

Target Ticket Acceptance Date

TBD

Earliest Open edX Named Release Without This Functionality

Willow - 2027-01

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.

The darklaunch toggle, ENABLE_CODEJAIL_DARKLAUNCH, was removed along with local codejail in Willow.

Additional Info

No response

Task List

Activity

  1. added
    depr
    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
    Contributor

    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
    Contributor

    @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
    Contributor

    @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
    Contributor

    @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. 18 remaining items

  14. 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.

  15. moved this from RFC to Transition Unblocked in DEPR: Deprecation & Removalon Sep 14, 2026
  16. moved this from Transition Unblocked to Breaking Changes Unblocked in DEPR: Deprecation & Removalon Sep 14, 2026
  17. 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?

  18. feanil commented on Sep 16, 2026

    @feanil
    Contributor

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

  19. MoisesGSalas commented on Sep 21, 2026

    @MoisesGSalas
    Contributor

    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

depr

Type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions