Skip to content

feat: run the publisher chart on a schedule - #50

Merged
scarmuega merged 5 commits into
mainfrom
work/work-63a1f398cbd689d98b08d4f152862a43b037f199
Nov 21, 2026
Merged

scarmuega merged 5 commits into
mainfrom
work/work-63a1f398cbd689d98b08d4f152862a43b037f199

Conversation

@scarmuega

Copy link
Copy Markdown
Member

Lets an operator run the publisher chart on a schedule instead of as a one-shot Job.

What changes

  • schedule value. Set, the chart renders a CronJob <network>-publisher in place of the Job. Each run is stelae-publisher run on the kept claim, with concurrencyPolicy: Forbid, so a run never starts beside one still in flight. suspend, startingDeadlineSeconds (3600), successfulJobsHistoryLimit / failedJobsHistoryLimit (3 each) and an optional activeDeadlineSeconds are values; backoffLimit is shared with the Job.
  • Shared pod template. The Job's pod moves into a dolos-publisher.podTemplate helper used by both. Without a schedule the rendered manifests are unchanged apart from the chart version label.
  • Validation. run is required only without a schedule. A schedule without persistence.enabled fails the render, since every run on an emptyDir would restore all of history.
  • Notes and docs. NOTES.txt names the CronJob and how to follow its latest run. The chart README gets a "Scheduled runs" section (runs with nothing to publish, Forbid as the single-writer guarantee and manual Jobs, backoffLimit and failure, moving from the one-shot Job, how changes take effect). docs/publisher-packaging.md mentions the scheduled form.
  • Chart bumped to 0.5.0.

Checks

  • k8s/dolos-publisher/test.sh extended for: no schedule (Job, no CronJob), schedule (CronJob named <network>-publisher, Forbid, claim at /data, same container args as the Job, no Job), schedule without run, no schedule without run (fails), schedule with persistence off (fails), suspend: true.
  • helm lint with tests/values.yaml, with and without a schedule.
  • helm template with tests/values.yaml before and after: only the helm.sh/chart label differs.

🤖 Generated with Claude Code

scarmuega and others added 2 commits November 21, 2026 13:45
Setting `schedule` renders a CronJob, `<network>-publisher`, in place of
the one-shot Job. Each run is `stelae-publisher run` on the kept claim,
with `concurrencyPolicy: Forbid` so a run never starts beside one still in
flight. The pod template moves into a shared helper, so the Job renders as
before. `run` is required only without a schedule, and a schedule without
a persistent claim fails the render.

Bumps the chart to 0.5.0.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Nov 21, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 24 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: b397bff9-88ae-4844-9435-de5f3184ec0f
Commits

Reviewing files that changed from the base of the PR and between 176586a and 79a0729.

Files selected for processing: 11

  • docs/publisher-packaging.md
  • k8s/dolos-publisher/README.md
  • k8s/dolos-publisher/chart/Chart.yaml
  • k8s/dolos-publisher/chart/templates/NOTES.txt
  • k8s/dolos-publisher/chart/templates/_helpers.tpl
  • k8s/dolos-publisher/chart/templates/cronjob.yaml
  • k8s/dolos-publisher/chart/templates/job.yaml
  • k8s/dolos-publisher/chart/values.schema.json
  • k8s/dolos-publisher/chart/values.yaml
  • k8s/dolos-publisher/test.sh
  • stelae-publisher/src/main.rs
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@scarmuega

scarmuega commented Nov 21, 2026 •

Copy link
Copy Markdown
Member Author

QA review record

  • Outcome: passed (later pass, fourth), head 79a07292e447a281deaedb28e3abb741e29baa0c. Earlier passes: changes at b0a8a5fc17f1d7359d53cedc8358ff573ab471a3 and 0d7d872a0620eb72cd8298c8d67fc574c17ee881, passed at 378cea8d7aa7856e2560749b6cb341e352a2d7f3, then returned because Test (ubuntu-latest) failed there.
  • Diff in scope: the rework commit 79a0729, test only: the credential env test reads the shared pod template and checks that both the Job and the CronJob include it. Size: small.
  • Checks: the fixed test passes locally. No other test reads chart paths. CI at head: Publisher chart, fmt, clippy, cargo deny, stelae-blocks, image builds and registry round trips are green. Test (ubuntu, macos-15) is still running and was not waited on; the handoff waits for green at this head. The earlier failure was this one test. cargo test stopped at that binary, so the full workspace suite reruns in CI at this head.
  • Lenses: one combined reviewer (correctness, state and resources, test adequacy). No refuter ran, since nothing was proposed above low. Conformance and fresh eyes were skipped (later pass, small rework). Security and the Stelae context lenses were not triggered. No earlier finding was open, so no checker ran.
  • New: no blocking findings. Three low test-coverage items went to the QA backlog.

QA counts: pass=later size=small lenses=1 confirmed=0 blocking=0 fixed-by-qa=0 backlog=3 plausible=0 refuted=0 unrefuted=3
QA lenses: combined=0/0/0

scarmuega and others added 3 commits November 21, 2026 14:01
Render startingDeadlineSeconds and the history limits only when set, so a
null value no longer renders 0. Document moving a scheduled release back to
the one-shot Job, and the Kubernetes version Forbid needs for one writer.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Set podReplacementPolicy: Failed on the CronJob's job template, so a
replacement pod waits for the one it replaces to terminate. State
Kubernetes 1.31 as a requirement of the schedule instead of advice for
older clusters, which could not prevent a second writer.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The Job and CronJob now render one pod template, so the credential-name check reads it there and confirms both workloads include it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@scarmuega

scarmuega commented Nov 21, 2026 •

Copy link
Copy Markdown
Member Author

Merge observed.

Plan: plans/stelae-scheduled-publishing-publisher-schedule.md
QA-approved head: 79a07292e447a281deaedb28e3abb741e29baa0c

Trellis will verify the human merge evidence, adopt the domain pin, and retire the plan. No further merge action is needed.

@scarmuega
scarmuega marked this pull request as ready for review November 21, 2026 17:39
@scarmuega
scarmuega merged commit cee9057 into main Nov 21, 2026
15 checks passed
@scarmuega
scarmuega deleted the work/work-63a1f398cbd689d98b08d4f152862a43b037f199 branch November 21, 2026 20:05
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.

1 participant