Skip to content

v0.15.0

Choose a tag to compare

@github-actions github-actions released this 02 Jun 16:09
· 45 commits to main since this release
v0.15.0
cd4bf69

v0.15.0

Added — DrainAndUpsertJob

A windowless variant of UpsertJob for gracefully rescheduling a named entry.

// Two-step: a cron tick can still fire the OLD schedule between these calls.
cr.WaitForJobByName("my-job")
cr.UpsertJob(newSpec, newJob, cron.WithName("my-job"))

// Windowless: no invocation can start under the stale schedule.
cr.DrainAndUpsertJob(newSpec, newJob, cron.WithName("my-job"))

It pauses the entry, drains any in-flight invocation, swaps the schedule and job, then restores the entry's prior paused state. Pausing before the drain guarantees the old schedule cannot fire again between the wait and the replacement — closing the narrow stale-fire window of the two-step WaitForJobByNameUpsertJob sequence. It composes existing serialized methods, so the drain never holds a scheduler lock (no run-loop stall, no deadlock). If the named entry doesn't exist, it creates one.

Motivated by the weaviate object-TTL scheduler. Design rationale and the windowless proof: ADR-022. See #381.

Full Changelog: v0.14.0...v0.15.0

Supply Chain Security

This release includes:

  • SBOM: CycloneDX (sbom-0.15.0.cyclonedx.json) and SPDX (sbom-0.15.0.spdx.json)
  • Checksums: checksums.txt
  • Signature: keyless Sigstore/Cosign bundle (checksums.txt.sigstore.json)

Verify with Cosign

Signing is performed by the shared netresearch/.github release workflow, so the certificate identity is that workflow (not this repo):

gh release download v0.15.0 -R netresearch/go-cron

cosign verify-blob \
  --bundle checksums.txt.sigstore.json \
  --certificate-identity-regexp "^https://github\.com/netresearch/\.github/\.github/workflows/golib-create-release\.yml@" \
  --certificate-oidc-issuer "https://token.actions.githubusercontent.com" \
  checksums.txt

sha256sum -c checksums.txt