feat(packaging): ship annotated config reference and align with install docs#242
feat(packaging): ship annotated config reference and align with install docs#242linkdata wants to merge 2 commits into
Conversation
…ll docs The techdocs installation guide treats /etc/dnstapir/dnstapir-edm.toml as a file the operator annotates in two places (the Crypto-PAn secret and the DNSTAP interface), but the repo shipped no annotated reference and the .toml.sample only set cryptopan-key. - Rewrite dnstapir-edm.toml.sample into a complete annotated reference: both documented edit points, input-tcp matching the resolver example, and the MQTT/HTTPS-to-Core surface, all with absolute /etc/dnstapir/edm paths. - Install it as /etc/dnstapir/dnstapir-edm.toml.sample from both the deb and rpm packages; the live toml stays %ghost (generated by dnstapir-cli enroll). - Set WorkingDirectory=/etc/dnstapir/edm in the systemd unit so relative default file paths resolve to the shipped files. - Add an Installation section and an input-tcp usage note to the README. - Add a test that loads the shipped sample through the real config loader, guarding it against drift from Config.
|
Warning Review limit reached
More reviews will be available in 53 minutes and 55 seconds. Learn how PR review limits work. Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file). ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits. 🚦 How do rate limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan refill rate. For paid Pro and Pro+ PR reviews, CodeRabbit uses rolling per-developer review limits. Reviews become available again as older review attempts age out of the rolling limit window. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe ChangesSample Config, Validation, Packaging, and Docs
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. 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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@dnstapir-edm.toml.sample`:
- Around line 9-12: The comment on line 9 of the sample configuration file
misleadingly states that every shown value is a built-in default, but several
path values are actually absolute path equivalents that have been normalized via
the WorkingDirectory setting mentioned on line 11, rather than the literal
relative defaults used in DefaultConfig. Revise the wording to clarify this
distinction, either by changing "built-in default" to "default-equivalent
values" or by explicitly noting that relative paths in the defaults are shown
here as absolute paths due to WorkingDirectory resolution. This will prevent
confusion when comparing the sample configuration to the actual DefaultConfig
implementation.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: e91c4d47-b5d9-4fc6-81ea-afe4d28ed425
📒 Files selected for processing (6)
MakefileREADME.mddnstapir-edm.toml.samplepkg/runner/config_sample_test.gorpm/SOURCES/dnstapir-edm.servicerpm/dnstapir-edm.spec.in
The header claimed every value was a built-in default, but the two EDIT points are placeholders and the file paths are shown as absolute package locations while DefaultConfig uses relative names. Reword to match.
|
@zluudg I can haz review? |
Summary
Aligns this repo with the canonical install guide at
https://dnstapir.github.io/techdocs/installation.html. The packaging mechanics
(binary path, systemd unit, system user/group,
/var/lib/dnstapir/edm,make deb, Copr via.copr/Makefile, MQTT/HTTPS/Crypto-PAn config) were alreadycompliant; this closes the remaining gaps around the operator-edited config file
and the repo docs.
Changes
dnstapir-edm.toml.sample— rewritten from a one-line stub into a completeannotated reference. It marks the two edit points the guide calls out (the
Crypto-PAn secret and the DNSTAP interface), shows
input-tcpas theresolver-over-network option that matches Unbound's
dnstap-ip: <IP>@<PORT>,and documents the full MQTT + HTTPS-to-Core surface, all with absolute
/etc/dnstapir/edm/...paths./etc/dnstapir/dnstapir-edm.toml.sample(
Makefiledeb/srpmtargets +rpm/dnstapir-edm.spec.inSource6/%install/%files). The live/etc/dnstapir/dnstapir-edm.tomlstays%ghostsince it is generated bydnstapir-cli enroll.dnstapir-edm.service— addedWorkingDirectory=/etc/dnstapir/edmso therelative default file paths (
well-known-domains.dawg, MQTT/HTTP cert+keyfiles) resolve to the shipped files instead of against
/.README.md— added an Installation section linking the techdocs and thedeb/Copr flow, plus an
input-tcpnote in the usage example.pkg/runner/config_sample_test.go(new) — loads the shipped sample throughthe real config loader. Because the loader rejects unknown keys and runs
Config.Validate, this fails if the sample drifts fromConfig(stale key,missing required value, wrong input count).
Verification
go test -race ./...passes, including the new sample test.gofumpt -l,go vet,golangci-lint(0 issues),staticcheck,gosec(0 issues),go build ./....make debproduces a package containing/etc/dnstapir/dnstapir-edm.toml.samplewith the unit carrying
WorkingDirectory=/etc/dnstapir/edm.rpmbuildon the build host); the specchange mirrors the existing
Source2–Source5pattern and is exercised by theunchanged
.copr/Makefile.Note: inaccuracies in the techdocs install page (for the
dnstapir/techdocsrepo)These are doc-side issues found while doing this work; they are not addressed
here but are worth correcting in https://github.com/dnstapir/techdocs:
dnstap-ip: <IP>@<PORT>with[must match dnstapir-edm.yaml], but EDM uses TOML — it should readdnstapir-edm.toml.dnstapir-edm.tomldirectly under/etc/dnstapir, while EDM'sother assets (
well-known-domains.dawg,ignored.dawg,ignored-ips) liveunder
/etc/dnstapir/edm/. A one-line clarification would avoid confusionabout which files go where.
config files; once item 1 is fixed it would help to name the exact keys
(
input-tcpon the EDM side) so operators can line them up with the resolver.Summary by CodeRabbit
Documentation
Configuration
Packaging