Conversation
|
The Dockerfile for the given Golang test works locally for me (through the terminal) using Docker v19.03 (community edition) and Go v1.14. I'm currently getting a HTTP 500 error from my Docker server, so I can't run my unittest locally. @alimohamad We talked about setting up K8S before moving forward with this. If you can finish that in the next 2-3 weeks, that'd be ideal. If there turns out to be something that blocks us on that, then we can give local testing another shot. |
hemangandhi
left a comment
There was a problem hiding this comment.
Left some stuff about the parts I'm sure I would alter somehow (and Sri didn't already mention)
But I also have a general confusion about how the directories are laid out.
- Why is there an init.py in the root directory?
- Why is there an init.py under the
sandboxes/docker_filesdirectory? - What does the
testsdirectory signify? It looks like testing data, not the actual code that runs the tests. But it seems to contain both. - The differing extensions for the dockerfiles seems to be confusing at least the Github syntax highlighting and I don't think it makes sense.
I think it'd make more sense if the python code used to run the sandboxes and the dockerfiles were separated from the project root. Perhaps like:
projects: the root for all the project templatestest_go: the go code and Dockerfiletest_python: the python code (though I don't think this is the code you have -- probably another main function) and dockerfile
lib(or something -- whatever pip convention dictates): to contain the python librarysandbox.py
test: the tests for the sandbox library
I guess I have https://realpython.com/python-application-layouts/#installable-single-package in mind with an extra dir for the project roots. I think that dockerfiles can reference each other, so duplication shouldn't be an issue if the projects get larger.
| FROM python:latest | ||
| COPY $PROJECT_ROOT . | ||
| RUN pip install . | ||
| CMD ["python", "-m", "unittest"] |
There was a problem hiding this comment.
I'm not sure about why this is just running tests vs. running an app like above?
There was a problem hiding this comment.
The Dockerfiles aren't stable yet - that's why this is still WIP. They'll become much more fancy down the line once we get venue for testing. This will be resolved at merge-time.
Edit: Leaving this unresolved so I remember.
|
All your comments have been applied - see the commits I linked. See #2 in reference to your directory structure suggestion. We'll keep this PR short, because it's pretty blown up as it is (since we're waiting for @alimohamad on k8s). |
This follows the "Sandbox Generation Module" ticket - if anyone seeing this needs access, reach out to @olagun.