Conversation
bump pip requirements versions (microsoft#104)
commit 3ba351c Author: Alexandre Gattiker <algattik@users.noreply.github.com> Date: Sat Jan 25 08:37:53 2020 +0100 . commit 5c3c3e0 Author: Alexandre Gattiker <algattik@users.noreply.github.com> Date: Sat Jan 25 07:58:50 2020 +0100 . commit 2a49221 Author: Alexandre Gattiker <algattik@users.noreply.github.com> Date: Sat Jan 25 07:24:37 2020 +0100 . Merge remote-tracking branch 'upstream/master' into algattik/code-coverage
docs/development_setup.md
Outdated
| Install the required Python modules in your virtual environment. | ||
|
|
||
| ``` | ||
| pip install -r environment_setup/build-image/requirements.txt |
There was a problem hiding this comment.
requirements.txt is in environment_setup folder
There was a problem hiding this comment.
It should be "pip install -r environment_setup/requirements.txt"
environment_setup/Dockerfile
Outdated
|
|
||
| # Install Python modules | ||
| COPY requirements.txt /setup/ | ||
| RUN pip install --upgrade -r /setup/requirements.txt |
There was a problem hiding this comment.
Consider reducing the number of image layers by combining RUN commands.
"squash" option is still experimental.
There was a problem hiding this comment.
Updated to reduce RUN steps
|
The build fails with "No code coverage results were found to publish." |
The mlopspython image must first be updated as there are new dependencies. |
|
Updated with changes from master |
environment_setup/Dockerfile
Outdated
| # Install dotnet runtime used to generate code coverage report | ||
| RUN curl -O https://packages.microsoft.com/config/ubuntu/19.04/packages-microsoft-prod.deb \ | ||
| && dpkg -i packages-microsoft-prod.deb \ | ||
| && apt-get update && apt-get install -y dotnet-runtime-3.1 |
There was a problem hiding this comment.
Do we really need dotnet-runtime-3.1? I assume code coverage will still show up in Azure DevOps, but we'll just get the warning of no auto-generated html reports, no?
There was a problem hiding this comment.
Without dotnet runtime we only get the report as an artifact.
With dotnet runtime we get an an embedded HTML report
this can be achieved by:
- Adding dotnet runtime to mlopsython container, is an additional 104 MB installation.
- install dotnet at pipeline execution time.
Given the impact of 1 or 2 in terms of build time and the limited benefit of the embedded report, I will update the PR to go for neither option.
There was a problem hiding this comment.
Another idea would be to add 2. commented out in the pipeline if people want to enable the code coverage html report
There was a problem hiding this comment.
Fixed. There is no update to the Dockerfile anymore, but the mlopspython image must still be rebuilt because of updates to requirements.txt.
I tested installing dotnet core but coverage report generation then fails with a missing libicu library, and sudo is not available to install it. I suggest investigating this at a later point.
eedorenko
left a comment
There was a problem hiding this comment.
David Tesar's comment:
"Do we really need dotnet-runtime-3.1? I assume code coverage will still show up in Azure DevOps, but we'll just get the warning of no auto-generated html reports, no?"
|
After we merge #158 we should be able to add instructions for enabling report generation:
|


Changes:
flake8andpytestwithintox.Added code coverage report. Required adapted

pytestcommandline (now intox.ini) and installing .NET Core as for security reasons, the AzDO PublishCodeCoverageResults does not publish user-generated HTML reports anymore.Linting fixes in some
.pyscripts to avoid CI build failing.Some simplifications in the build pipeline YAML.