Skip to content

Commit f5365b9

Browse files
committed
Resolving installation incompatibilities
Signed-off-by: zesk1999 <[email protected]>
1 parent e358209 commit f5365b9

File tree

18 files changed

+273
-172
lines changed

18 files changed

+273
-172
lines changed

.github/workflows/constraints.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
setuptools==69.5.1

.github/workflows/test.yml

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,11 @@ jobs:
7676
packages: colcon-common-extensions colcon-mixin vcstool gcovr==5
7777
upgrade: false
7878

79+
- name: Enforce setuptools constraint
80+
run: |
81+
python3 -m pip install "setuptools==69.5.1"
82+
python3 -m pip check || true
83+
7984
- name: Install Python submodules dependencies
8085
uses: eProsima/eProsima-CI/ubuntu/install_python_packages@v0
8186
with:
@@ -94,7 +99,6 @@ jobs:
9499

95100
- name: Run ollama
96101
run: |
97-
ollama serve &
98102
ollama pull llama3
99103
100104
- name: Init submodules manually
@@ -139,7 +143,7 @@ jobs:
139143
140144
- name: Download Annoy Index file from Google Drive
141145
run: |
142-
pip install gdown
146+
python3 -m pip install -c ${{ github.workspace }}/src/sustainml_lib/.github/workflows/constraints.txt
143147
gdown --id 1TQvt1bSXares-I9l7Wki0Jge3oubRkOJ -O ${{ github.workspace }}/src/sustainml_lib/sustainml_modules/sustainml_modules/sustainml-wp1/rag/models_index.ann
144148
145149
- name: Compile and run tests
@@ -157,6 +161,8 @@ jobs:
157161
clang:
158162
runs-on: ubuntu-24.04
159163
steps:
164+
matrix:
165+
cmake_build_type: [Release, Debug]
160166
- name: Free Disk Space
161167
run: |
162168
echo "Disk space before cleanup:"
@@ -195,6 +201,11 @@ jobs:
195201
packages: colcon-common-extensions colcon-mixin vcstool gcovr==5
196202
upgrade: false
197203

204+
- name: Enforce setuptools constraint
205+
run: |
206+
python3 -m pip install "setuptools==69.5.1"
207+
python3 -m pip check || true
208+
198209
- name: Install Python documentation dependencies
199210
uses: eProsima/eProsima-CI/ubuntu/install_python_packages@v0
200211
with:
@@ -219,7 +230,6 @@ jobs:
219230

220231
- name: Run ollama
221232
run: |
222-
ollama serve &
223233
ollama pull llama3
224234
225235
- name: Init submodules manually
@@ -229,7 +239,7 @@ jobs:
229239
230240
- name: Download file from Google Drive
231241
run: |
232-
pip install gdown
242+
python3 -m pip install -c ${{ github.workspace }}/src/sustainml_lib/.github/workflows/constraints.txt
233243
gdown --id 1TQvt1bSXares-I9l7Wki0Jge3oubRkOJ -O ${{ github.workspace }}/src/sustainml_lib/sustainml_modules/sustainml_modules/sustainml-wp1/rag/models_index.ann
234244
235245
- name: Compile and run tests
@@ -243,7 +253,7 @@ jobs:
243253
# UNCRUSTIFY
244254

245255
uncrustify:
246-
runs-on: ubuntu-22.04
256+
runs-on: ubuntu-24.04
247257
steps:
248258

249259
- name: Uncrustify

sustainml_cpp/src/cpp/core/GenericServiceNodeImpl.hpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -78,10 +78,7 @@ class GenericServiceNodeImpl : public ServerBase
7878
// Copy into owned std::string
7979
std::string reply = res.configuration();
8080

81-
std::cout << "[RPC SERVER/" << tag_
82-
<< "] returning cfg='" << reply << "'\n";
83-
84-
return reply; // Safe
81+
return reply;
8582
}
8683

8784
private:

sustainml_cpp/src/cpp/core/NodeImpl.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,8 +181,6 @@ bool NodeImpl::init(
181181
return false;
182182
}
183183

184-
std::cout << "[DEBUG NodeImpl] init() called with name='" << name << "'" << std::endl;
185-
186184
eprosima::fastdds::dds::ReplierQos rqos;
187185

188186
try

sustainml_cpp/src/cpp/orchestrator/OrchestratorNode.cpp

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -435,15 +435,6 @@ bool OrchestratorNode::init()
435435
<< (holder->ml_model_client ? "true" : "false")
436436
<< std::endl;
437437

438-
std::cout << "[DEBUG Orchestrator] RPC clients summary: "
439-
<< "app=" << (holder->app_requirements_client ? "1" : "0") << " "
440-
<< "hwc=" << (holder->hw_constraints_client ? "1" : "0") << " "
441-
<< "hwr=" << (holder->hw_resources_client ? "1" : "0") << " "
442-
<< "co2=" << (holder->carbon_footprint_client ? "1" : "0") << " "
443-
<< "meta=" << (holder->ml_model_metadata_client ? "1" : "0") << " "
444-
<< "ml=" << (holder->ml_model_client ? "1" : "0")
445-
<< std::endl;
446-
447438
if (!holder->app_requirements_client ||
448439
!holder->hw_constraints_client ||
449440
!holder->hw_resources_client ||
@@ -459,9 +450,6 @@ bool OrchestratorNode::init()
459450

460451
rpc_client_holder_ = holder;
461452

462-
std::cout << "[DEBUG Orchestrator] RPC clients created for per-node services"
463-
<< std::endl;
464-
465453
initialized_.store(true);
466454
initialization_cv_.notify_one();
467455
return true;
@@ -698,10 +686,6 @@ types::ResponseType OrchestratorNode::configuration_request (
698686
return res;
699687
}
700688

701-
std::cout << "[DEBUG Orchestrator] configuration_request() entered, "
702-
<< "node_id=" << req.node_id()
703-
<< " config='" << req.configuration() << "'" << std::endl;
704-
705689
auto* holder = static_cast<RpcClientHolder*>(rpc_client_holder_);
706690
if (!holder)
707691
{
@@ -712,11 +696,6 @@ types::ResponseType OrchestratorNode::configuration_request (
712696
NodeID node_id = static_cast<NodeID>(req.node_id());
713697
std::string cfg;
714698

715-
std::cout << "[DEBUG Orchestrator] configuration_request route: tx=" << req.transaction_id()
716-
<< " node_id(enum)=" << static_cast<int>(node_id)
717-
<< " node_id(raw)=" << req.node_id()
718-
<< std::endl;
719-
720699
try
721700
{
722701
switch (node_id)

sustainml_cpp/src/cpp/types/SustainMLService.hpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,8 @@ class eProsima_user_DllExport InternalError : public eprosima::fastdds::dds::rpc
6767
* Default constructor.
6868
*/
6969
InternalError()
70-
: InternalError("InternalError")
70+
: InternalError(
71+
"InternalError")
7172
{
7273
}
7374

sustainml_cpp/src/cpp/types/SustainMLServiceCdrAux.ipp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -90,13 +90,13 @@ eProsima_user_DllExport void deserialize(
9090
switch (mid.id)
9191
{
9292
case 0:
93-
{
94-
std::string msg;
95-
dcdr >> msg;
96-
InternalError tmp {msg};
97-
data = tmp;
98-
break;
99-
}
93+
{
94+
std::string msg;
95+
dcdr >> msg;
96+
InternalError tmp {msg};
97+
data = tmp;
98+
break;
99+
}
100100

101101
default:
102102
ret_value = false;

sustainml_cpp/src/cpp/types/SustainMLServiceServer.cxx

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -76,11 +76,11 @@ class AppRequirementsServiceServerLogic
7676
size_t thread_pool_size,
7777
std::shared_ptr<AppRequirementsServiceServer_IServerImplementation> implementation)
7878
: AppRequirementsServiceServerLogic(
79-
part,
80-
service_name,
81-
qos,
82-
std::make_shared<ThreadPool>(*this, thread_pool_size),
83-
std::move(implementation))
79+
part,
80+
service_name,
81+
qos,
82+
std::make_shared<ThreadPool>(*this, thread_pool_size),
83+
std::move(implementation))
8484
{
8585
}
8686

@@ -624,11 +624,11 @@ class HWConstraintsServiceServerLogic
624624
size_t thread_pool_size,
625625
std::shared_ptr<HWConstraintsServiceServer_IServerImplementation> implementation)
626626
: HWConstraintsServiceServerLogic(
627-
part,
628-
service_name,
629-
qos,
630-
std::make_shared<ThreadPool>(*this, thread_pool_size),
631-
std::move(implementation))
627+
part,
628+
service_name,
629+
qos,
630+
std::make_shared<ThreadPool>(*this, thread_pool_size),
631+
std::move(implementation))
632632
{
633633
}
634634

@@ -1172,11 +1172,11 @@ class HWResourcesServiceServerLogic
11721172
size_t thread_pool_size,
11731173
std::shared_ptr<HWResourcesServiceServer_IServerImplementation> implementation)
11741174
: HWResourcesServiceServerLogic(
1175-
part,
1176-
service_name,
1177-
qos,
1178-
std::make_shared<ThreadPool>(*this, thread_pool_size),
1179-
std::move(implementation))
1175+
part,
1176+
service_name,
1177+
qos,
1178+
std::make_shared<ThreadPool>(*this, thread_pool_size),
1179+
std::move(implementation))
11801180
{
11811181
}
11821182

@@ -1720,11 +1720,11 @@ class CarbonFootprintServiceServerLogic
17201720
size_t thread_pool_size,
17211721
std::shared_ptr<CarbonFootprintServiceServer_IServerImplementation> implementation)
17221722
: CarbonFootprintServiceServerLogic(
1723-
part,
1724-
service_name,
1725-
qos,
1726-
std::make_shared<ThreadPool>(*this, thread_pool_size),
1727-
std::move(implementation))
1723+
part,
1724+
service_name,
1725+
qos,
1726+
std::make_shared<ThreadPool>(*this, thread_pool_size),
1727+
std::move(implementation))
17281728
{
17291729
}
17301730

@@ -2268,11 +2268,11 @@ class MLModelMetadataServiceServerLogic
22682268
size_t thread_pool_size,
22692269
std::shared_ptr<MLModelMetadataServiceServer_IServerImplementation> implementation)
22702270
: MLModelMetadataServiceServerLogic(
2271-
part,
2272-
service_name,
2273-
qos,
2274-
std::make_shared<ThreadPool>(*this, thread_pool_size),
2275-
std::move(implementation))
2271+
part,
2272+
service_name,
2273+
qos,
2274+
std::make_shared<ThreadPool>(*this, thread_pool_size),
2275+
std::move(implementation))
22762276
{
22772277
}
22782278

@@ -2816,11 +2816,11 @@ class MLModelServiceServerLogic
28162816
size_t thread_pool_size,
28172817
std::shared_ptr<MLModelServiceServer_IServerImplementation> implementation)
28182818
: MLModelServiceServerLogic(
2819-
part,
2820-
service_name,
2821-
qos,
2822-
std::make_shared<ThreadPool>(*this, thread_pool_size),
2823-
std::move(implementation))
2819+
part,
2820+
service_name,
2821+
qos,
2822+
std::make_shared<ThreadPool>(*this, thread_pool_size),
2823+
std::move(implementation))
28242824
{
28252825
}
28262826

sustainml_cpp/src/cpp/types/SustainMLServiceServer.hpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,8 @@ struct HWConstraintsServiceServer_IServerImplementation
9898
* When set to 0, a pool with a single thread will be created.
9999
* @param implementation The implementation of the server interface.
100100
*/
101-
extern eProsima_user_DllExport std::shared_ptr<eprosima::fastdds::dds::rpc::RpcServer> create_HWConstraintsServiceServer(
101+
extern eProsima_user_DllExport std::shared_ptr<eprosima::fastdds::dds::rpc::RpcServer> create_HWConstraintsServiceServer
102+
(
102103
eprosima::fastdds::dds::DomainParticipant& part,
103104
const char* service_name,
104105
const eprosima::fastdds::dds::ReplierQos& qos,
@@ -114,7 +115,8 @@ extern eProsima_user_DllExport std::shared_ptr<eprosima::fastdds::dds::rpc::RpcS
114115
* @param scheduler The request scheduling strategy to use for the server.
115116
* @param implementation The implementation of the server interface.
116117
*/
117-
extern eProsima_user_DllExport std::shared_ptr<eprosima::fastdds::dds::rpc::RpcServer> create_HWConstraintsServiceServer(
118+
extern eProsima_user_DllExport std::shared_ptr<eprosima::fastdds::dds::rpc::RpcServer> create_HWConstraintsServiceServer
119+
(
118120
eprosima::fastdds::dds::DomainParticipant& part,
119121
const char* service_name,
120122
const eprosima::fastdds::dds::ReplierQos& qos,

sustainml_cpp/src/cpp/types/SustainMLServiceServerImpl.hpp

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@ struct AppRequirementsServiceServerImplementation :
3737
{
3838
static_cast<void>(info);
3939
static_cast<void>(configuration);
40-
throw eprosima::fastdds::dds::rpc::RemoteUnsupportedError("Operation 'update_configuration' is not implemented");
40+
throw eprosima::fastdds::dds::rpc::RemoteUnsupportedError(
41+
"Operation 'update_configuration' is not implemented");
4142
}
4243

4344
};
@@ -56,7 +57,8 @@ struct HWConstraintsServiceServerImplementation :
5657
{
5758
static_cast<void>(info);
5859
static_cast<void>(configuration);
59-
throw eprosima::fastdds::dds::rpc::RemoteUnsupportedError("Operation 'update_configuration' is not implemented");
60+
throw eprosima::fastdds::dds::rpc::RemoteUnsupportedError(
61+
"Operation 'update_configuration' is not implemented");
6062
}
6163

6264
};
@@ -75,7 +77,8 @@ struct HWResourcesServiceServerImplementation :
7577
{
7678
static_cast<void>(info);
7779
static_cast<void>(configuration);
78-
throw eprosima::fastdds::dds::rpc::RemoteUnsupportedError("Operation 'update_configuration' is not implemented");
80+
throw eprosima::fastdds::dds::rpc::RemoteUnsupportedError(
81+
"Operation 'update_configuration' is not implemented");
7982
}
8083

8184
};
@@ -94,7 +97,8 @@ struct CarbonFootprintServiceServerImplementation :
9497
{
9598
static_cast<void>(info);
9699
static_cast<void>(configuration);
97-
throw eprosima::fastdds::dds::rpc::RemoteUnsupportedError("Operation 'update_configuration' is not implemented");
100+
throw eprosima::fastdds::dds::rpc::RemoteUnsupportedError(
101+
"Operation 'update_configuration' is not implemented");
98102
}
99103

100104
};
@@ -113,7 +117,8 @@ struct MLModelMetadataServiceServerImplementation :
113117
{
114118
static_cast<void>(info);
115119
static_cast<void>(configuration);
116-
throw eprosima::fastdds::dds::rpc::RemoteUnsupportedError("Operation 'update_configuration' is not implemented");
120+
throw eprosima::fastdds::dds::rpc::RemoteUnsupportedError(
121+
"Operation 'update_configuration' is not implemented");
117122
}
118123

119124
};
@@ -132,7 +137,8 @@ struct MLModelServiceServerImplementation :
132137
{
133138
static_cast<void>(info);
134139
static_cast<void>(configuration);
135-
throw eprosima::fastdds::dds::rpc::RemoteUnsupportedError("Operation 'update_configuration' is not implemented");
140+
throw eprosima::fastdds::dds::rpc::RemoteUnsupportedError(
141+
"Operation 'update_configuration' is not implemented");
136142
}
137143

138144
};

0 commit comments

Comments
 (0)