Skip to content

TEST -- DO NOT MERGE#4246

Closed
TomOnTime wants to merge 4 commits into
mainfrom
cafferata-cicd/providers-from-profiles
Closed

TEST -- DO NOT MERGE#4246
TomOnTime wants to merge 4 commits into
mainfrom
cafferata-cicd/providers-from-profiles

Conversation

@TomOnTime
Copy link
Copy Markdown
Collaborator

No description provided.

cafferata and others added 4 commits May 12, 2026 09:52
- Replace hardcoded PROVIDERS array with dynamic read from `integrationTest/profiles.json`.
- Add sparse-checkout step to fetch only the profiles file.
- Existing filtering on `*_DOMAIN` env vars remains intact, so providers without configured secrets are skipped automatically.
…n_tests.yml`.

- Remove instructions to manually add providers to the PROVIDERS list in `writing-providers.md`, `byo-secrets.md` and `release-engineering.md`.
- Update checklist and FAQ to reflect the new automated approach.
…n_tests.yml`.

- Use `-AsHashtable` flag because `profiles.json` contains keys with mixed casing (`TYPE` vs `domain`), which PowerShell rejects without this flag.
…nabled (#4189)

### Description

Fixes the CNAME + other record type validation to allow coexistence when
the CNAME is proxied through Cloudflare (`CF_PROXY_ON` or
`CF_PROXY_FULL`).

### Problem

When using the Cloudflare provider with `CF_PROXY_ON`, dnscontrol
rejects configurations that have a CNAME and another record type (e.g.,
MX) on the same name:

```
cannot have CNAME and MX record with same name: mailscanner.example.com
```

However, when a CNAME is proxied, Cloudflare flattens it internally and
returns A/AAAA records to resolvers. The CNAME is never served to the
public, so the RFC 1034 §3.6.2 restriction does not apply. Cloudflare
itself allows this configuration and it works correctly.

### Root Cause

The `checkCNAMEs` function in `pkg/normalize/validate.go`
unconditionally rejects any record type (except AKAMAICDN) that shares a
label with a CNAME, without checking whether the CNAME uses Cloudflare
proxy flattening.

### Fix

When building the CNAME label map, also track which CNAMEs have
`cloudflare_proxy` metadata set to `"on"` or `"full"`. Skip the conflict
error for those labels, following the same pattern as the existing
AKAMAICDN exception.

### Tests

Added `TestCNAMECloudflareProxied` that verifies:
- Proxied CNAME + MX on the same label produces no error
- Non-proxied CNAME + MX on the same label still produces an error

Fixes #4181

Co-authored-by: rvasikarla <rvasikarla@splunk.com>
@TomOnTime TomOnTime closed this May 12, 2026
@cafferata cafferata deleted the cafferata-cicd/providers-from-profiles branch May 12, 2026 12:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants