Skip to content

fix: overwrite the scheduled job in the jobs example so a rerun does not fail - #1853

Merged
siri-varma merged 1 commit into
dapr:masterfrom
javier-aliaga:fix/jobs-example-overwrite
Oct 19, 2026
Merged

siri-varma merged 1 commit into
dapr:masterfrom
javier-aliaga:fix/jobs-example-overwrite

Conversation

@javier-aliaga

Copy link
Copy Markdown
Contributor

Description

The jobs example schedules dapr-job-1 and never deletes it. The scheduler keeps the job between runs, so when "Validate examples" retries after any failure, the jobs step fails with ALREADY_EXISTS: job already exists: 'app||default||myapp||dapr-job-1'. This happened on the java 25 job of #1852: the first attempt failed in the exception example and the retry failed in the jobs example.

The example now sets overwrite on the ScheduleJobRequest, so scheduling the same job again replaces it.

Issue reference

None. Found in the CI run of #1852.

Checklist

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

…not fail

Signed-off-by: Javier Aliaga <javier@diagrid.io>
@javier-aliaga
javier-aliaga requested review from a team as code owners October 19, 2026 08:23
Copilot AI lite review requested due to automatic review settings October 19, 2026 08:23

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@codecov

codecov Bot commented Oct 19, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 79.73%. Comparing base (410b0bb) to head (076ef71).

Additional details and impacted files
@@            Coverage Diff            @@
##             master    #1853   +/-   ##
=========================================
  Coverage     79.73%   79.73%           
  Complexity     2693     2693           
=========================================
  Files           268      268           
  Lines          7948     7948           
  Branches        844      844           
=========================================
  Hits           6337     6337           
  Misses         1255     1255           
  Partials        356      356           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@siri-varma
siri-varma merged commit ae32b03 into dapr:master Oct 19, 2026
17 checks passed
javier-aliaga added a commit that referenced this pull request Oct 20, 2026
…not fail (#1853) (#1854)

(cherry picked from commit ae32b03)

Signed-off-by: Javier Aliaga <javier@diagrid.io>
Co-authored-by: Javier Aliaga <javier@diagrid.io>
@nelson-parente nelson-parente added this to the v1.19 milestone Oct 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants