Skip to content

Commit 8a3453f

Browse files
Edge Virtualization Platform v1.46.0
1 parent a1f96ab commit 8a3453f

File tree

11 files changed

+184
-142
lines changed

11 files changed

+184
-142
lines changed

.github/workflows/build-sdk.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
username: ${{ github.actor }}
3030
password: ${{ github.token }}
3131
options: ${{ startsWith(matrix.runner, 'buildjet') && '--user 1000:1001' || '--user 1001:127' }}
32-
timeout-minutes: 8 # the worst case is 3 minutes
32+
timeout-minutes: ${{ startsWith(matrix.runner, 'buildjet') && 20 || 8 }} # the worst case is 3 minutes but buildjet sometimes is slower downloading the docker image
3333
strategy:
3434
fail-fast: false
3535
matrix:

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
username: ${{ github.actor }}
3030
password: ${{ github.token }}
3131
options: ${{ startsWith(matrix.runner, 'buildjet') && '--user 1000:1001' || '--user 1001:127' }}
32-
timeout-minutes: 8 # the worst case is 3 minutes
32+
timeout-minutes: ${{ startsWith(matrix.runner, 'buildjet') && 20 || 8 }} # the worst case is 3 minutes but buildjet sometimes is slower downloading the docker image
3333
strategy:
3434
fail-fast: false
3535
matrix:

.github/workflows/release.yml

Lines changed: 35 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,26 @@ jobs:
1313
release-artifacts:
1414
runs-on: ubuntu-22.04
1515
steps:
16-
- uses: actions/checkout@v4
16+
- name: Get release version name
17+
id: version
18+
run: |
19+
name=$(echo "${{ github.ref_name }}" | awk -F/ '{print $NF}')
20+
echo "name=$name" >> $GITHUB_OUTPUT
1721
1822
- name: Get last successful run id
1923
id: run-id
2024
env:
2125
GH_TOKEN: ${{ github.token }}
2226
run: |
23-
last_run_id=$(gh run list -w main.yml -c ${{ github.sha }} -b main -s completed --json databaseId -L 1 | jq -r .[].databaseId)
27+
last_run_id=$(
28+
gh run list \
29+
--repo ${{ github.repository }} \
30+
-w main.yml \
31+
-c ${{ github.sha }} \
32+
-b main \
33+
-s completed \
34+
--json databaseId -L 1 | jq -r .[].databaseId
35+
)
2436
test -z $last_run_id && echo "cannot find last successful run_id" && exit 1 || echo "last_run_id=$last_run_id" && echo "last_run_id=$last_run_id" >> $GITHUB_OUTPUT
2537
2638
- name: Download Python SDK (RaspiOS bookworm ARM64)
@@ -113,6 +125,17 @@ jobs:
113125
path: dist-ubuntu-noble-amd64
114126
github-token: ${{ github.event.repository.private && secrets.MIDOJENKINS_ARTIFACT_READ_EVP_AGENT_OSS || github.token }}
115127

128+
- name: Download SBOM
129+
uses: actions/download-artifact@v4
130+
env:
131+
LAST_RUN_ID: ${{ steps.run-id.outputs.last_run_id }}
132+
with:
133+
pattern: sbom-agent-*${{ env.LAST_RUN_ID }}
134+
merge-multiple: false
135+
run-id: ${{ env.LAST_RUN_ID }}
136+
path: sbom
137+
github-token: ${{ github.event.repository.private && secrets.MIDOJENKINS_ARTIFACT_READ_EVP_AGENT_OSS || github.token }}
138+
116139
- name: Rename deb artifacts
117140
run: |
118141
set -x
@@ -135,6 +158,15 @@ jobs:
135158
mv $whl $(echo $whl | sed -E 's/(.*)-([^-]*).whl/\1-raspios_bookworm-\2.whl/');
136159
done
137160
161+
- name: Create a zip for sbom
162+
run: |
163+
set -x
164+
cd sbom
165+
for dir in sbom-agent*; do
166+
sbom_name="${dir%-*}"
167+
zip -r ${sbom_name}-${{ steps.version.outputs.name }}.zip $dir;
168+
done
169+
138170
- name: List files in dist-ubuntu-noble-amd64
139171
run: ls -la dist-ubuntu-noble-amd64
140172

@@ -151,3 +183,4 @@ jobs:
151183
files: |
152184
dist-*/*.deb
153185
dist-*/*.whl
186+
sbom/*.zip

.github/workflows/test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
username: ${{ github.actor }}
3030
password: ${{ github.token }}
3131
options: ${{ startsWith(matrix.runner, 'buildjet') && '--user 1000:1001' || '--user 1001:127' }}
32-
timeout-minutes: 30
32+
timeout-minutes: ${{ startsWith(matrix.runner, 'buildjet') && 20 || 8 }} # the worst case is 3 minutes but buildjet sometimes is slower downloading the docker image
3333
strategy:
3434
fail-fast: false
3535
matrix:
@@ -67,7 +67,7 @@ jobs:
6767
make -j$((`nproc` * 2))\
6868
KBUILD_DEFCONFIG=configs/unit-test-all-hubs-wasm.config\
6969
test_modules/tests
70-
70+
7171
- name: Run tests
7272
env:
7373
ASAN_OPTIONS: detect_leaks=1:detect_stack_use_after_return=1

docs/getting_started/prerequisites.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ EVP Agent requires the following tools:
6060

6161
It also requires the following libraries:
6262

63-
* `WAMR`_ 2.1.2
63+
* `WAMR`_ 2.2.0
6464
* `MbedTLS`_ 3.6.2
6565
* `Flatcc`_ 0.6.1
6666

@@ -89,7 +89,7 @@ To build the AoT and XiP modules, WAMRC is required.
8989
This requires:
9090

9191
* `WASI-SDK`_ 24
92-
* `WAMRC`_ 2.1.2
92+
* `WAMRC`_ 2.2.0
9393

9494
Package installation
9595
********************

src/libevp-agent/module_instance.c

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -884,9 +884,14 @@ module_instance_forward_fn(const void *message, const void *module_instance)
884884
m->name, msg->topic, subscribe_alias->name,
885885
(int)msg->bloblen, (const char *)msg->blob);
886886
#endif
887-
sdk_queue_message(m->name, subscribe_alias->name,
888-
msg->blob, msg->bloblen);
889-
msg->reason = EVP_MESSAGE_SENT_CALLBACK_REASON_SENT;
887+
if (sdk_queue_message(m->name, subscribe_alias->name,
888+
msg->blob, msg->bloblen)) {
889+
msg->reason =
890+
EVP_MESSAGE_SENT_CALLBACK_REASON_ERROR;
891+
} else {
892+
msg->reason =
893+
EVP_MESSAGE_SENT_CALLBACK_REASON_SENT;
894+
}
890895
}
891896
}
892897

src/libevp-agent/sdk.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,11 +271,12 @@ sdk_queue_config(const char *name, const char *topic, const void *blob,
271271
sdk_unlock();
272272
}
273273

274-
void
274+
int
275275
sdk_queue_message(const char *module_instance_name,
276276
const char *subscribe_alias, const void *blob,
277277
size_t bloblen)
278278
{
279+
int ret = -1;
279280
/* this function never consumes 'blob'. */
280281
sdk_lock();
281282
struct EVP_client *h =
@@ -287,8 +288,10 @@ sdk_queue_message(const char *module_instance_name,
287288
struct sdk_event *event = (struct sdk_event *)inbox_msg;
288289
TAILQ_INSERT_TAIL(&h->events, event, q);
289290
sdk_wakeup_handle(h);
291+
ret = 0;
290292
}
291293
sdk_unlock();
294+
return ret;
292295
}
293296

294297
void
@@ -1672,6 +1675,7 @@ EVP_impl_sendMessage(struct EVP_client *h, const void *rawbuf,
16721675
.bloblen = bloblen,
16731676
.cb = cb,
16741677
.cb_userdata = userData,
1678+
.reason = EVP_MESSAGE_SENT_CALLBACK_REASON_ERROR,
16751679
};
16761680

16771681
sdk_lock();

src/libevp-agent/sdk_agent.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@
1616
void sdk_init(void);
1717
void sdk_queue_config(const char *name, const char *topic, const void *blob,
1818
size_t bloblen);
19-
void sdk_queue_message(const char *module_instance_name,
20-
const char *subscribe_alias, const void *blob,
21-
size_t bloblen);
19+
int sdk_queue_message(const char *module_instance_name,
20+
const char *subscribe_alias, const void *blob,
21+
size_t bloblen);
2222
void sdk_queue_rpc_request(const char *name, EVP_RPC_ID id, const char *method,
2323
const char *params);
2424
bool sdk_forward_local_to_publish_topic(struct sdk_event_message_sent *msg,

src/wasm-micro-runtime

Submodule wasm-micro-runtime updated 175 files

test/src/systest/test_wasm_mod_pause_deployment.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,8 @@ pause_deployment_not_in_progress(void **state)
264264
struct evp_agent_context *ctxt = *state;
265265

266266
// Request pause when no module is being downloaded
267-
assert_int_equal(evp_agent_request_pause_deployment(ctxt), 0);
267+
while (evp_agent_request_pause_deployment(ctxt))
268+
;
268269

269270
// Send a new deployment with a module to download
270271
send_deployment(ctxt, DEPLOYMENT_ID1, INSTANCE_ID1, MODULE_1,

0 commit comments

Comments
 (0)