Commit graph

19 commits

Author SHA1 Message Date
Tom Limoncelli
7ab7d147fb
CHORE: Move non-provider code out of /providers (#3916)
# Issue

Fixes https://github.com/StackExchange/dnscontrol/issues/3912

# Resolution

```
#!/bin/sh

# Reset

git fetch origin main
git reset --hard origin/main
git checkout main
git branch -D tlim_moveproviders
git checkout -b tlim_moveproviders
find . -name \*.bak -delete

# Move the *.go files out of providers/

mkdir -p pkg/providers
git mv providers/*.go pkg/providers

# move the _all file out of providers/

git mv providers/_all pkg/providers/_all

# Update the imports (in go.* and the affected files)

sed -i.bak -e 's@"github.com/StackExchange/dnscontrol/v4/providers"@"github.com/StackExchange/dnscontrol/v4/pkg/providers"@g' go.* $(fgrep -lr --include '*.go' '"github.com/StackExchange/dnscontrol/v4/providers"' *)
sed -i.bak -e 's@"../../providers"@"../../pkg/providers"@g' pkg/normalize/capabilities_test.go
sed -i.bak -e 's@"github.com/StackExchange/dnscontrol/v4/providers/_all"@"github.com/StackExchange/dnscontrol/v4/pkg/providers/_all"@g' go.* $(fgrep -lr --include '*.go' '"github.com/StackExchange/dnscontrol/v4/providers/_all"' *)

# Fix the docs

sed -i.bak -e 's@StackExchange/dnscontrol/blob/main/providers/_all/all.go@StackExchange/dnscontrol/blob/main/pkg/providers/_all/all.go@g' documentation/advanced-features/writing-providers.md
sed -i.bak -e 's@StackExchange/dnscontrol/providers@StackExchange/dnscontrol/pkg/providers@g' documentation/advanced-features/writing-providers.md
sed -i.bak -e 's@StackExchange/dnscontrol/v4/providers@StackExchange/dnscontrol/v4/pkg/providers@g' documentation/advanced-features/writing-providers.md
sed -i.bak -e 's@dnscontrol/providers/providers.go@dnscontrol/pkg/providers/providers.go@g' documentation/advanced-features/writing-providers.md
sed -i.bak -e 's@providers/_all/all.go@pkg/providers/_all/all.go@g' documentation/advanced-features/writing-providers.md
#sed -i.bak -e 's@@@g' documentation/advanced-features/writing-providers.md
#sed -i.bak -e 's@@@g' documentation/advanced-features/writing-providers.md

find . -name \*.bak -delete

go fmt ./...

git status

echo git commit -a -m'CHORE: Move Non-provider files in providers to pkg/providers'



```
2025-12-15 12:53:52 -05:00
Michael Kaye
efe713cc0e
FEATURE: Set --notify via creds.json so that preview or push can always notify (#3910)
Either setting these new options OR using --notify on the commandline
will send notification for any specific execution.

Fixes #3906

In a second commit (feel free to remove) I added some logging to
indicate that notifications were enabled or not (useful when testing
each case).

I've manually tested combinations of the various options, for both
preview and push:
 * --notify set or unset on commandline
 * notify_on_* set to "true" or "ASDAS" or "false" or not mentioned
 
All seem to provide the correct logging line - invalid boolean values
are considered false (not an error).
 
I've made an attempt at documentation of the options, not sure if you
want it elsewhere as well.
  
<!--
## Before submiting a pull request

Please make sure you've run the following commands from the root
directory.

    bin/generate-all.sh

(this runs commands like "go generate", fixes formatting, and so on)

## Release changelog section

Help keep the release changelog clear by pre-naming the proper section
in the GitHub pull request title.

Some examples:
* CICD: Add required GHA permissions for goreleaser
* DOCS: Fixed providers with "contributor support" table
* ROUTE53: Allow R53_ALIAS records to enable target health evaluation

More examples/context can be found in the file .goreleaser.yml under the
'build' > 'changelog' key.
!-->
2025-12-10 12:50:31 -05:00
Sukka
986bc4c5f4
DOCS: replace all NewRegistrar('ThirdParty') (#3889)
`NewRegistrar("ThirdParty");` has been replaced w/
`NewRegistrar("none");`

The PR updates the docs.
2025-12-05 15:33:03 -05:00
Tom Limoncelli
703084160f
REFACTOR: BIND/GANDI_V5 add "RP" record type, rewrite CLOUDFLAREAPI CF_* and more (#3886)
# Issue

* New record type: "RP" (supported by BIND and GANDI_V5) 
* Cloudflare: CF_REDIRECT/CF_TEMP_REDIRECT now generate
CF_SINGLE_REDIRECT records. All PAGE_RULE-based code is removed.
PAGE_RULEs are deprecated at Cloudflare. (be careful when upgrading!)
* New "v2" RecordConfig: RP and CF_SINGLE_REDIRECT are the only record
types that use this method. It shifts most of the work out of JavaScript
and into the Go code, making new record types easier to make, easier to
test, and easier to use by providers. This opens the door to new things
like a potential code-generator for rtypes. Converting existing rtypes
will happen over the next year.
* When only the TTL changes (MODIFY-TTL), the output lists the TTL
change first, not at the end of the line where it is visually lost.
* CF_REDIRECT/CF_TEMP_REDIRECT generate different rule "names". They
will be updated the first time you "push" with this release. The order
of the rules may also change. If you rules depend on a particular order,
be very careful with this upgrade!

Refactoring:

* New "v2" RecordConfig: Record types using this new method simply
package the parameters from dnsconfig.js statements like
CF_REDIRECT(foo,bar) and send them (raw) to the Go code. The Go code
does all processing, validation, etc. and turns them into RecordConfig
that store all the rdata in `RecordConfig.F`. No more adding fields to
RecordConfig for each new record type!
* RecordConfig.IsModernType() returns true if the record uses the new v2
record mechanism.
* PostProcess is now a method on DnsConfig and DomainConfig.
* DOC: How to create new rtypes using the v2 method (incomplete)

Other things:

* Integration tests for CF "full proxy" are removed. This feature
doesn't exist any more.
* DEV: Debugger tips now includes VSCode advice
* TESTING: The names of testgroup's can now have extra spaces to make
data align better
* CF_TEMP_REDIRECT/CF_REDIRECT is now a "builder" that generates
CLOUDFLAREAPI_SINGLE_REDIRECT records.
* And more!

# Resolution

---------

Co-authored-by: Jakob Ackermann <das7pad@outlook.com>
2025-12-04 16:42:20 -05:00
Gabe Van Engel
bdf8bef203
DEPS: Switch to maintained fork of shoutrrr (#3838) 2025-11-17 11:52:26 -05:00
Kevin Neufeld
9d4cb301f3
feat(report): --report output now includes detailed list of changes (#3835) 2025-11-13 13:16:32 -05:00
Vincent Hagen
f365902508
DOCS: Add internals for ordering (#3811) 2025-11-03 11:33:21 -05:00
Tom Limoncelli
237de6f2e1
docs(backups) Emphasize the warning about BIND backups (#3799) 2025-10-21 10:43:43 -04:00
Eli Heady
8b73de0765
DOCS: Fix many minor typos (#3752)
Co-authored-by: Tom Limoncelli <6293917+tlimoncelli@users.noreply.github.com>
2025-09-02 11:00:25 -04:00
Georg
e79c43f6eb
DOCS/rtypes: consistently use pushd (#3719)
Signed-off-by: Georg Pfuetzenreuter <mail@georg-pfuetzenreuter.net>
Co-authored-by: Tom Limoncelli <tlimoncelli@stackoverflow.com>
2025-08-11 11:06:38 -04:00
Phil Pennock
3f4f9b8083
DNSIMPLE: DOCS: handle multiple provider instances (#3678) 2025-07-22 12:51:21 -04:00
Phil Pennock
ecbc4992d0
DOCS: expand upon concurrency (#3676) 2025-07-22 10:01:10 -04:00
Phil Pennock
af5907aafd
DNSIMPLE: preview data is now gathered concurrently (CanConcur) (#3675) 2025-07-21 15:09:44 -04:00
Costas Drogos
c842eb26a5
NEW FEATURE: DKIM_BUILDER() adds a DKIM record builder (#3627)
Co-authored-by: Tom Limoncelli <tlimoncelli@stackoverflow.com>
2025-07-18 10:38:50 -04:00
James O'Gorman
4ce19352e9
PORKBUN: Improve retry handling, mark as concurrent (#3652) 2025-07-09 12:03:59 -04:00
Tom Limoncelli
b66251bfda
CHORE: update dependencies and fmt (#3655)
Co-authored-by: Klett IT <github@klett-it.net>
Co-authored-by: Klett IT <71817167+KlettIT@users.noreply.github.com>
Co-authored-by: Klett IT <git@klett-it.net>
2025-07-09 10:56:00 -04:00
Jeffrey Cafferata
0a4162f14a
DOCS: How to add a requested provider (#3636) 2025-06-23 15:48:00 -04:00
Jeffrey Cafferata
1f8b7d01b6
DOCS: Linkspector URI fixes (#3625) 2025-06-20 08:39:47 -04:00
Jeffrey Cafferata
e5f4d97950
DOCS: [GitBook] Refactor structure to match URL paths and fix missing page links (#3613) 2025-06-11 16:20:23 -04:00