python-discord / snekbox

Easy, safe evaluation of arbitrary Python code
https://pythondiscord.com
MIT License
214 stars 39 forks source link

Refactor how we process eval dependencies #185

Closed jb3 closed 1 year ago

jb3 commented 1 year ago

Right now, our eval dependencies are pulled in using a script embedded within the deployment file, and all dependencies are listed there. This gets a bit messy the more dependencies we want to add, especially if we want to add version markers.

This PR splits out the dependencies into a new file under requirements/ and moves the dependency install process to it's own init container instead of being a task that executes within the snekbox container after it starts. This also allows for greater observability into the dependencies pull process as logs can be fetched from init containers with kubectl logs deploy/snekbox -c deps-install.

jchristgit commented 1 year ago

Great Dane

image

coveralls commented 1 year ago

Coverage Status

coverage: 90.947%. remained the same when pulling 4251c08e1b2797e4e1d348d2bce13eb1e7bd4051 on jb3/refactor-eval-deps into 02926616c635950a6b2b8cc25277f3cc5bcea131 on main.

jb3 commented 1 year ago

Thanks!