-
Notifications
You must be signed in to change notification settings - Fork 234
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
updated Dockerfile so tests would pass and image would build #167
base: main
Are you sure you want to change the base?
Conversation
…for pylint-django & pyflakes; still get warning about prospector requiring higher version of pylint, but all tests pass
…so tests will pass; added --no-cache-dir flag to all pip installs
Codecov Report
@@ Coverage Diff @@
## master #167 +/- ##
=======================================
Coverage 83.38% 83.38%
=======================================
Files 30 30
Lines 1938 1938
=======================================
Hits 1616 1616
Misses 322 322
Continue to review full report at Codecov.
|
@@ -4,11 +4,15 @@ WORKDIR /usr/src/databricks-cli | |||
|
|||
COPY . . | |||
|
|||
RUN pip install --upgrade pip && \ | |||
pip install -r dev-requirements.txt && \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is a minimal fix here just to also install tox-requirements?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That is certainly the heart of the change -- and almost enough to fix the issue,
You also need to bump the versions on some of the packages in tox-requirements.txt
or it will fail due to pytest-django and pyflakes dependencies. Also, you need to add the tabulate
and click
packages to dev-requirements.txt
.
My other edits to Dockerfile were an attempt to minimize the resulting image size, but I didn't get a dramatic savings.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Gotcha. I'm a bit concerned about changing the dev-requirements.txt
and tox-requirements.txt
to make this docker container build work.
I think a minimal fix is to intall tox-requirements.txt
and to move up pip install .
above the ./lint.sh
Also it may be useful to add a .dockerignore
file containing
**/__pycache__
**/*.pyc
so we don't run into https://stackoverflow.com/questions/44067609/getting-error-importmismatcherror-while-running-py-test
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
with @andrewmchen proposals (add tox-requirements to pip install and moving ./lint.sh) works without problem.
thanks
Any idea when this will be merged? |
@hagridaaron, as it is, this PR isn't ready to merge (merge conflicts and changes to |
On this fork I get:
|
To follow up on Issue 166, the current Dockerfile fails to build as the tests do not pass.
I have made the following changes and it now builds (and runs the CLI) successfully:
tox-requirements.txt
are required for the tests to run (and pass), so the Dockerfile now installs thempytest-django
andpyflakes
click
andtabulate
packages seem to be required by the main codebase, so I added them todev-requirements.txt
so they are installed (and stick around)setup.py
To save space in the image:
pip install
commands now have the--no-cache-dir
optiontox-requirements.txt
are now removed after the tests have been run