Skip to content

Commit cbbafc1

Browse files
committed
Merge branch 'main' into 2592-mapper-bridge
2 parents 8c6a13e + 111a746 commit cbbafc1

File tree

47 files changed

+611
-733
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+611
-733
lines changed

.github/workflows/build-workflow.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ jobs:
176176
path: tests/RobotFramework/output
177177

178178
- name: Send report to commit
179-
uses: joonvena/robotframework-reporter-action@v2.3
179+
uses: joonvena/robotframework-reporter-action@v2.4
180180
if: always() && github.event_name == 'pull_request_target'
181181
with:
182182
gh_access_token: ${{ secrets.GITHUB_TOKEN }}
@@ -353,7 +353,7 @@ jobs:
353353
fetch-depth: 0
354354
persist-credentials: false
355355
- name: Release
356-
uses: softprops/action-gh-release@v1
356+
uses: softprops/action-gh-release@v2
357357
env:
358358
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
359359
with:

ci/build_scripts/package.sh

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ fi
119119

120120
if [ -z "$PACKAGE_TYPES" ]; then
121121
case "$TARGET" in
122-
*linux*) PACKAGE_TYPES="deb,apk,rpm,tarball" ;;
122+
*linux*|all) PACKAGE_TYPES="deb,apk,rpm,tarball" ;;
123123
*apple*) PACKAGE_TYPES="tarball" ;;
124124
*) PACKAGE_TYPES="tarball" ;;
125125
esac
@@ -194,6 +194,14 @@ build_virtual_package() {
194194
if [[ "$PACKAGE_TYPES" =~ apk ]]; then
195195
env GIT_SEMVER="${APK_VERSION:-$GIT_SEMVER}" RELEASE="r0" nfpm "${COMMON_ARGS[@]}" --packager apk
196196
fi
197+
198+
# Expect to build at least 1 virtual package to prevent silent errors
199+
# when no virtual packages were created
200+
VIRTUAL_PACKAGE_COUNT=$(find target/virtual-packages -type f | wc -l | xargs)
201+
if [ "$VIRTUAL_PACKAGE_COUNT" -lt 1 ]; then
202+
echo "Expected at least 1 virtual packages to have been created. got=$VIRTUAL_PACKAGE_COUNT" >&2
203+
exit 1
204+
fi
197205
}
198206

199207
get_package_arch() {

crates/common/batcher/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ time = { workspace = true }
1515
tokio = { workspace = true, features = ["time"] }
1616

1717
[dev-dependencies]
18+
tedge_actors = { workspace = true, features = ["test-helpers"] }
1819
tokio = { workspace = true, features = ["rt", "macros"] }
1920

2021
[lints]

crates/common/batcher/src/driver.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,6 @@ mod tests {
178178
use std::time::Duration;
179179
use tedge_actors::test_helpers::ServiceProviderExt;
180180
use tedge_actors::Builder;
181-
use tedge_actors::NoConfig;
182181
use tedge_actors::SimpleMessageBoxBuilder;
183182
use tokio::time::timeout;
184183

@@ -256,7 +255,7 @@ mod tests {
256255
.build();
257256
let batcher = Batcher::new(config);
258257
let mut box_builder = SimpleMessageBoxBuilder::new("test", 1);
259-
let test_box = box_builder.new_client_box(NoConfig);
258+
let test_box = box_builder.new_client_box();
260259
let driver_box = box_builder.build();
261260

262261
let driver = BatchDriver::new(batcher, driver_box);

crates/common/batcher/src/lib.rs

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ use tedge_actors::MessageSource;
2424
use tedge_actors::NoConfig;
2525
use tedge_actors::RuntimeRequest;
2626
use tedge_actors::RuntimeRequestSink;
27-
use tedge_actors::ServiceProvider;
2827
use tedge_actors::SimpleMessageBoxBuilder;
2928

3029
pub struct BatchingActorBuilder<B: Batchable> {
@@ -68,25 +67,7 @@ impl<B: Batchable> BatchingActorBuilder<B> {
6867
}
6968
}
7069

71-
// FIXME: This implementation highlights something new to me.
72-
// For some actor it makes little sense to impl ServiceProvider,
73-
// as the consumer of the outputs is likely a *different* actor as the producer of the inputs
74-
impl<B: Batchable> ServiceProvider<BatchDriverInput<B>, BatchDriverOutput<B>, NoConfig>
75-
for BatchingActorBuilder<B>
76-
{
77-
fn connect_consumer(
78-
&mut self,
79-
config: NoConfig,
80-
response_sender: DynSender<BatchDriverOutput<B>>,
81-
) -> DynSender<BatchDriverInput<B>> {
82-
self.message_box.connect_consumer(config, response_sender)
83-
}
84-
}
85-
86-
impl<B: Batchable> MessageSink<BatchDriverInput<B>, NoConfig> for BatchingActorBuilder<B> {
87-
fn get_config(&self) -> NoConfig {
88-
NoConfig
89-
}
70+
impl<B: Batchable> MessageSink<BatchDriverInput<B>> for BatchingActorBuilder<B> {
9071
fn get_sender(&self) -> DynSender<BatchDriverInput<B>> {
9172
self.message_box.get_sender()
9273
}

crates/core/tedge_actors/src/actors.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ pub mod tests {
7777
#[tokio::test]
7878
async fn running_an_actor_without_a_runtime() {
7979
let mut box_builder = SimpleMessageBoxBuilder::new("test", 16);
80-
let mut client_message_box = box_builder.new_client_box(NoConfig);
80+
let mut client_message_box = box_builder.new_client_box();
8181
let mut runtime_box = box_builder.get_signal_sender();
8282
let actor_message_box = box_builder.build();
8383
let actor = Echo {

0 commit comments

Comments
 (0)