Skip to content

Commit a3761df

Browse files
committed
Change the id used as maestro id in kci source
Signed-off-by: Camila Alvarez <cam.alvarez.i@gmail.com>
1 parent 33d4594 commit a3761df

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

riscvlab/events/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ def process_single_event(self, event):
3030
return
3131
selftests = event["node"]["artifacts"]["kselftest_tar_gz"]
3232
modules = event["node"]["artifacts"].get("modules", "")
33-
build_id = event["id"]
33+
build_id = event["node"]["id"]
3434

3535
logger.info({
3636
"build_id": build_id,

riscvlab/kci/kci_source.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import logging
22
import requests
33
import argparse
4+
import json
45
from libs.requests import create_session
56
from events.source.events_source import EventsSource
67
from kci import BASE_URI
@@ -22,7 +23,7 @@ def poll_events(self, timestamp: str, kind: str, arch: str):
2223
# We skip builds with result != pass
2324
filtered_events = [event for event in json_response if event["data"]["result"] == "pass" and event["data"]["data"]["arch"] == arch]
2425
for event in filtered_events:
25-
event["id"] = f"maestro:{event['id']}"
26+
event["node"]["id"] = f"maestro:{event['node']['id']}"
2627
return filtered_events, last_timestamp
2728
except requests.exceptions.RequestException as e:
2829
logger.warning(f"Could not obtain builds from KernelCI: {str(e)}")
@@ -35,5 +36,5 @@ def poll_events(self, timestamp: str, kind: str, arch: str):
3536
source = KernelCISource()
3637
events, timestamp = source.poll_events(args.timestamp, "kbuild", args.arch)
3738
print(f"Last timestamp: {timestamp}")
38-
print(events)
39+
print(json.dumps(events))
3940

0 commit comments

Comments
 (0)