aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeLines
* Support overriding nsjail config values with additional argumentsGravatar MarkKoz2021-01-10-2/+8
|
* Add comments to justify why cgroup limits are set manuallyGravatar MarkKoz2021-01-10-1/+7
|
* Add error handling to reading of the nsjail configGravatar MarkKoz2021-01-10-2/+16
|
* Read the Python path and args from the config fileGravatar MarkKoz2021-01-10-3/+2
|
* Read cgroup values from the config fileGravatar MarkKoz2021-01-10-18/+7
|
* Read the nsjail config into a protobuf Message objectGravatar MarkKoz2021-01-10-0/+13
|
* Compile the NsJail config protobuf into Python codeGravatar MarkKoz2021-01-10-1/+1265
| | | | Include a helper shell script for compilation.
* Add protobuf as a dependencyGravatar MarkKoz2021-01-10-4/+29
|
* Merge pull request #64 from python-discord/feat/deps/63/pep8-namingGravatar Joe Banks2021-01-10-29/+77
|\
| * Removing trailing whitespaces from README.mdGravatar MarkKoz2021-01-09-1/+1
| |
| * CI: install git in the containerGravatar MarkKoz2021-01-09-0/+6
| | | | | | | | Pre-commit requires git.
| * CI: run pre-commit hooksGravatar MarkKoz2021-01-09-0/+6
| |
| * CI: improve readability of some run commandsGravatar MarkKoz2021-01-09-5/+7
| |
| * Re-arrange settings in .flake8 fileGravatar MarkKoz2021-01-09-11/+13
| |
| * Add more pre-commit hooksGravatar MarkKoz2021-01-09-1/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Hooks added: * check-merge-conflict - checks for files with merge conflict strings * check-toml - attempts to load all toml files to verify syntax * check-yaml - attempts to load all yaml files to verify syntax * end-of-file-fixer - ensures files end in a newline and only a newline * mixed-line-ending - replaces mixed line endings with LF * trailing-whitespace - trims trailing whitespace * python-check-blanket-noqa - enforces that noqa annotations always occur with specific codes See: python-discord/organisation#138
| * Install pep8-namingGravatar MarkKoz2021-01-09-1/+17
| | | | | | | | | | | | It is a flake8 plugin which enforces PEP 8 naming conventions. Resolves #63
| * Update dev dependenciesGravatar MarkKoz2021-01-09-11/+11
|/
* Create dependency cache directory if not presentGravatar Joe Banks2021-01-10-1/+1
|
* Remove erroneous slash from dependencies listGravatar Joe Banks2021-01-10-1/+1
|
* Add leading slash to post-start commandGravatar Joe Banks2021-01-10-1/+1
|
* Merge pull request #87 from python-discord/feat/deps/site-isolationGravatar Joe Banks2021-01-10-446/+149
|\
| * CI: install numpyGravatar MarkKoz2021-01-09-1/+2
| | | | | | | | One of the unit tests depends on numpy.
| * Prevent setting GIT_SHA from invalidating the Docker layer cacheGravatar MarkKoz2021-01-09-2/+5
| |
| * Document how to install additional packagesGravatar MarkKoz2021-01-09-1/+22
| |
| * Swap out configMap for a hostPath for psuedo-persistenceGravatar Mark2021-01-09-2/+3
| | | | | | Co-authored-by: Joe Banks <[email protected]>
| * Add a Docker volume for the user baseGravatar MarkKoz2021-01-09-0/+13
| |
| * Install exposed packages separately during deploymentGravatar MarkKoz2021-01-09-438/+100
| |
| * Use a custom directory for exposed Python packagesGravatar MarkKoz2021-01-09-5/+7
|/ | | | | | | | | | | | | | | | | Isolate snekbox's dependencies from the packages available within the Python interpreter. Disable Python's default behaviour of site-dependent manipulations of sys.path. The custom directory looks like a user site to allow `pip install --user` to work with it. However, snekbox will see it as simply an additional search path for modules rather than as a user site. Disable isolated mode (-I) because it implies (-E), which ignores PYTHON* environment variables. This conflicts with the reliance on `PYTHONPATH`. Specify `PYTHONUSERBASE` in the Dockerfile to make installing packages to expose more intuitive for users. Otherwise, they'd have to remember to set this variable every time they need to install something.
* Merge pull request #86 from python-discord/precommit-pycharmGravatar Mark2021-01-02-1/+1
|\ | | | | Make flake8 properly run through pre-commit in PyCharm.
| * Changed Python language hook to system.Gravatar xithrius2021-01-02-1/+1
|/
* Merge PR #85 - Sentry releasesGravatar Mark2020-12-20-2/+32
|\
| * Fix getting Git SHA in workflowGravatar ks1292020-12-20-1/+1
| |
| * Add Sentry release to SDK initializationGravatar ks1292020-12-20-1/+3
| |
| * Create workflow for Sentry release creationGravatar ks1292020-12-20-0/+24
| |
| * Add Git SHA build argument to Docker build in workflowGravatar ks1292020-12-20-0/+2
| |
| * Inject Git SHA to environment from build argumentGravatar ks1292020-12-20-1/+3
|/
* Add @Akarys42 to the codeownersGravatar Matteo Bertucci2020-11-27-1/+1
|
* Add Mark to code ownersGravatar Mark2020-11-24-2/+2
|
* Update CODEOWNERSGravatar Dennis Pham2020-11-24-2/+2
|
* Update CODEOWNERSGravatar Joe Banks2020-11-24-1/+2
|
* Update CODEOWNERSGravatar Joe Banks2020-11-24-1/+1
|
* Merge pull request #81 - Limit STDOUT to prevent OOMGravatar Mark2020-11-20-6/+76
|\
| * Fix typo in _consume_stdout docstringGravatar Sebastiaan Zeeff2020-11-21-1/+1
| |
| * Move exit code conversion to main functionGravatar Sebastiaan Zeeff2020-11-21-15/+13
| |
| * Add test for stdout output truncationGravatar Sebastiaan Zeeff2020-11-21-2/+21
| | | | | | | | | | | | I've added a test that checks if output exceeding the limit is correctly truncated. To make the test more robust, I've defined a constant for the read chunk size.
| * Convert negative exit codes into standard formGravatar Sebastiaan Zeeff2020-11-20-9/+15
| | | | | | | | | | | | | | When you send a signal `N` to a subprocess using Popen, it will return `-N` as its exit code. As the rest of the code returns signal exit codes as `128 + N`, we convert those negative exit codes into the standard form used by the rest of the code.
| * Document output truncation in READMEGravatar Sebastiaan Zeeff2020-11-20-0/+1
| |
| * Use SIGKILL instead of SIGTERM to terminate NsJailGravatar Sebastiaan Zeeff2020-11-20-4/+4
| | | | | | | | | | | | This new behavior matches how other limiters terminate the subprocess, resulting in a more consistency in the front-end for the end users as well.
| * Increase number of characters in each read chunkGravatar Sebastiaan Zeeff2020-11-20-1/+1
| | | | | | | | | | | | I've increased the number of characters in each chunk we read from stdout to 10_000. This means we now read roughly 10 KB - 40 KB in each chunk.
| * Keep output that took us over the output limitGravatar Sebastiaan Zeeff2020-11-20-10/+6
| | | | | | | | | | | | | | Previously, the chunk of output that took us over the output limit was dismissed. As we've already consumed it and it's not going to have a very large size, we might as well include it in the final output we return.