Skip to content

Commit

Permalink
chore: Update API version (#48)
Browse files Browse the repository at this point in the history
  • Loading branch information
ddiakiteaneo authored Nov 22, 2024
2 parents 7aa6efc + ec4264e commit ffa4616
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
6 changes: 3 additions & 3 deletions .docs/content/guide/2.tests.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,13 @@ The ArmoniK infrastructure must be deployed with the C++ worker image. To do so,
### Build the client test and submit jobs

Once the worker is built and ArmoniK is deployed, It is possible to submit jobs by using the client test in the repository. In order to do so, build the client test by launching the cmake at the project root with the flags ```BUILD_CLIENT=ON``` and ```BUILD_END2END=ON```.
After the test build, the environment variable ```Grpc__EndPoint``` must be set to the ArmoniK control plane address in the test environment.
After the test build, the environment variable ```GrpcClient__Endpoint``` must be set to the ArmoniK control plane address in the test environment.
To get the control plane address and port, we can use this Kubectl commands:

```bash
export CPIP=$(kubectl get svc control-plane -n armonik -o custom-columns="IP:.spec.clusterIP" --no-headers=true)
export CPPort=$(kubectl get svc control-plane -n armonik -o custom-columns="PORT:.spec.ports[*].port" --no-headers=true)
export Grpc__EndPoint=http://$CPIP:$CPPort
export GrpcClient__Endpoint=http://$CPIP:$CPPort
```

The worker lib version ```WorkerLib__Version``` must also be specified if the default one (0.1.0) is not used. These values can also be specified in the JSON file when used. Then run in your build environnement:
Expand All @@ -49,5 +49,5 @@ cd /app/install/bin```
It is also possible to use the test image ```armonik_sdk_client_test``` generated by the script ```build-deploy-end2end.sh``` to run tests. This docker image provides an environment with ArmoniK Client and Client Test built to run tests and submit tasks to ArmoniK.

```bash
docker run --rm -t --network host -e Grpc__EndPoint=http://$CPIP:$CPPort -e WorkerLib__Version="$lib_version" armonik_sdk_client_test:"$version"
docker run --rm -t --network host -e GrpcClient__Endpoint=http://$CPIP:$CPPort -e WorkerLib__Version="$lib_version" armonik_sdk_client_test:"$version"
```
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ jobs:
kubectl set image deployment/compute-plane-default -n armonik worker-0=${{ steps.build.outputs.worker_img}}:${{ steps.build.outputs.worker_version }}
export CPIP=$(kubectl get svc control-plane -n armonik -o custom-columns="IP:.spec.clusterIP" --no-headers=true)
export CPPort=$(kubectl get svc control-plane -n armonik -o custom-columns="PORT:.spec.ports[*].port" --no-headers=true)
docker run --rm -t --network host -e Grpc__EndPoint=http://$CPIP:$CPPort -e WorkerLib__Version="${{ needs.versionning.outputs.version}}" "${{ steps.build.outputs.client_img}}:${{ needs.versionning.outputs.version}}"
docker run --rm -t --network host -e GrpcClient__Endpoint=http://$CPIP:$CPPort -e WorkerLib__Version="${{ needs.versionning.outputs.version}}" "${{ steps.build.outputs.client_img}}:${{ needs.versionning.outputs.version}}"
- name: Push Docker
run: |
Expand Down
10 changes: 5 additions & 5 deletions ArmoniK.SDK.Client.Test/src/ArmoniK.SDK.Client.Test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ TEST(testSDK, testEcho) {
ArmoniK::Sdk::Common::Configuration config;
config.add_json_configuration("appsettings.json").add_env_configuration();

std::cout << "Endpoint : " << config.get("Grpc__EndPoint") << std::endl;
std::cout << "Endpoint : " << config.get("GrpcClient__Endpoint") << std::endl;
if (config.get("Worker__Type").empty()) {
config.set("Worker__Type", "End2EndTest");
}
Expand Down Expand Up @@ -124,7 +124,7 @@ TEST(testSDK, testAddInt) {
ArmoniK::Sdk::Common::Configuration config;
config.add_json_configuration("appsettings.json").add_env_configuration();

std::cout << "Endpoint : " << config.get("Grpc__EndPoint") << std::endl;
std::cout << "Endpoint : " << config.get("GrpcClient__Endpoint") << std::endl;
if (config.get("Worker__Type").empty()) {
config.set("Worker__Type", "End2EndTest");
}
Expand Down Expand Up @@ -222,7 +222,7 @@ TEST(testSDK, testAddFloat) {
ArmoniK::Sdk::Common::Configuration config;
config.add_json_configuration("appsettings.json").add_env_configuration();

std::cout << "Endpoint : " << config.get("Grpc__EndPoint") << std::endl;
std::cout << "Endpoint : " << config.get("GrpcClient__Endpoint") << std::endl;
if (config.get("Worker__Type").empty()) {
config.set("Worker__Type", "End2EndTest");
}
Expand Down Expand Up @@ -331,7 +331,7 @@ TEST(testSDK, testStressTest) {
ArmoniK::Sdk::Common::Configuration config;
config.add_json_configuration("appsettings.json").add_env_configuration();

std::cout << "Endpoint : " << config.get("Grpc__EndPoint") << std::endl;
std::cout << "Endpoint : " << config.get("GrpcClient__Endpoint") << std::endl;
if (config.get("Worker__Type").empty()) {
config.set("Worker__Type", "End2EndTest");
}
Expand Down Expand Up @@ -404,7 +404,7 @@ TEST(testSDK, testSegFault) {
ArmoniK::Sdk::Common::Configuration config;
config.add_json_configuration("appsettings.json").add_env_configuration();

std::cout << "Endpoint : " << config.get("Grpc__EndPoint") << std::endl;
std::cout << "Endpoint : " << config.get("GrpcClient__Endpoint") << std::endl;
if (config.get("Worker__Type").empty()) {
config.set("Worker__Type", "End2EndTest");
}
Expand Down
2 changes: 1 addition & 1 deletion tools/common.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env bash

# shellcheck disable=SC2034
ARMONIK_API_VERSION_DEFAULT="3.21.0"
ARMONIK_API_VERSION_DEFAULT="3.22.0"
ARMONIK_SDK_VERSION_DEFAULT="0.1.0-local"

0 comments on commit ffa4616

Please sign in to comment.