Skip to content

Add UpdateTriggerDetails to update trigger metadata without rescheduling#2988

Merged
lahma merged 7 commits into
3.xfrom
update-without-reschedule
Apr 4, 2026
Merged

Add UpdateTriggerDetails to update trigger metadata without rescheduling#2988
lahma merged 7 commits into
3.xfrom
update-without-reschedule

Conversation

@lahma

@lahma lahma commented Apr 3, 2026

Copy link
Copy Markdown
Member

Summary

  • Adds UpdateTriggerDetails method that updates trigger metadata (Description, Priority, JobDataMap, CalendarName, MisfireInstruction) without resetting fire times, trigger state, or misfire handling context
  • Uses the INextVersionJobStore internal interface pattern to maintain API compatibility on the 3.x branch (mirrors the existing INextVersionDelegate pattern)
  • Exposes the feature via IScheduler.UpdateTriggerDetails() extension method and directly on StdScheduler/QuartzScheduler
  • Removes unused Dockerfile (Docker integration tests were replaced with Testcontainers in an earlier PR)

Closes #844

Test plan

  • 15 unit tests covering all updatable properties, fire time preservation, state preservation (paused triggers), priority reordering, calendar validation, scheduler extension method, and non-StdScheduler rejection
  • Full unit test suite passes (1227 passed, 0 failed)
  • Clean build on all target frameworks (net462, net472, net8.0, net9.0, net10.0, netstandard2.0)

🤖 Generated with Claude Code

@lahma lahma added the port-main Requires porting to main branch label Apr 3, 2026
Comment thread src/Quartz/Simpl/BinaryObjectSerializer.cs Fixed
Comment thread Dockerfile Fixed
@lahma lahma mentioned this pull request Apr 3, 2026
16 tasks
lahma and others added 2 commits April 3, 2026 23:37
…ing (#844)

Allow updating trigger properties like Description, Priority, JobDataMap,
CalendarName, and MisfireInstruction without resetting fire times or trigger
state. Uses the INextVersionJobStore internal interface pattern to maintain
API compatibility on the 3.x branch.

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
@lahma
lahma force-pushed the update-without-reschedule branch from e8967e7 to d759d05 Compare April 3, 2026 20:38
Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
@lahma
lahma changed the base branch from main to 3.x April 4, 2026 08:19
@lahma
lahma requested a review from Copilot April 4, 2026 08:51

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.

Pull request overview

Adds a new API surface to update selected trigger metadata in-place (without rescheduling) by introducing a TriggerDetailsUpdate “patch” object, plumbing support through QuartzScheduler/StdScheduler, and implementing the feature in both RAM and ADO job stores.

Changes:

  • Introduces TriggerDetailsUpdate and IScheduler.UpdateTriggerDetails() extension method for updating trigger metadata without resetting fire times/state.
  • Adds INextVersionJobStore (internal, 3.x-compatible capability interface) and implements UpdateTriggerDetails in RAMJobStore and JobStoreSupport (ADO).
  • Adds new unit tests covering update behavior and state/fire-time preservation.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
src/Quartz/TriggerDetailsUpdate.cs New “patch” type describing which trigger fields to update.
src/Quartz/SPI/IJobStore.cs Adds internal INextVersionJobStore capability interface for 3.x.
src/Quartz/Simpl/RAMJobStore.cs Implements in-memory trigger detail updates (incl. priority reordering).
src/Quartz/SchedulerExtensions.cs Adds IScheduler.UpdateTriggerDetails() extension entry point.
src/Quartz/Impl/StdScheduler.cs Proxies UpdateTriggerDetails to underlying QuartzScheduler.
src/Quartz/Impl/AdoJobStore/JobStoreSupport.cs Adds ADO-backed implementation using delegate trigger update.
src/Quartz/Core/QuartzScheduler.cs Exposes UpdateTriggerDetails and dispatches via INextVersionJobStore.
src/Quartz.Tests.Unit/UpdateTriggerDetailsTest.cs New unit tests validating update semantics.

Comment thread src/Quartz/Impl/AdoJobStore/JobStoreSupport.cs Outdated
Comment thread src/Quartz/Simpl/RAMJobStore.cs Outdated
Comment thread src/Quartz/TriggerDetailsUpdate.cs
Comment thread src/Quartz/SPI/IJobStore.cs Outdated
Comment thread src/Quartz/SchedulerExtensions.cs
Comment thread src/Quartz.Tests.Unit/UpdateTriggerDetailsTest.cs Outdated
lahma and others added 2 commits April 4, 2026 12:34
- Fix empty JobDataMap not marking dirty flag (use ForceJobDataMapDirty)
- Clone JobDataMap in RAMJobStore to prevent external mutation
- Clarify docs that CalendarName/MisfireInstruction affect firing behavior
- Add null check for scheduler in extension method
- Use unique instanceName and serializer type in scheduler test

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>

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.

Pull request overview

Copilot reviewed 9 out of 9 changed files in this pull request and generated 4 comments.

Comment thread src/Quartz/Simpl/RAMJobStore.cs
Comment thread src/Quartz/Impl/AdoJobStore/JobStoreSupport.cs
Comment thread src/Quartz/Core/QuartzScheduler.cs
Comment thread src/Quartz/TriggerDetailsUpdate.cs

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.

Pull request overview

Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.

Comment thread src/Quartz.Tests.Unit/UpdateTriggerDetailsTest.cs Outdated

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.

Pull request overview

Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.

Comment thread src/Quartz/SchedulerExtensions.cs Outdated
Comment thread src/Quartz/Core/QuartzScheduler.cs Outdated
…rDetailsUpdate

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
@sonarqubecloud

sonarqubecloud Bot commented Apr 4, 2026

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
B Reliability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

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.

Pull request overview

Copilot reviewed 9 out of 9 changed files in this pull request and generated no new comments.

@lahma
lahma merged commit cffde58 into 3.x Apr 4, 2026
18 of 19 checks passed
@lahma
lahma deleted the update-without-reschedule branch April 4, 2026 10:13
@lahma lahma removed the port-main Requires porting to main branch label Apr 4, 2026
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.

Allow updates to ITrigger details without rescheduling

3 participants