Skip to content

feat(orb-jobs-agent): allow local jobs execution#1022

Open
pophilpo wants to merge 11 commits intomainfrom
pophilpo/local-jobs-agent-tests
Open

feat(orb-jobs-agent): allow local jobs execution#1022
pophilpo wants to merge 11 commits intomainfrom
pophilpo/local-jobs-agent-tests

Conversation

@pophilpo
Copy link
Contributor

@pophilpo pophilpo commented Feb 25, 2026

This PR will enable us to test new jobs for orb-jobs-agent easily.

Before this PR, in order to make a true e2e test, we had to make a PR in the backend repo, that will allow us to send the new job from fleet-cmdr.

This introduces some branching in the code, but does not affect the production orb-jobs-agent as a service logic.

With new changes introduced here, we will be able to build the orb-jobs-agent binary, move it to the orb and run a single job.

./orb-jobs-agent --run-job "read_file /usr/persistent/versions.json" # refer to specific handler info on the command format

It will mimic the whole job execution flow, with adding a job to a queue, requesting that job for execution, sending JobExecutionUpdates all that stuff.

Here's an example output for the command above:

2026-02-25T13:24:00.370186Z  INFO orb_jobs_agent: Starting jobs agent: Args { config: None, orb_id: None, orb_platform: None, orb_token: None, relay_host: None, relay_namespace: Some("jobs"), target_service_id: Some("job-server"), dbus_addr: "unix:path=/tmp/worldcoin_bus_socket", run_job: Some("read_file /usr/persistent/versions.json") }
2026-02-25T13:24:00.372800Z  INFO zenoh::net::runtime: Using ZID: fcd0c45a5aeb96f71df9921d28ff777
2026-02-25T13:24:00.374799Z  INFO orb_jobs_agent::job_system::client: Successfully requested additional job for parallel execution
2026-02-25T13:24:00.374822Z  INFO orb_jobs_agent::job_system::handler: Successfully requested initial job
2026-02-25T13:24:00.374832Z  INFO orb_jobs_agent::job_system::client: received local JobExecution job_id=local-job job_execution_id=local-job-execution job_document=read_file /usr/persistent/versions.json should_cancel=false
2026-02-25T13:24:00.374845Z  INFO orb_jobs_agent::job_system::handler: Processing job job_execution_id=local-job-execution job_id=local-job
2026-02-25T13:24:00.374904Z  INFO orb_jobs_agent::job_system::handler: executing job job_execution_id="local-job-execution" command="read_file" args="/usr/persistent/versions.json"
2026-02-25T13:24:00.374970Z  INFO handler: orb_jobs_agent::handlers::read_file: Reading file: /usr/persistent/versions.json for job local-job-execution
{"job_id":"local-job","job_execution_id":"local-job-execution","status":3,"std_out":"{\"releases\":{\"slot_a\":\"to-0.0.0-21e98c2-diamond-dev\",\"slot_b\":\"0.0.0-21e98c2-diamond-dev\"},\"slot_a\":{\"jetson\":{\"boot\":\"idk2\",\"sec_mcu\":\"idk2\",\"main_mcu\":\"idk2\",\"system\":\"idk2\"}},\"slot_b\":{\"jetson\":{\"main_mcu\":\"idk2\",\"boot\":\"idk2\",\"sec_mcu\":\"idk2\",\"system\":\"idk2\"}},\"singles\":{\"jetson\":{\"capsule\":\"idk2\"}}}","std_err":""}
2026-02-25T13:24:00.375142Z  INFO orb_jobs_agent::job_system::handler: Job completed job_execution_id=local-job-execution job_id=local-job status=Succeeded
2026-02-25T13:24:00.375163Z  INFO orb_jobs_agent::job_system::client: Successfully requested additional job for parallel execution
2026-02-25T13:24:00.375173Z  INFO orb_jobs_agent::job_system::handler: Requested additional job after job completion job_execution_id=local-job-execution
2026-02-25T13:24:00.375150Z  INFO orb_jobs_agent::job_system::handler: Relay service shutdown detected
2026-02-25T13:24:00.375263Z  INFO zenoh::api::session: close session zid=fcd0c45a5aeb96f71df9921d28ff777
2026-02-25T13:24:00.376877Z  INFO orb_jobs_agent: Shutting down jobs agent completed

Tested on the orb (both local and remote execution)

  • yes (diamond only)

@pophilpo pophilpo requested a review from vmenge February 25, 2026 13:56
@pophilpo pophilpo requested a review from a team as a code owner February 25, 2026 13:56
@AlexKaravaev
Copy link
Contributor

@codex review

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 3eb7fae74d

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants