Thanks to visit codestin.com
Credit goes to github.com

Skip to content

(feat): Jobs harness - #20

Open
WhitWaldo wants to merge 1 commit into
mainfrom
jobs-harness
Open

(feat): Jobs harness#20
WhitWaldo wants to merge 1 commit into
mainfrom
jobs-harness

Conversation

@WhitWaldo

Copy link
Copy Markdown
Contributor

Description

Adding jobs harness

Issue reference

We strive to have all PR being opened based on an issue, where the problem or feature have been discussed prior to implementation.

Please reference the issue this PR will close: #[issue number]

Checklist

Please make sure you've completed the relevant tasks for this PR, out of the following list:

  • Code compiles correctly
  • Created/updated tests
  • Extended the documentation

Signed-off-by: Whit Waldo <[email protected]>
@WhitWaldo
WhitWaldo requested a lite review from Copilot September 13, 2026 23:56
@WhitWaldo WhitWaldo self-assigned this Sep 13, 2026
@WhitWaldo WhitWaldo added the enhancement New feature or request label Sep 13, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Changes recommended

Two moderate API request issues remain in src/JobsHarness.ts.

Get a fresh assessment by requesting another Copilot review.

Pull request overview

Adds a public JobsHarness for managing Dapr Jobs through HTTP.

Changes:

  • Adds job scheduling, retrieval, deletion, and error handling.
  • Adds lifecycle and integration tests.
  • Exports JobsHarness publicly.
File summaries
File Summary
src/JobsHarness.ts Implements the Jobs harness; two moderate API-encoding issues remain: failurePolicy uses the wrong JSON key, and overwrite must be sent as a query parameter.
src/JobsHarness.test.ts Adds configuration, lifecycle, CRUD, and delivery tests.
src/index.ts Exports the new public API.
Review details

Suppressed comments (1)

src/JobsHarness.ts:187

  • overwrite is a query parameter of the Jobs API, not a property of the JSON job definition. With this body-only encoding, the second schedule in the overwrite test is still treated as a conflicting create (or the field is ignored), so overwrite: true does not take effect; append ?overwrite=true to the POST URL and omit this body field.
    if (options.overwrite !== undefined) {
      body.overwrite = options.overwrite;
    }
  • Files reviewed: 3/3 changed files
  • Comments generated: 1
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/JobsHarness.ts
body.overwrite = options.overwrite;
}
if (options.failurePolicy !== undefined) {
body.failure_policy = options.failurePolicy;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants