Skip to content

Commit

Permalink
Feature/SK-1164 | grpc allow version up to <v1.67 (#732)
Browse files Browse the repository at this point in the history
  • Loading branch information
Wrede authored Nov 5, 2024
1 parent faf1277 commit 8b8a198
Show file tree
Hide file tree
Showing 9 changed files with 706 additions and 392 deletions.
47 changes: 33 additions & 14 deletions .ci/tests/examples/print_logs.sh
Original file line number Diff line number Diff line change
@@ -1,19 +1,38 @@
#!/bin/bash
echo "Minio logs"
docker logs "$(basename $PWD)-minio-1"
service = $1
example = $2
helper = $3

echo "Mongo logs"
docker logs "$(basename $PWD)-mongo-1"
if [ "$service" == "minio" ]; then
echo "Minio logs"
docker logs "$(basename $PWD)-minio-1"
exit 0
fi

if [ "$service" == "mongo" ]; then
echo "Mongo logs"
docker logs "$(basename $PWD)-mongo-1"
exit 0
fi

echo "API-Server logs"
docker logs "$(basename $PWD)-api-server-1"
if [ "$service" == "api-server" ]; then
echo "API-Server logs"
docker logs "$(basename $PWD)-api-server-1"
exit 0
fi

if [ "$service" == "combiner" ]; then
echo "Reducer logs"
docker logs "$(basename $PWD)-combiner-1"
exit 0
fi

echo "Combiner logs"
docker logs "$(basename $PWD)-combiner-1"
echo "Client 1 logs"
if [ "$example" == "mnist-keras" ]; then
docker logs "$(basename $PWD)-client-1"
else
docker logs "$(basename $PWD)-client1-1"
if [ "$service" == "client" ]; then
echo "Client 0 logs"
if [ "$example" == "mnist-keras" ]; then
docker logs "$(basename $PWD)-client-0"
else
docker logs "$(basename $PWD)-client0-1"
fi
exit 0
fi
1 change: 1 addition & 0 deletions .github/workflows/code-checks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ jobs:
--exclude-dir='flower-client'
--exclude='tests.py'
--exclude='controller_cmd.py'
--exclude='fedn_pb2_grpc.py'
--exclude='combiner_cmd.py'
--exclude='run_cmd.py'
--exclude='README.rst'
Expand Down
20 changes: 18 additions & 2 deletions .github/workflows/integration-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,22 @@ jobs:
# run: .ci/tests/examples/run_prediction.sh ${{ matrix.to_test }}
# if: ${{ matrix.os != 'macos-11' && matrix.to_test == 'mnist-keras keras' }} # example available for Keras

- name: print logs
- name: print logs api-server
if: failure()
run: .ci/tests/examples/print_logs.sh
run: .ci/tests/examples/print_logs.sh api-server ${{ matrix.to_test }}

- name: print logs combiner
if: failure()
run: .ci/tests/examples/print_logs.sh combiner ${{ matrix.to_test }}

- name: print logs client
if: failure()
run: .ci/tests/examples/print_logs.sh client ${{ matrix.to_test }}

- name: print logs mongo
if: failure()
run: .ci/tests/examples/print_logs.sh mongo ${{ matrix.to_test }}

- name: print logs minio
if: failure()
run: .ci/tests/examples/print_logs.sh minio ${{ matrix.to_test }}
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
author = "Scaleout Systems AB"

# The full version, including alpha/beta/rc tags
release = "0.18.0"
release = "0.19.0"

# Add any Sphinx extension module names here, as strings
extensions = [
Expand Down
8 changes: 4 additions & 4 deletions fedn/network/combiner/combiner.py
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,7 @@ def _send_status(self, status):
:param status: the status message to report
:type status: :class:`fedn.network.grpc.fedn_pb2.Status`
"""
data = MessageToDict(status, including_default_value_fields=True)
data = MessageToDict(status)
_ = status_store.add(data)

def _flush_model_update_queue(self):
Expand Down Expand Up @@ -750,7 +750,7 @@ def register_model_validation(self, validation):
:param validation: the model validation
:type validation: :class:`fedn.network.grpc.fedn_pb2.ModelValidation`
"""
data = MessageToDict(validation, including_default_value_fields=True)
data = MessageToDict(validation)
success, result = validation_store.add(data)
if not success:
logger.error(result)
Expand All @@ -769,7 +769,7 @@ def SendModelValidation(self, request, context):
"""
logger.info("Recieved ModelValidation from {}".format(request.sender.name))

validation = MessageToDict(request, including_default_value_fields=True)
validation = MessageToDict(request)
validation_store.add(validation)

response = fedn.Response()
Expand All @@ -788,7 +788,7 @@ def SendModelPrediction(self, request, context):
"""
logger.info("Recieved ModelPrediction from {}".format(request.sender.name))

result = MessageToDict(request, including_default_value_fields=True)
result = MessageToDict(request)
prediction_store.add(result)

response = fedn.Response()
Expand Down
216 changes: 113 additions & 103 deletions fedn/network/grpc/fedn_pb2.py

Large diffs are not rendered by default.

Loading

0 comments on commit 8b8a198

Please sign in to comment.