Skip to content

feat: differentiate DNS guidance by hosting mode, remove DIY DNS record creation#57

Merged
pcfreak30 merged 2 commits into
developfrom
feat/dns-hosting-guidance
May 19, 2026
Merged

feat: differentiate DNS guidance by hosting mode, remove DIY DNS record creation#57
pcfreak30 merged 2 commits into
developfrom
feat/dns-hosting-guidance

Conversation

@pcfreak30
Copy link
Copy Markdown
Member

@pcfreak30 pcfreak30 commented May 19, 2026

When DNS hosting is enabled, the server creates the DNS zone and records
automatically when DnsHostingEnabled is set. The CLI no longer duplicates
this work by calling CreateZone/CreateRecord.

Wizard changes:

  • Remove dnsService from WebsitesWizard (server handles DNS setup)
  • Replace executeDNSSetup with NS delegation instructions only
  • Managed DNS validation retries with exponential backoff (5 attempts,
    2s-15s) with spinner, since server creates records asynchronously
  • On retry exhaustion, explain NS propagation delay + validate command
  • State-aware completion message (not 'validated' when validation failed)
  • Remove redundant DNS/vvalidation output after wizard completes

Non-wizard changes:

  • Add showDNSHostingInstructions/showSelfManagedDNSInstructions split
  • Add getNameservers to fetch NS records from API
  • Move 'Then validate' hint to non-wizard call sites only
  • Update ipfs-sdk to v0.1.43

This PR differentiates DNS setup guidance based on the website's hosting mode and removes the client-side automatic DNS record creation, which is now handled server-side.

Key changes:

  • Differentiated DNS instructions by hosting mode: When DNS hosting is enabled (Pinner-managed), the CLI now shows NS delegation instructions telling users to update their domain's nameservers at their registrar. For self-managed DNS, it continues showing the TXT verification and dnslink CNAME records users must add manually.

  • Removed client-side DNS zone/record creation: The setupDNSHosting function and DNSService dependency have been removed from the wizard and CLI commands (websites create, websites update). The server now automatically creates DNS zones and records when a website is created with DnsHostingEnabled=true, so the client no longer needs to make those API calls.

  • Managed DNS validation with retry: The wizard's validation step now uses exponential backoff retries (5 attempts) with a spinner for managed DNS, since the server creates DNS records asynchronously and propagation takes time. Self-managed DNS validation continues to prompt the user to add records first.

  • Enhanced websites config output: Now displays nameservers alongside the gateway domain, and shows both CNAME and NS record tables when applicable.

  • Updated websites validate output: The required_records JSON output and CLI instructions now reflect the hosting mode — NS records for managed DNS, TXT/CNAME records for self-managed DNS.

…rd creation

When DNS hosting is enabled, the server creates the DNS zone and records
automatically when DnsHostingEnabled is set. The CLI no longer duplicates
this work by calling CreateZone/CreateRecord.

Wizard changes:
- Remove dnsService from WebsitesWizard (server handles DNS setup)
- Replace executeDNSSetup with NS delegation instructions only
- Managed DNS validation retries with exponential backoff (5 attempts,
  2s-15s) with spinner, since server creates records asynchronously
- On retry exhaustion, explain NS propagation delay + validate command
- State-aware completion message (not 'validated' when validation failed)
- Remove redundant DNS/vvalidation output after wizard completes

Non-wizard changes:
- Add showDNSHostingInstructions/showSelfManagedDNSInstructions split
- Add getNameservers to fetch NS records from API
- Move 'Then validate' hint to non-wizard call sites only
- Update ipfs-sdk to v0.1.43
@kody-ai

This comment has been minimized.

Comment thread pkg/cli/websites_wizard_pterm.go
Copy link
Copy Markdown

@kody-ai kody-ai Bot left a comment

Choose a reason for hiding this comment

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

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 19, 2026

Code Coverage Report

Total Coverage: 35.0%

Generated from commit: 34f7eb5
Repository: LumeWeb/pinner-cli

vr == nil || !vr.Valid entered the true branch then dereferenced
vr.Message on a nil pointer. Split into separate nil check and
validity check to prevent panic.
@kody-ai
Copy link
Copy Markdown

kody-ai Bot commented May 19, 2026

Kody Review Complete

Great news! 🎉
No issues were found that match your current review configurations.

Keep up the excellent work! 🚀

Kody Guide: Usage and Configuration
Interacting with Kody
  • Request a Review: Ask Kody to review your PR manually by adding a comment with the @kody start-review command at the root of your PR.

  • Validate Business Logic: Ask Kody to validate your code against business rules by adding a comment with the @kody -v business-logic command.

  • Provide Feedback: Help Kody learn and improve by reacting to its comments with a 👍 for helpful suggestions or a 👎 if improvements are needed.

Current Kody Configuration
Review Options

The following review options are enabled or disabled:

Options Enabled
Bug
Performance
Security
Business Logic

Access your configuration settings here.

@pcfreak30 pcfreak30 merged commit 6d326e4 into develop May 19, 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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant