You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
feat: start background jobs by name with JSON input - #3746
To run the guardrails locally, from fast_track/ run make install once, then make run-guardrails (or GUARDRAILS=<name1>,<name2> make run-guardrails for some guardrails).
Reviewing files that changed from the base of the PR and between c2a3d71 and a782b1e.
You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.
Use the checkbox below for a quick retry:
Trigger review
No actionable comments were generated in the recent review.
Walkthrough
Job submission now uses a registered job name and input instead of a function argument. The in-process runner resolves the job, validates and queues a copy of its input, then passes that input and a progress callback to the job function.
Changes: Named job submission
Layer / File(s)
Summary
Resolve and queue named jobs lightly_studio/src/lightly_studio/jobs/in_process_job_runner.py, lightly_studio/src/lightly_studio/jobs/job_runner.py
submit now accepts a job name and input. The in-process runner resolves the registered function, validates the input, and passes the input and progress callback to the function.
Runner behavior and validation tests lightly_studio/tests/jobs/helpers.py, lightly_studio/tests/jobs/test_in_process_job_runner.py
Tests use registered jobs and cover input copying, unknown names, non-JSON input, result handling, sequential execution, and database reads and writes.
API and remote test callers lightly_studio/tests/api/routes/api/v1/test_jobs.py, lightly_studio/tests/transport/remote/test_http_job.py
Tests register jobs and submit them by name with input. Existing success, polling, progress, and failure checks remain.
Job submission now takes a registered job name and JSON input. Unknown names and invalid input are rejected before a job is created. No concrete merge-blocking risk was found.
Pre-merge checks: 4
Check name
Status
Explanation
Title check
The title "feat: start background jobs by name with JSON input" matches the main change. JobRunner.submit now takes a job name and JSON-valued input mapping instead of a JobFunction, as the raw summar…
Description check
The description follows the repository template. It has the 'What has changed and why?' section, which lists the signature change, submit-time validation, and input copying. It has the 'How has it bee…
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Full details: Title check
Explanation
The title "feat: start background jobs by name with JSON input" matches the main change. JobRunner.submit now takes a job name and JSON-valued input mapping instead of a JobFunction, as the raw summary and objectives describe. The title is specific and concise, and it names the two core aspects of the change: start by name and JSON input.
Full details: Description check
Explanation
The description follows the repository template. It has the 'What has changed and why?' section, which lists the signature change, submit-time validation, and input copying. It has the 'How has it been tested?' section, which lists updated tests and new tests for unknown job names, non-JSON input, and input mutation after submit. The CHANGELOG checklist is present, and 'Not needed (internal change)' is checked. The template's placeholder instructions were removed. The description gives no test commands or reproduction steps, which the template asks for. This is a minor gap, so the check still passes.
Finishing Touches
Generate unit tests (beta)
Commit to this branch
Create a new PR
Fix failing CI checks
Commit to this branch
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 0 remain after this review.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What has changed and why?
JobRunner.submitnow takes a job name and JSON input, not a Python function.How has it been tested?
Did you update CHANGELOG.md?
Summary by CodeRabbit