Skip to content

IH-186: puppet_apply comments: puppet-agent arrives with puppet-code, not the toolkit - #306

Merged
infrahouse8 merged 1 commit into
mainfrom
aleks/ih-186-puppet-agent-comments
Nov 27, 2026
Merged

infrahouse8 merged 1 commit into
mainfrom
aleks/ih-186-puppet-agent-comments

Conversation

@akuzminsky

@akuzminsky akuzminsky commented Nov 27, 2026 •

Copy link
Copy Markdown
Member

IH-186: puppet_apply.pp says puppet-agent arrives with puppet-code, not with infrahouse-toolkit.

The other PR: infrahouse/infrahouse-toolkit#274 (removes the toolkit's Omnibus build and the
RELEASE_PACKAGE rollback switch).

Why

IH-186 kept the toolkit's Omnibus build as a rollback until two or three standalone releases shipped without needing
it. Four have (2.68.0, 2.68.1, 2.68.2, 2.68.3), so the toolkit PR removes it. The Omnibus package declared
runtime_dependency 'puppet-agent'; the standalone package doesn't. Its packaging/nfpm.yaml says:

# puppet-agent is not a dependency: puppet-code depends on it, and ih-puppet is only useful
# where puppet-code is installed.

puppet_apply.pp still said puppet-agent "arrives as an infrahouse-toolkit dependency", twice. Comments only.

What makes puppet-agent a dependency of puppet-code

debian/control, line 13:

Package: puppet-code
Architecture: all
Depends: puppet-agent

The published package says the same: https://release-noble.infrahouse.com/dists/noble/main/binary-amd64/Packages
lists puppet-code 0.1.0-1build335 with Depends: puppet-agent.

The change

The two paragraphs that named the toolkit name puppet-code, with the same reasoning:

  • The mask: puppet-agent is there because ih-puppet applies this code with puppet apply, and its package enables
    an agent daemon that has no job on a masterless node. That paragraph and the "masked rather than disabled" one are
    otherwise unchanged.
  • Why Package['puppet-agent'] isn't declared: it arrives as a puppet-code dependency, so it is installed with
    this code, before any catalog can be applied. Nothing to order against, and a base-level Package risks
    duplicate declarations.
-  # puppet-agent arrives as an infrahouse-toolkit dependency, because ih-puppet
-  # shells out to `puppet apply`. That package also enables the AGENT DAEMON,
+  # puppet-agent arrives as a puppet-code dependency, because ih-puppet applies
+  # this code with `puppet apply`. That package also enables the AGENT DAEMON,
   # which has no job on a masterless node: it wakes on its own runinterval, fails
   # to resolve the packaged default server `puppet`, logs "No more routes to ca"
   # and sleeps again -- on every host in the fleet, forever. Nothing in this
-  # repository refers to it; the cron above is what actually applies the catalog.
+  # repository refers to it; the cron below is what actually applies the catalog.
 ...
   # Package['puppet-agent'] is deliberately NOT declared alongside this. It
-  # arrives as an infrahouse-toolkit dependency and is necessarily installed
-  # before any catalog can be applied, so there is nothing to order against --
+  # arrives as a puppet-code dependency, so it is installed with this very code,
+  # before any catalog can be applied: there is nothing to order against --
   # and adding a base-level Package for something a role might also declare
   # natively is how duplicate-declaration failures happen.

Every copy, identically: modules/profile/manifests/puppet_apply.pp,
environments/development/modules/profile/manifests/puppet_apply.pp and
environments/sandbox/modules/profile/manifests/puppet_apply.pp. They are regular files, not symlinks, and were
identical before (same md5); I edited modules/ and copied it over the other two, so they are identical after:

MD5 (modules/profile/manifests/puppet_apply.pp) = d42f65463daa19fbf8fed8690745b895
MD5 (environments/development/modules/profile/manifests/puppet_apply.pp) = d42f65463daa19fbf8fed8690745b895
MD5 (environments/sandbox/modules/profile/manifests/puppet_apply.pp) = d42f65463daa19fbf8fed8690745b895

No resource, attribute, ordering or whitespace change: every changed line of the diff starts with #
(git diff -U0 | grep -E '^[-+]' | grep -vE '^(\+\+\+|---)' | grep -vE '^[-+]\s*#' prints nothing for the manifests).
The fourth changed file is debian/changelog (decided 2).

Checks

Check Result
puppet parser validate (Puppet 8.10.0), each changed file exit 0, no output, for all three
the same on a copy with a deliberate syntax error exit 1, Syntax error at 'ensure': the validator does catch errors
puppet-lint --fail-on-warnings (4.2.3) on modules/profile, modules/role, environments/development/modules/profile, environments/sandbox/modules/profile exit 0 each, as the pre-commit hook runs them
CI (Puppet Code Continuous Integration: builds the package) green on 503c0a9: test (noble) and osv-scan

decided

  1. decided: "the cron above" became "the cron below". The cron { 'puppet_apply': } it refers to is below the
    comment, at the end of the class. It's in the first of the two paragraphs this PR rewords anyway.
  2. decided: debian/changelog gets its 0.1.0-1build336 entry. The repository's pre-commit hook adds one to
    every commit (make bumpversion), and CD publishes every main push, which needs a new version. It's the repo's
    own convention, not a release decision.

After merge

CD publishes puppet-code 0.1.0-1build336. The catalog it applies is unchanged.

🤖 Generated with Claude Code

Since the standalone infrahouse-toolkit package (IH-185), puppet-agent is
no toolkit dependency: puppet-code's debian/control has
"Depends: puppet-agent". The two comment paragraphs that named the toolkit
name puppet-code now, with the same reasoning, and "the cron above" is
"the cron below", where the cron is. Comments only, in all three copies.

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

Copy link
Copy Markdown
Member Author

Ready for review: 503c0a9

Round 1, the first review: no findings to answer yet.

  • One commit: the two comment paragraphs in puppet_apply.pp name puppet-code instead of infrahouse-toolkit, in
    modules/ and both environments/* copies (regular files, identical md5 after). Plus the hook's
    debian/changelog entry (decided 2).
  • debian/control line 13, Depends: puppet-agent, is what makes it true; the published 0.1.0-1build335 says the
    same.
  • puppet parser validate (8.10.0) exit 0 on all three files, puppet-lint clean, CI green on this sha.

@akuzminsky

Copy link
Copy Markdown
Member Author

Approved 503c0a9

Diffed every changed file against main: in the three puppet_apply.pp copies (regular files, identical md5 d42f6546… after) only # lines change, with the same line count, and debian/changelog is the pre-commit hook's 0.1.0-1build336 entry, as on #302 to #305. The new wording is true: debian/control:13 is Depends: puppet-agent, the cron it refers to is below the comment, and the mask paragraph and the reasons for not declaring Package['puppet-agent'] are kept. In ubuntu:noble (Puppet 8.4.0, puppet-lint 4.2.4), puppet parser validate exits 0 on all three files and 1 on a deliberately broken copy, puppet-lint --fail-on-warnings is clean on the hook's four module paths, and CI (test (noble), osv-scan) is green on this sha.

@infrahouse8
infrahouse8 merged commit 68026af into main Nov 27, 2026
2 checks passed
@infrahouse8
infrahouse8 deleted the aleks/ih-186-puppet-agent-comments branch November 27, 2026 19:23
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.

2 participants