Skip to content

Conversation

@ericfab179
Copy link
Contributor

No description provided.

Run configure codejail method before importing safe_exec modules.
Adjust settings and wsgi files.
'user': 'sandbox',

# Configurable limits.
# Setting all of them to 0 to disable limits in conatiners.
Copy link
Member

Choose a reason for hiding this comment

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

Typo: containers

from copy import deepcopy
from flask import Flask, Response, jsonify, request

LOG = logging.getLogger(__name__)
Copy link
Member

Choose a reason for hiding this comment

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

The LOG is not used, I imagine you imported it just in case

Copy link
Member

Choose a reason for hiding this comment

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

If we want to use logging in Flask we need to add the right configuration to get it working right?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@jfavellar90 Sure, we need to configure it, do you think we should do that in this MVP ?

Copy link
Member

Choose a reason for hiding this comment

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

I think so, at least a raw version that can be improved afterward.

@@ -0,0 +1,8 @@
import os
Copy link
Member

Choose a reason for hiding this comment

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

Is this running as a single process in the container? is it possible to use Gunicorn or awsgi? Or is it outside of this MVP?

Copy link
Contributor Author

@ericfab179 ericfab179 Jun 7, 2021

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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

I've no problem with Gunicorn but I'm wondering if we should use uwsgi to be consequent with the other tutor services (for instance edxapp )

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It was updated to use uwsgi in local and k8s.

@ericfab179 ericfab179 force-pushed the eric/mvp_flask branch 3 times, most recently from 711711e to cd90a1a Compare August 1, 2021 23:56
@ericfab179 ericfab179 changed the title [WIP] Codejail REST API service Flask - MVP Codejail REST API service Flask - MVP Aug 1, 2021
@ericfab179 ericfab179 marked this pull request as ready for review August 1, 2021 23:59
Fix empty python path case.
Basic configuration for logging.
Copy link
Member

@felipemontoya felipemontoya left a comment

Choose a reason for hiding this comment

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

I tested this today using an "august" version of edx-platform with the changes of https://github.com/edx/edx-platform/pull/27795 and it worked as a POC.

I think we should merge this as is and iterate on improving the QA and documentation and fixes that come along as we find them.

Having this in the PR is making it more complicated for people just looking at this now.

@ericfab179 ericfab179 merged commit d38d84e into main Oct 3, 2021
@MoisesGSalas MoisesGSalas deleted the eric/mvp_flask branch June 20, 2024 17:18
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