Skip to content

feat: run Corefile check before run#77

Open
lidel wants to merge 1 commit intomainfrom
feat-corefile-sanity-check
Open

feat: run Corefile check before run#77
lidel wants to merge 1 commit intomainfrom
feat-corefile-sanity-check

Conversation

@lidel
Copy link
Contributor

@lidel lidel commented Jul 30, 2025

Quality of life improvement, makes sure config is correctly loaded and the necessary plugins are present

Before

$ docker run --rm -it --net=host ghcr.io/ipshipyard/p2p-forge:v0.6.1
p2p-forge v0.6.1 2025-07-30-bdc3d05-dirty
CoreDNS-1.11.3
linux/amd64, go1.23.11,
p2p-forge v0.6.1 2025-07-30-bdc3d05-dirty
no action found for directive 'whoami' with server type 'dns' (missing a plugin?)

This PR

$ docker run --rm -it --net=host p2p-forge-dev
p2p-forge v0.6.1 2025-07-30-bdc3d05-dirty

Error: Configuration issue detected.

p2p-forge requires a Corefile with 'acme' and 'ipparser' plugins.
This error occurs when running without a proper Corefile or with
a generic CoreDNS config missing p2p-forge-specific plugins.

For detailed usage instructions, see: https://github.com/ipshipyard/p2p-forge#usage

Local development:
  ./p2p-forge -conf Corefile.local-dev -dns.port 5354

Production deployment:
  ./p2p-forge -conf Corefile
  (Note: Use production-appropriate Corefile, not Corefile.local-dev)

Docker:
  docker run --rm -it --net=host -v ./Corefile.local-dev:/p2p-forge/Corefile.local-dev ghcr.io/ipshipyard/p2p-forge -conf /p2p-forge/Corefile.local-dev -dns.port 5354

@codecov
Copy link

codecov bot commented Jul 30, 2025

Codecov Report

❌ Patch coverage is 70.58824% with 20 lines in your changes missing coverage. Please review.
✅ Project coverage is 62.50%. Comparing base (bdc3d05) to head (00de0ca).

Files with missing lines Patch % Lines
main.go 70.58% 20 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #77      +/-   ##
==========================================
+ Coverage   62.04%   62.50%   +0.45%     
==========================================
  Files          11       11              
  Lines        1220     1288      +68     
==========================================
+ Hits          757      805      +48     
- Misses        391      411      +20     
  Partials       72       72              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@lidel lidel force-pushed the feat-corefile-sanity-check branch from 43bf9a6 to 48335f6 Compare July 30, 2025 17:17
makes sure config is correctly loaded and the necessary plugins are present
@lidel lidel force-pushed the feat-corefile-sanity-check branch from 48335f6 to 00de0ca Compare July 30, 2025 17:56
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