Skip to content

Conversation

@jooola
Copy link
Member

@jooola jooola commented Oct 22, 2025

If the given TXT records are not already quoted, the CLI will split the records into chunks of 255 chars and quote them:

-hcloud zone rrset add-records example-1948294840.com @ TXT --record "\"v=spf1 include:_spf.example.net ~all\""
+hcloud zone rrset add-records example-1948294840.com @ TXT --record "v=spf1 include:_spf.example.net ~all"

@codecov
Copy link

codecov bot commented Oct 22, 2025

Codecov Report

❌ Patch coverage is 32.00000% with 17 lines in your changes missing coverage. Please review.
✅ Project coverage is 67.15%. Comparing base (e6f4209) to head (60473d6).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
internal/cmd/zone/rrset/rrset.go 47.05% 9 Missing ⚠️
internal/cmd/zone/rrset/add_records.go 0.00% 1 Missing and 1 partial ⚠️
internal/cmd/zone/rrset/create.go 0.00% 1 Missing and 1 partial ⚠️
internal/cmd/zone/rrset/remove_records.go 0.00% 1 Missing and 1 partial ⚠️
internal/cmd/zone/rrset/set_records.go 0.00% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1208      +/-   ##
==========================================
- Coverage   72.37%   67.15%   -5.23%     
==========================================
  Files         311      311              
  Lines       11386    11407      +21     
==========================================
- Hits         8241     7660     -581     
- Misses       2203     2734     +531     
- Partials      942     1013      +71     
Flag Coverage Δ
e2e ?
unit 67.15% <32.00%> (-0.09%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ 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.

@jooola jooola changed the title feat: format user provided TXT record values feat: format user provided TXT record when not quoted Oct 29, 2025
@jooola jooola changed the title feat: format user provided TXT record when not quoted feat: format user provided TXT records when not quoted Oct 29, 2025
@jooola jooola marked this pull request as ready for review October 29, 2025 15:55
@jooola jooola requested a review from a team as a code owner October 29, 2025 15:55
@jooola jooola requested review from apricote and phm07 October 29, 2025 15:55
Copy link
Member

@apricote apricote left a comment

Choose a reason for hiding this comment

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

Looks good besides the pending release of hcloud-go.

Do we want to mention this in the help pages of the commands?

@jooola jooola force-pushed the dns-txt-values branch 6 times, most recently from ddd1b19 to 4b53c75 Compare October 30, 2025 13:03
If the given TXT records are not already quoted, the CLI will split the records into chunks of 255 chars and quote them:

```diff
-hcloud zone rrset add-records example-1948294840.com @ TXT --record "\"v=spf1 include:_spf.example.net ~all\""
+hcloud zone rrset add-records example-1948294840.com @ TXT --record "v=spf1 include:_spf.example.net ~all"
```
@jooola jooola merged commit 418b2ba into main Oct 31, 2025
5 of 6 checks passed
@jooola jooola deleted the dns-txt-values branch October 31, 2025 16:33
jooola pushed a commit that referenced this pull request Nov 7, 2025
<!-- section-start changelog -->
### Features

- format user provided TXT records when not quoted (#1208)

### Bug Fixes

- more readable default time format (#1197)
- **iso**: broken `--type` flag in list command (#1221)
- Storage Boxes not listed in `hcloud all list` (#1222)
- consistent tab spacing in describe commands (#1216)
- filepaths not correctly resolved on Windows (#1229)

<!-- section-end changelog -->

---

<details>
<summary><h4>PR by <a
href="https://github.com/apricote/releaser-pleaser">releaser-pleaser</a>
🤖</h4></summary>

If you want to modify the proposed release, add you overrides here. You
can learn more about the options in the docs.

## Release Notes

### Prefix / Start

This will be added to the start of the release notes.

~~~~rp-prefix
~~~~

### Suffix / End

This will be added to the end of the release notes.

~~~~rp-suffix
~~~~

</details>

Co-authored-by: Hetzner Cloud Bot <>
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.

3 participants