Skip to content

CFE-4681: document timer_policy attribute on classes: promises (3.27)#3729

Merged
nickanderson merged 4 commits into
cfengine:3.27from
nickanderson:CFE-4681/3.27
Jul 10, 2026
Merged

CFE-4681: document timer_policy attribute on classes: promises (3.27)#3729
nickanderson merged 4 commits into
cfengine:3.27from
nickanderson:CFE-4681/3.27

Conversation

@nickanderson

@nickanderson nickanderson commented Jul 8, 2026

Copy link
Copy Markdown
Member

Summary

Backports the timer_policy attribute documentation on classes: promises to the 3.27 stream (CFE-4681).

Mirrors the master PR (#3682), with the Default value and History adjusted for this stream: on 3.27 timer_policy defaults to absolute (the historical persistent-class behavior). The default changed to reset in 3.28.0.

Contents

  • timer_policy docs — adds ### timer_policy to content/reference/promise-types/classes.markdown, right after ### persistence. Cross-references use the auto-generated heading anchors ([classes#persistence], [Promise types#timer_policy], [Promise types#persist_time]); no _references.md change needed.

Formatting

Rebased onto the current 3.27 tip, which now carries the cherry-picked cf3 reformats from #3732 (merged). The branch-wide reformat commit previously included here has been dropped per @olehermanse's review, so this PR is now just the timer_policy addition (46 lines, one file).

Also cherry-picks (-x) master's ec725753e ("Fix: Added missing semicolon and newline for cfengine-cli lint/format-docs" by @SimonThalvorsen) — a pre-existing 3.27 lint failure that the unpinned cfengine CLI (0.18.1) now flags on any 3.27 PR. It was already fixed on master but never backported. Fixes a missing ; in content/examples/example-snippets/software_and_patch_installation_1_2_3.cf (the regline.markdown hunk was already satisfied on 3.27).

Verified locally against the rebased branch with cfengine CLI 0.18.1: cfengine format --check, cfengine dev format-docs (idempotent, clean git diff --exit-code), and cfengine lint on the fixed example all pass.

Related

@olehermanse olehermanse left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think we need to / should cherry-pick the reformats instead of just running it on 3.27. Hold my beer.

@nickanderson

Copy link
Copy Markdown
Member Author

🍻 🍻 🍻🍻🍻🍻🍻🍻🍻🍻🍻🍻🍻🍻🍻🍻🍻

@olehermanse

Copy link
Copy Markdown
Member

@nickanderson #3732

Documents the timer_policy attribute on classes: promises (CFE-4681), which controls whether a persistent class restarts its timer when rediscovered. On the 3.27 stream the default is absolute, preserving the historical behavior; the default changed to reset in 3.28.0.

Ticket: CFE-4681
cfengine CLI 0.18.0 ships a syntax-description.json that includes timer_policy on classes: promises, so the example no longer needs the {skip TODO} fence to pass cfengine dev lint-docs. Dropping it means the example is syntax-checked like the others.
…-docs

Signed-off-by: Simon Halvorsen <simon.halvorsen@northern.tech>
(cherry picked from commit ec72575)
@nickanderson

nickanderson commented Jul 10, 2026

Copy link
Copy Markdown
Member Author

Rebased and dropped the branch-wide reformat commit per @olehermanse's review — the reformats now come from the cherry-picks in #3732 (merged), and this branch is rebased on top of the current 3.27 tip. The PR is now just the timer_policy addition (46 lines, one file).

One extra thing: after rebasing, the Lint and format check went red on a pre-existing 3.27 issue unrelated to this change — the unpinned cfengine CLI (now 0.18.1) flags a missing ; in content/examples/example-snippets/software_and_patch_installation_1_2_3.cf on any 3.27 PR. That was already fixed on master by @SimonThalvorsen (ec725753e) but never backported, so I cherry-picked it (-x) here to get CI green.

The Lint and format workflow installs the cfengine CLI unpinned, and
0.18.1 parse-checks cf3 code blocks more strictly than earlier versions.
This surfaced pre-existing syntax omissions in seven example blocks that
older CLIs tolerated, failing `cfengine dev lint-docs` on any 3.27 PR.
Add the missing trailing semicolon or bundle-closing brace so the
examples parse:

- reference/components/cf-execd.markdown: schedule attribute
- reference/components/cf-agent.markdown: copyfrom_restrict_keys slist
- reference/promise-types/files/_index.markdown: file_result attribute
- examples/tutorials/manage-ntp.markdown: ntp bundle
- resources/additional-topics/distributed-scheduling.markdown: two workflow_one bundles
- resources/additional-topics/security.markdown: change_management bundle

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@nickanderson nickanderson merged commit 9090ece into cfengine:3.27 Jul 10, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants