Skip to content

[FAL-1813] fix: codejail issue when using matplotlib - #343

Merged
pomegranited merged 3 commits into
opencraft-release/koa.3from
jill/sandbox-numpy-koa.3
Apr 28, 2021
Merged

[FAL-1813] fix: codejail issue when using matplotlib#343
pomegranited merged 3 commits into
opencraft-release/koa.3from
jill/sandbox-numpy-koa.3

Conversation

@pomegranited

@pomegranited pomegranited commented Apr 22, 2021

Copy link
Copy Markdown

Backports https://github.com/edx/edx-platform/pull/27372 to our koa.3 release branch, so that we can release this fix to our clients ASAP.

Sandbox

Provisioning, but links will be:

See e.g. this unit

Testing instructions

See https://github.com/edx/edx-platform/pull/27372.

Settings

EDXAPP_CODE_JAIL_LIMITS:
  # Had to increase from 1 to 2 to allow time for mathplotlib to load
  CPU: 2
  # Limit the memory of the jailed process to something high but not
  # infinite (512MiB in bytes)
  VMEM: 536870912
  # Time in seconds that the jailed process has to run.
  REALTIME: 3
  # Needs to be non-zero so that jailed code can use it as their temp directory.(1MiB in bytes)
  FSIZE: 1048576
  PROXY: 0

Since the Jenkins CI doesn't run safe_exec in the sandbox virtualenv, matplotlib is not available.

(cherry picked from commit 1e7f563)
@pomegranited
pomegranited requested a review from s0b0lev April 22, 2021 01:10
@pomegranited
pomegranited force-pushed the jill/sandbox-numpy-koa.3 branch from b99f222 to 6ec97a2 Compare April 22, 2021 12:48
Upgrades numpy in the edx-sandbox to fix runtime error triggered by added test case:

    RuntimeError: module compiled against API version 0xe but this version of numpy is 0xd

The upgraded numpy now imports secrets, which requires random.SystemRandom, so
this change also adds SystemRandom to the random module overridden by the
safe_exec code prolog.

(cherry picked from commit e8b8147)
@pomegranited
pomegranited force-pushed the jill/sandbox-numpy-koa.3 branch from 6ec97a2 to 71ac3b6 Compare April 22, 2021 23:48
@s0b0lev

s0b0lev commented Apr 27, 2021

Copy link
Copy Markdown

@pomegranited 👍

  • I tested this: follow testing instruction
  • I read through the code

@pomegranited
pomegranited merged commit 2143f84 into opencraft-release/koa.3 Apr 28, 2021
@pomegranited
pomegranited deleted the jill/sandbox-numpy-koa.3 branch April 28, 2021 01:30
pomegranited added a commit that referenced this pull request Jun 23, 2021
dliberat pushed a commit that referenced this pull request Jul 8, 2021
gabor-boros added a commit that referenced this pull request Jul 14, 2021
* [SE-4101] fix: address VisibleBlocks caching race condition (openedx#27359) (#349)

* fix: address VisibleBlocks caching race condition
* sets visual block creation in an atomic transaction
* refactor: add logging statement to bulk create

Co-authored-by: Raul Gallegos <raul@opencraft.com>

Co-authored-by: Raul Gallegos <raul@opencraft.com>

* BB-3954 Add toggle for enrollment behavior (#351)

Adds toggle REDIRECT_UNAUTHENTICATED_USER_TO_LOGIN_ON_ENROLL
for enrollment behaviour for unauthenticated user.
If true, the user will be redirected to 'signin_user' route.

Co-authored-by: Arjun Singh Yadav <arjun@opencraft.com>

* [BB-3622] feat:Restrict user create course (#319) (#352)

* Add course creation condition for organization

The condition added to ensure that if the feature is enabled
user will not be able to create the course outside of the organization
in which they belong.

Signed-off-by: Farhaan Bukhsh <farhaan@opencraft.com>

* fix: update the xblock-lti-consumer commit

* Added new setting CERTIFICATE_DATE_FORMAT for easy customization of (#354)

certificate issued date

(cherry picked from commit 421e661)

* fix: Produce grade report when subsections have future start dates

When getting a subsection grade for a user, instead of failing
if the user can't access that subsection,
fallback to the collected structure.

* Revert "Unhide student-generated certificates toggle"

This reverts commit 8910ccf.

Our clients are no longer using this feature, and edX won't accept this
upstream as-is currently.  See https://github.com/edx/edx-platform/pull/23735 for more information.

Reverting to reduce code drift from upstream.

* chore: update Arabic translations

* fix:Fix function call to check MFE (#359)

Signed-off-by: Farhaan Bukhsh <farhaan@opencraft.com>

* fix: don't cache ajax request

* feat: add site language config

Cherry-picked from: https://github.com/edx/edx-platform/pull/27696

* Revert "[FAL-1813] fix: codejail issue when using matplotlib (#343)" (#365)

This reverts commit 2143f84.

* Update celery routing for celery 4+ (openedx#25567)

* Update celery routing

- Used routing function instead of class
- Move task queues dictionary to Django settings
- Removed routing_key parameter
- Refactored routing for singleton celery instantiation

Co-authored-by: Awais Qureshi <awais.qureshi@arbisoft.com>
(cherry picked from commit e3b4d23)

* fix: add missing set_code_owner_attribute imports

(cherry picked from commit d1060d2)

* chore: bump edx-django-utils to 3.12.0

The required `set_code_owner_attribute` decorator was introduced in
v3.12.0, therefore we need to bump the dependency.

(cherry picked from commit f52b84e)

* [SE-4482] Allow delete course content in Studio only for admin users (#360)

Co-authored-by: Nizar Mahmoud <nizarmah@hotmail.com>

* fix: Password reset page throwing not found error (#364)

Signed-off-by: Farhaan Bukhsh <farhaan@opencraft.com>

* fix: change buttons in wiki modal to anchor tags

The action buttons in wiki modal have href attribute
but does not have an event listener for click.
This PR changes the buttons to anchor tags so that they
work as expected when clicked.

* fix: use high priority queue for celery heartbeat check

Makes HIGH_PRIORITY_QUEUE a derived setting, which allows
HEARTBEAT_CELERY_ROUTING_KEY to use the correct config variant default.

(cherry picked from commit 2a9067a)

* fix: prevent invalidation of allowlisted certificates

The allowlisted certificates were getting invalidated upon visiting the Course
Progress page by users.

This is a rough backport of the Lilac fix (edx#26356). In Lilac, this is gated
by the `certificates_revamp.use_allowlist` Waffle flag. In post-Lilac branches,
this is working out of the box (the flag has been removed in edx#27576).

Jira ticket: BB-4287

* feat: add celery beat configuration

Co-authored-by: Raul Gallegos <raul@opencraft.com>
Co-authored-by: Farhaan Bukhsh <farhaan@opencraft.com>
Co-authored-by: Arjun Singh Yadav <arjun@opencraft.com>
Co-authored-by: pkulkark <pooja@opencraft.com>
Co-authored-by: Shimul Chowdhury <shimul@opencraft.com>
Co-authored-by: João Cabrita <joao.cabrita@opencraft.com>
Co-authored-by: Samuel Walladge <samuel@opencraft.com>
Co-authored-by: Giovanni Cimolin da Silva <giovannicimolin@gmail.com>
Co-authored-by: 0x29a <demid@opencraft.com>
Co-authored-by: Dmitry Gamanenko <dmitry.gamanenko@raccoongang.com>
Co-authored-by: Jillian Vogel <jill@opencraft.com>
Co-authored-by: Muhammad Soban Javed <58461728+iamsobanjaved@users.noreply.github.com>
Co-authored-by: Sandeep Choudhary <sandeep@opencraft.com>
Co-authored-by: Nizar Mahmoud <nizarmah@hotmail.com>
Co-authored-by: Agrendalath <piotr@surowiec.it>
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