Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New zones are not created in push with --populate-on-preview=false set #3399

Open
Veratil opened this issue Jan 22, 2025 · 3 comments
Open

Comments

@Veratil
Copy link
Contributor

Veratil commented Jan 22, 2025

Describe the bug
When you do not want to create a zone on preview and set --populate-on-preview=false, and then change to a push keeping the option there, the zones will not be created.

To Reproduce

  1. Create a config with a new zone
  2. push with --populate-on-preview=false
  3. See records failed to be created since the zones weren't created

Expected behavior
Zones are created even if --populate-on-preview=false is set on a push

DNS Provider

  • POWERDNS

Additional context
I'm using an ansible playbook (builtin.shell, along with an -e method=[preview|push]) to run the dnscontrol docker container, and it's easier to keep the --populate-on-preview=false as an argument to shell instead of trying to hand wave it in there when the method variable changes.

@tlimoncelli
Copy link
Contributor

CC @das7pad

Suggestion (but only if it's not a huge lift): Should we be rethinking the flags? We have --no-populate and --populate-on-preview. Maybe there should be a single flag that accepts values like: "preview" (create on preview), "push" (create on push), "both" (do both), "none" (The default).

@das7pad
Copy link
Contributor

das7pad commented Jan 23, 2025

I've opened #3402 with a quick one-line fix while we discuss the flags.

Should we be rethinking the flags? We have --no-populate and --populate-on-preview. Maybe there should be a single flag that accepts values like: "preview" (create on preview), "push" (create on push), "both" (do both), "none" (The default).

Consolidating these (and while we are at it, removing the unused --depopulate flag) sounds like a good idea. Personally, I would go for "preview" as the default for ease of use and allowing users to see the "actual diff" right away.

How would the deprecation look like? Do we warn users when they specified both old and the new flag? Which "wins" in that case? (I would lean towards the new one being authoritative.)

@tlimoncelli
Copy link
Contributor

Excellent questions!

We generally remove flags with 3-4 months notice. We open a bug id that lists the timeline. We mention the change in the footer of release announcements so people see reminders many times until the change happens.

Tom

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

No branches or pull requests

3 participants