github quartznet/quartznet v4.9.2

one hour ago

4.9.2 fixes five problems found in 4.9: jobs failing to build under PropertyMismatchBehavior.Throw, the dashboard resetting a Blazor host's circuit settings, store-attached dashboards that could not use the application's data source, a DeleteJob that failed when a trigger of the job finished at the same moment, and an HTTP API whose OpenAPI document failed under native AOT or trimming. It also makes the cluster-observer switch public for admin processes. There is no schema change, and the only API change is an addition.

Fixed

  • A job built with PropertyMismatchBehavior.Throw no longer fails on Quartz's own data keys (#4532, from #4515). PropertySettingJobFactory tried to set a job property for every QRTZ_ key Quartz writes into a firing's data, and with Throw each one failed the firing. Those are a manual run's mark, a job input, a backfill's slot, a recovered firing's original trigger, and the trace context that PropagateTraceContext, on by default, leaves on a trigger scheduled inside an activity. So every Run now, TriggerJob, backfill, recovered RequestRecovery job and job given an input (UsingInput, TriggerJobAndWait<TInput>) failed to build, and so did every firing of a trigger scheduled inside a trace. Keys starting QRTZ_ are now passed over.
  • Adding the dashboard keeps a Blazor Server host's circuit settings (#4525, fixes #4521). AddQuartzDashboard() re-ran Blazor's server registration, which put the host's tuned options for its circuit hub, such as ClientTimeoutInterval and MaximumReceiveMessageSize, back to their defaults. Its own AddSignalR() also set WebSocketOptions.KeepAliveInterval back to zero. The dashboard now registers Blazor only when the host has not, whichever comes first, and leaves the keep-alive alone. A host with SignalR but no Blazor Server should configure the keep-alive after AddQuartzDashboard().
  • A store-attached dashboard can use the data source the application registered (#4523, fixes #4518). AttachStore's discovery probe and its windows built their own containers, so a recipe written as the nodes write it threw on every discovery round, and no window opened. The recipes affected used DataSourceServiceKey, DataSourceFactory, UseRegisteredDataSource or ConnectionStringName. Those now resolve against the application's own container, and so does a factory that reads the application's options. Runtime tenants added with ISchedulerRuntime.Add get the same. A data source taken from the application is never disposed by the dashboard.
  • DeleteJob no longer fails when a trigger of the job finishes while it deletes (#4531, reported by @GaryBesta as #322 in 2016). DeleteJob lists a job's triggers, then unschedules each, and threw SchedulerException "Unable to unschedule trigger … while deleting job …" when one had gone in between: most often right after TriggerJob, whose one run finished first. The trigger is gone, which is what the delete wants, so the delete now goes on.
  • The HTTP API's OpenAPI document generates under native AOT and trimming (#4535, fixes #4528, reported by @wlingxiao). With reflection-based JSON off, generating the document threw NotSupportedException for Quartz.AspNetCore.HttpApi.OpenApi.Calendar, the first of the internal OpenAPI types Quartz's endpoints describe themselves with that had no generated metadata; the trigger listing's state filter had none either. The types are internal, so an application could not add the metadata itself. Quartz now adds that metadata to the application's JSON options, behind reflection, so an application with reflection on answers as before.

Added

  • AdoJobStoreOptions.ClusterObserver is public, with store.UseClusterObserver() and the flat key quartz.jobStore.clusterObserver (#4524, fixes #4519). An admin process that shares the cluster's store and scheduler name can say it only observes: its Start() is refused before recovery or check-in, and it never appears in the node listing. ZeroSizeThreadPool alone does not stop a start from running recovery. See Admin process in the external-leader how-to.

Compatibility

  • No schema change and no migration. 4.9.0, 4.9.1 and 4.9.2 nodes run side by side in one cluster.
  • API additions only: AdoJobStoreOptions.ClusterObserver and ClusterObserverExtensions.UseClusterObserver.
  • Behaviour a 4.9.1 application may notice:
    • DeleteJob returns where it threw, and returns false for a non-durable job its store already removed with that trigger.
    • PropertyMismatchBehavior.Warn no longer logs for QRTZ_ keys.
    • A Blazor Server host's circuit, hub and WebSocket keep-alive settings stand beside the dashboard.
  • The QRTZ_ fix works per node. Under Throw, a manual run or a traced trigger that fires on a 4.9.0 or 4.9.1 node still fails until every node runs 4.9.2.
  • An admin process rolled back to 4.9.1 is no observer. 4.9.1 refuses the flat key quartz.jobStore.clusterObserver, and ignores Quartz:JobStore:ClusterObserver, so that process would start and run recovery.
  • The 4.9.2 rows of the migration guide's Upgrading from 4.8 to 4.9 list each change.

The dashboard fix (#4526) is on the 3.x branch, and the DeleteJob fix goes there too, for the next 3.22.x.

What's Changed

Other changes

  • 4.9.2 brings the data-source, cluster-observer, Blazor-host, QRTZ_ key, DeleteJob and OpenAPI-under-AOT fixes to the 4.9.x line by @lahma in #4532

Full Changelog: v4.9.1...v4.9.2

Don't miss a new quartznet release

NewReleases is sending notifications on new releases.