aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeLines
...
| * | Remove all child cgroups before removing parentsGravatar Joe Banks2021-02-26-0/+12
|/ /
* | Merge pull request #91 from python-discord/dynamic-parent-cgroupsGravatar Matteo Bertucci2021-02-25-8/+22
|\ \ | | | | | | Dynamically create parent cgroups
| * \ Merge branch 'master' into dynamic-parent-cgroupsGravatar Joe Banks2021-02-07-217/+246
| |\ \ | |/ / |/| |
| * | Remove cgroup parent constants from config fileGravatar Joe Banks2021-02-03-2/+0
| | |
| * | Dynamically create parent cgroups for nsjailGravatar Joe Banks2021-02-03-6/+22
| | |
| | * Docker: improve caching & install numpy in containerGravatar MarkKoz2021-03-07-9/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | CI was building the image twice: once with dev dependencies and again without. Separating the pipenv command into separate layers allows the second build in CI to take advantage of the cache for the base dependencies that it will share across both builds. Install numpy along with the dev dependencies within the container. Previously it was installed in CI only, but this meant extra work for those running tests locally. Install numpy to the correct site.
| | * Fix patch for DEBUG value during testingGravatar MarkKoz2021-02-04-1/+1
| | |
| | * Fix the memory limit test and the import errorGravatar MarkKoz2021-02-04-2/+2
| | |
| | * Close file descriptors when subprocess endsGravatar MarkKoz2021-02-04-15/+14
| | |
| | * Suppress NsJail info logs during testsGravatar MarkKoz2021-02-04-0/+1
| | | | | | | | | | | | The logs clutter up the test output way too much.
| | * CI: fix test step not failing when tests failGravatar MarkKoz2021-02-04-3/+6
| |/ |/| | | | | | | Generating the report in the same step resulted in the report exit code overriding the exit code of the test runner.
* | Merge PR #92 - replace shell scripts with Python scriptsGravatar Mark2021-02-04-217/+246
|\ \ | |/ |/|
| * CI: use Docker Compose to run the containerGravatar MarkKoz2021-02-04-19/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Avoid redundant specification of Docker settings. The compose file is set up to build all stages. This makes sense for local development; both an interactive shell and running the webserver are useful. Therefore, the image built is tagged "snekbox:dev". However, CI does not need to run a webserver. It is therefore sufficient for it to only build to the venv stage, and it does exactly that. The image in CI is tagged as "snekbox-venv:<git sha>". To facilitate the discrepancy in image tags, the suffix for the image tag can be set with the new IMAGE_SUFFIX environment variable. Docker Compose will use this to determine the image from which to create a container. A TTY needs to be allocated to prevent the container from exiting immediately after starting. This is probably because the entrypoint is Python (inherited from the base image), and the REPL relies on a TTY.
| * Document configuration thoroughlyGravatar MarkKoz2021-02-04-1/+41
| |
| * Fix coverage ownership when running testsGravatar MarkKoz2021-02-04-1/+2
| |
| * Document how to update NsJailGravatar MarkKoz2021-02-04-0/+10
| |
| * Replace protoc shell script with a Python oneGravatar MarkKoz2021-02-04-15/+63
| |
| * Rename "snekbox" script to "webserver" in PipfileGravatar MarkKoz2021-02-04-1/+1
| | | | | | | | The new name better conveys what the script does.
| * Replace dev.sh with Docker ComposeGravatar MarkKoz2021-02-04-106/+38
| | | | | | | | | | | | | | | | | | | | Managing development containers through Docker Compose is convenient. However, it isn't quite flexible enough to facilitate both development and normal use. It's not really worth accommodating the latter since the container gets pushed to a registry and that's the intended way to run the service. Anyone that is checking out the repository and therefore has access to the compose file is likely a developer, not a user.
| * Categorise and sort scripts in PipfileGravatar MarkKoz2021-02-04-12/+14
| |
| * Move development environment guide to a separate fileGravatar MarkKoz2021-02-04-94/+99
|/ | | | | | The information is only relevant to developers. The README is what all users will read; they shouldn't be subject to information that isn't necessarily relevant to them.
* Merge PR #88 - use protobuf to parse configGravatar Mark2021-02-02-55/+1377
|\
| * Fix typo in error messageGravatar Mark2021-02-02-1/+1
| |
| * Fix typo in READMEGravatar Mark2021-01-14-1/+1
| |
| * Replace nsjpy alias with a Python scriptGravatar MarkKoz2021-01-10-27/+33
| | | | | | | | | | | | | | | | | | The Python script uses the same underlying code Falcon uses to invoke nsjail. It allows for the omission of redundant shell code that set up cgroups and nsjail args. This is also a step towards removing dependence on shell scripts and thus resolving #73.
| * 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
| |
* | Remove trailing whitespaces from the READMEGravatar Matteo Bertucci2021-01-22-1/+1
| |
* | Update the README badgesGravatar Matteo Bertucci2021-01-22-1/+6
| |
* | Merge PR #90 - fix caching of exposed packagesGravatar Mark2021-01-13-22/+23
|\ \
| * | CI: don't do a user install for pre-commitGravatar MarkKoz2021-01-12-1/+2
| | |
| * | Docker: update pipenvGravatar MarkKoz2021-01-12-1/+1
| | |
| * | Fix caching of exposed packagesGravatar MarkKoz2021-01-12-16/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The problem with --ignore-installed is that it also ignores packages in the target site, therefore re-installing all packages and making caching futile. Install snekbox's dependencies to the default user site. During installation of the exposed packages, switch the user site to a custom one to ensure pip will not skip packages due to seeing them as already installed as one of snekbox's dependencies. If pip made the --root option ignore packages outside the root, then using --root would be the best solution. There is a 5+ year old issue open about that.
| * | Docker: simplify pipenv install commandGravatar MarkKoz2021-01-11-6/+1
| | |
| * | Docker: add comments to separate stagesGravatar MarkKoz2021-01-11-0/+3
| | |
| * | Docker: move env var definitions to the base stageGravatar MarkKoz2021-01-11-1/+5
|/ / | | | | | | Just a refactor.
* / Force extant packages to install to the user site too during deploymentGravatar MarkKoz2021-01-11-1/+1
|/ | | | Fix #89
* 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