aneoconsulting / ArmoniK

Main repository for ArmoniK, An Open-Source orchestrator based on Kubernetes managing the distribution of hybrid multi cloud computations
https://aneoconsulting.github.io/ArmoniK/
Apache License 2.0
25 stars 16 forks source link

Can't run test as describe in documentation #187

Closed esoubiran-aneo closed 2 years ago

esoubiran-aneo commented 2 years ago

Describe the bug

The command ./tools/tests/symphony_like.sh return this issue

rm -rf /home/esteban/.nuget/packages//armonik.api /home/esteban/.nuget/packages//armonik.developmentkit.common /home/esteban/.nuget/packages//armonik.developmentkit.symphonyapi /home/esteban/.nuget/packages//armonik.developmentkit.symphonyapi.client /home/esteban/.nuget/packages//armonik.developmentkit.workerapi.common /home/esteban/.nuget/packages//armonik.extensions.common.streamwrapper
Microsoft (R) Build Engine version 17.2.0+41abc5629 for .NET
Copyright (C) Microsoft Corporation. All rights reserved.

git clone https://github.com/aneoconsulting/ArmoniK.Samples.git  Determining projects to restore...
  Restored /home/esteban/ArmoniK/source/ArmoniK.Samples/Samples/SymphonyLike/ArmoniK.Samples.Symphony.Common/ArmoniK.Samples.Symphony.Common.csproj (in 523 ms).
  Restored /home/esteban/ArmoniK/source/ArmoniK.Samples/Samples/SymphonyLike/ArmoniK.Samples.SymphonyClient/ArmoniK.Samples.SymphonyClient.csproj (in 1.32 sec).
  Restored /home/esteban/ArmoniK/source/ArmoniK.Samples/Samples/SymphonyLike/ArmoniK.Samples.SymphonyPackage/ArmoniK.Samples.SymphonyPackage.csproj (in 1.32 sec).
/usr/share/dotnet/sdk/6.0.300/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.CrossTargeting.targets(27,5): error NETSDK1129: The 'Publish' target is not supported without specifying a target framework. The current project targets multiple frameworks, you must specify the framework for the published application. [/home/esteban/ArmoniK/source/ArmoniK.Samples/Samples/SymphonyLike/ArmoniK.Samples.SymphonyClient/ArmoniK.Samples.SymphonyClient.csproj]
/usr/share/dotnet/sdk/6.0.300/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.CrossTargeting.targets(27,5): error NETSDK1129: The 'Publish' target is not supported without specifying a target framework. The current project targets multiple frameworks, you must specify the framework for the published application. [/home/esteban/ArmoniK/source/ArmoniK.Samples/Samples/SymphonyLike/ArmoniK.Samples.Symphony.Common/ArmoniK.Samples.Symphony.Common.csproj]
/usr/share/dotnet/sdk/6.0.300/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.CrossTargeting.targets(27,5): error NETSDK1129: The 'Publish' target is not supported without specifying a target framework. The current project targets multiple frameworks, you must specify the framework for the published application. [/home/esteban/ArmoniK/source/ArmoniK.Samples/Samples/SymphonyLike/ArmoniK.Samples.SymphonyPackage/ArmoniK.Samples.SymphonyPackage.csproj]

To Reproduce Steps to reproduce the behavior:

  1. Follow the deployment on localhost guide
  2. Clone Sample repo as indicated in the README.md
  3. Run ./tools/tests/symphony_like.sh

Expected behavior I expected tests to run.

Screenshots Not applicable

Infra

main,

core=0.5.9
worker=0.5.7
samples=2.7.1
esoubiran-aneo commented 2 years ago

Changing the file ./tools/tests/symphony_like.sh to this allowed me to run tests (thx @aneojgurhem)

#!/bin/bash
set -e

BASEDIR=$(dirname "$0")

cd $BASEDIR/../../source/ArmoniK.Samples

export CPIP=$(kubectl get svc ingress -n armonik -o custom-columns="IP:.spec.clusterIP" --no-headers=true)
export CPPort=$(kubectl get svc ingress -n armonik -o custom-columns="PORT:.spec.ports[1].port" --no-headers=true)
export Grpc__Endpoint=http://$CPIP:$CPPort
nuget_cache=$(dotnet nuget locals global-packages --list | awk '{ print $2 }')

cd Samples/SymphonyLike/
echo rm -rf ${nuget_cache}/armonik.*
rm -rf $(dotnet nuget locals global-packages --list | awk '{ print $2 }')/armonik.*
- dotnet publish -c Debug --self-contained -r linux-x64 SymphonyLike.sln
+ dotnet publish -f net6.0 -c Debug --self-contained -r linux-x64 SymphonyLike.sln

echo "Need to create Data folder for application"
mkdir -p ${HOME}/data

cp packages/ArmoniK.Samples.SymphonyPackage-v2.0.0.zip ${HOME}/data
kubectl delete -n armonik $(kubectl get pods -n armonik -l service=compute-plane --no-headers=true -o name) || true

cd ArmoniK.Samples.SymphonyClient/
- dotnet bin/Debug/net5.0/linux-x64/ArmoniK.Samples.SymphonyClient.dll
+ dotnet run -f net6.0