Skip to content

Replace legacy facts with structured facts - #381

Merged
silug merged 1 commit into
masterfrom
fix-legacy-facts
Aug 10, 2026
Merged

Replace legacy facts with structured facts#381
silug merged 1 commit into
masterfrom
fix-legacy-facts

Conversation

@silug

@silug silug commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Fixes #329 (no other open PR addresses it — verified).

  • simp::puppetdb: the percentage-based Java heap computation moves from an inline ERB template using the legacy memorysize_mb fact to native Puppet using $facts['memory']['system']['total_bytes']. Behavior is identical (MiB × percent, rounded, m suffix; non-percentage values pass through verbatim) — locked in with new unit assertions for both forms, which pass across the OS matrix (379 examples, 0 failures on the puppetdb spec).
  • Acceptance suites: fact_on calls move to structured facts — networking.fqdn, networking.domain, networking.interfaces.eth1.ip/.mac — replacing the flat fqdn/domain/ipaddress_eth1/macaddress_eth1 facts.

Two items from the issue's listing needed no change: the bootstrap_simp_client spec stubs are already structured os.selinux values (matching what the script reads via Facter.value(:os).dig('selinux', ...)), and the kickstart templates were already fixed to @facts['networking']['domain'] on master. A final sweep of manifests/, lib/, templates/, and spec/acceptance/ finds no remaining flat-fact usage.

Rides the unreleased 9.0.0 (CHANGELOG entry added; no additional bump needed). syntax/lint/rubocop/validate:strings/RELENG all pass locally.

🤖 Generated with Claude Code

- simp::puppetdb computes percentage-based Java heap sizes from
  $facts['memory']['system']['total_bytes'] in native Puppet instead
  of an inline ERB template using the legacy memorysize_mb fact;
  behavior is unchanged (verified with new unit assertions for both
  the percentage and absolute-value forms)
- Acceptance suites query networking.* structured facts instead of
  the flat fqdn, domain, ipaddress_eth1, and macaddress_eth1 facts

The bootstrap_simp_client spec's selinux stubs flagged in the issue
are already structured os.selinux values and the templates were
already fixed, so nothing else remained.

Fixes #329

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XCnDsYaJDLiP8z8tafz9Tp
@silug
silug merged commit c393b6f into master Aug 10, 2026
33 checks passed
@silug
silug deleted the fix-legacy-facts branch August 10, 2026 15:27
@github-project-automation github-project-automation Bot moved this from New to Done in Org Triage Aug 10, 2026
@silug silug removed this from Org Triage Aug 10, 2026
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.

Legacy facts

3 participants