Install dotnet core to fix python gcov warning for code covery color bar showing#215
Conversation
Install .NET CORE
…enetworks-install-dotnet-core install dotnet core
|
@lguohan report is now coveried by red & green bar, help review, then i will try to fix all other python components. check pipeline: https://dev.azure.com/mssonic/build/_build/results?buildId=13993&view=codecoverage-tab |
azure-pipelines.yml
Outdated
| sudo apt-get install -y apt-transport-https | ||
| sudo apt-get update | ||
| sudo apt-get install -y dotnet-sdk-5.0 | ||
| displayName: "Unit tests" |
There was a problem hiding this comment.
It is better to create a new step to install the .net core, not in the "Unit tests" step.
Looks like we can remove the Line 66.
|
ok, done! @xumia help forward! |
|
hi @xumia help forward! |
trigger build
azure-pipelines.yml
Outdated
| sudo apt-get install -y apt-transport-https | ||
| sudo apt-get update | ||
| sudo apt-get install -y dotnet-sdk-5.0 | ||
| displayName: "Install publish Dependencies" |
azure-pipelines.yml
Outdated
| wget https://packages.microsoft.com/config/ubuntu/20.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb | ||
| sudo dpkg -i packages-microsoft-prod.deb | ||
| sudo apt-get update | ||
| sudo apt --fix-broken install -y |
There was a problem hiding this comment.
also for directlly install dot sdk:
https://dev.azure.com/mssonic/build/_build/results?buildId=19148&view=logs&j=83516c17-6666-5250-abde-63983ce72a49&t=c10d5f44-55ce-55d7-7975-407ed75d9a96
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
dotnet-sdk-5.0 : Depends: dotnet-runtime-5.0 (>= 5.0.7) but it is not going to be installed
Depends: netstandard-targeting-pack-2.1 (>= 2.1.0) but it is not going to be installed
Depends: aspnetcore-runtime-5.0 (>= 5.0.7) but it is not going to be installed
Depends: dotnet-targeting-pack-5.0 (>= 5.0.0) but it is not going to be installed
Depends: aspnetcore-targeting-pack-5.0 (>= 5.0.0) but it is not going to be installed
Depends: dotnet-apphost-pack-5.0 (>= 5.0.7) but it is not going to be installed
libhiredis-dev : Depends: libhiredis0.14 (= 0.14.0-3) but 0.14.0-3~bpo9+1 is to be installed
libnl-3-dev : Depends: libnl-3-200 (= 3.4.0-1) but 3.5.0-1 is to be installed
libnl-route-3-dev : Depends: libnl-route-3-200 (= 3.4.0-1) but 3.5.0-1 is to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
There was a problem hiding this comment.
It should be caused by wrong package packages-microsoft-prod installed, the script is run inside the container, so we need to install the package for debian buster, not ubuntu 20.04.
Please follow https://docs.microsoft.com/en-us/dotnet/core/install/linux-debian, and try again, thanks.
azure-pipelines.yml
Outdated
| sudo dpkg -i packages-microsoft-prod.deb | ||
| sudo apt-get update | ||
| sudo apt --fix-broken install -y | ||
| sudo apt-get install -y apt-transport-https |
There was a problem hiding this comment.
ok, seems no use, removed!
| sudo apt-get update | ||
| sudo apt --fix-broken install -y | ||
| sudo apt-get install -y apt-transport-https | ||
| sudo apt-get update |
There was a problem hiding this comment.
ok, fixed!
|
@qiluo-msft hi, help forward this, thanks! |
qiluo-msft
left a comment
There was a problem hiding this comment.
LGTM. Please also check with other reviewers.
azure-pipelines.yml
Outdated
| curl -sSL https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add - | ||
| sudo apt-add-repository https://packages.microsoft.com/debian/10/prod | ||
| sudo apt-get update | ||
| sudo apt-get -y install -f |
There was a problem hiding this comment.
From test result, 'sudo apt-get -y install -f' can and only can be set at this place.
There was a problem hiding this comment.
I tried these commands and removed sudo apt-get -y install -f. Seems working. Could you check again?
There was a problem hiding this comment.
There was a problem hiding this comment.
I compared the log with previous one, and the previous one seems suspicious
2021-06-29T03:04:13.8494132Z The following additional packages will be installed:
2021-06-29T03:04:13.8499448Z libhiredis0.14
2021-06-29T03:04:13.8986264Z The following packages will be REMOVED:
2021-06-29T03:04:13.8993644Z libibverbs-dev libnl-3-dev libnl-route-3-dev libopenmpi-dev
2021-06-29T03:04:13.9005991Z The following packages will be upgraded:
2021-06-29T03:04:13.9011224Z libhiredis0.14
2021-06-29T03:04:13.9242794Z 1 upgraded, 0 newly installed, 4 to remove and 2 not upgraded.
The new apt source messed up the local package database. So it replaced our local built libhiredis0.14. I have not experiment, but propose several options:
- Do not add apt source. Download the required deb packages and
sudo dpkg -ithem. - Or, add the apt source at the very beginning, before installing any other deb packages.
There was a problem hiding this comment.
update result, seems not work:
put add source at begin:
https://dev.azure.com/mssonic/build/_build/results?buildId=21862&view=logs&j=83516c17-6666-5250-abde-63983ce72a49&t=c10d5f44-55ce-55d7-7975-407ed75d9a96
remove source and only wget debs:
https://dev.azure.com/mssonic/build/_build/results?buildId=21866&view=logs&j=83516c17-6666-5250-abde-63983ce72a49&t=c10d5f44-55ce-55d7-7975-407ed75d9a96
try dotnet-install.sh, no error but no color bar:
https://dev.azure.com/mssonic/build/_build/results?buildId=21868&view=logs&j=83516c17-6666-5250-abde-63983ce72a49&t=c10d5f44-55ce-55d7-7975-407ed75d9a96
|
The root issue is wrong packages are installed in slave docker. Please check the patch From 71094dd101a8a4fb47f82b6d7fc175c9cbfb2791 Mon Sep 17 00:00:00 2001
From: Qi Luo <qiluo-msft@users.noreply.github.com>
Date: Tue, 6 Jul 2021 06:19:40 +0000
Subject: [PATCH] Remove vanilla packages before installing local build ones
---
azure-pipelines.yml | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/azure-pipelines.yml b/azure-pipelines.yml
index f9cc32c..f73a8e0 100644
--- a/azure-pipelines.yml
+++ b/azure-pipelines.yml
@@ -44,6 +44,7 @@ stages:
- script: |
set -ex
+ sudo apt-get -y purge libhiredis-dev libnl-3-dev libnl-route-3-dev
sudo dpkg -i ../target/debs/buster/{libswsscommon_1.0.0_amd64.deb,python3-swsscommon_1.0.0_amd64.deb,libnl-3-200_*.deb,libnl-genl-3-200_*.deb,libnl-nf-3-200_*.deb,libnl-route-3-200_*.deb,libhiredis0.14_*.deb}
sudo python3 -m pip install ../target/python-wheels/swsssdk*-py3-*.whl
sudo python3 -m pip install ../target/python-wheels/sonic_py_common-1.0-py3-none-any.whl
@@ -61,10 +62,9 @@ stages:
- script: |
set -ex
# Install .NET CORE
- wget https://packages.microsoft.com/config/debian/10/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
- sudo dpkg -i packages-microsoft-prod.deb
+ curl -sSL https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add -
+ sudo apt-add-repository https://packages.microsoft.com/debian/10/prod
sudo apt-get update
- sudo apt-get -y install -f
sudo apt-get install -y dotnet-sdk-5.0
displayName: "Install .NET CORE"In reply to: 874551271 |
|
@qiluo-msft right, seems fine now. help foward this! |
fix python gcov warning "Please install dotnet core to enable automatic generation of Html report" more info check: sonic-net/sonic-snmpagent#215 Signed-off-by: pettershao-ragilenetworks <pettershao@ragilenetworks.com>
fix python gcov warning "Please install dotnet core to enable automatic generation of Html report" more info check: sonic-net/sonic-snmpagent#215 Signed-off-by: pettershao-ragilenetworks <pettershao@ragilenetworks.com>
…bar showing (sonic-net#215) **- What I did** fix python gcov warning "Please install dotnet core to enable automatic generation of Html report" **- How I did it** install dotnet core
- What I did
fix python gcov warning "Please install dotnet core to enable automatic generation of Html report"
- How I did it
install dotnet core
- How to verify it
- Description for the changelog