Skip to content

Add towncrier for automatic changelog generation - #10379

Merged
bmw merged 15 commits into
mainfrom
towncrier
Jul 31, 2025
Merged

bmw merged 15 commits into
mainfrom
towncrier

Conversation

@wgreenberg

Copy link
Copy Markdown
Collaborator

blast from the past! resurrects #9803 with all of @bmw's changes. i figured instead of force-pushing a basically brand new branch and obliterating the old review, i'd just start from a clean slate

fixes #8272

@wgreenberg
wgreenberg requested review from a team and bmw and removed request for a team July 29, 2025 22:04

@bmw bmw left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

i made a number of small suggestions, but this otherwise looks great to me!

thanks for picking this up again will

Comment thread tools/_release.sh Resolved
Comment thread certbot/setup.py Resolved
Comment thread towncrier.toml Resolved
Comment thread certbot/CHANGELOG.md Resolved
Comment thread .github/pull_request_template.md Resolved
Comment thread newsfragments/8272.changed Resolved
Comment thread newsfragments/10342.fixed Resolved
@wgreenberg

Copy link
Copy Markdown
Collaborator Author

@bmw i think your CI commit looks good, want me to cherry-pick that in here or wanna merge it separately?

@bmw

bmw commented Jul 30, 2025

Copy link
Copy Markdown
Member

go ahead and grab it!

@bmw

bmw commented Jul 30, 2025

Copy link
Copy Markdown
Member

this lgtm!

you're up @ohemorange

@bmw
bmw requested a review from ohemorange July 30, 2025 19:59
@bmw bmw mentioned this pull request Jul 30, 2025
bmw
bmw previously approved these changes Jul 30, 2025

@ohemorange ohemorange left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

In https://github.com/certbot/certbot/pull/10378/files, multiple entries are added to the changelog. What would be the correct way to do that post towncrier?

towncrier has the all_bullets option, which is a not very helpful name.

given the fragment 10339.fixed (reused existing for testing):

remove tls_alpn
- removed this class
- removed the other class

as-is, it generates:

- remove tls_alpn
  - removed this class
  - removed the other class

  ([#10339](https://github.com/certbot/certbot/issues/10339))

with all_bullets=false, it generates:

- remove tls_alpn
- removed this class
- removed the other class ([#10339](https://github.com/certbot/certbot/issues/10339))

personally I like the keep it as-is version better. if you agree, this comment can serve as a reference for future viewers of this pr and we can leave it at that.

Comment thread towncrier.toml Resolved
Comment thread newsfragments/10259.fixed Resolved
@wgreenberg

Copy link
Copy Markdown
Collaborator Author

@ohemorange i suppose our guidance could be to make all newsfragments one-liners, since IMO the default multiline behavior is pretty wack, and disabling all_bullets (afaict) would require everyone to include a * prefix to their fragment

@ohemorange

Copy link
Copy Markdown
Contributor

I agree the default multiline behavior is a little silly, but requiring all oneliners also seems bad. how would you do #10378 as a one-liner?

@wgreenberg

wgreenberg commented Jul 30, 2025 •

Copy link
Copy Markdown
Collaborator Author
* Removed `acme.challenges.TLSALPN01Response`, `acme.challenges.TLSALPN01`,
  `acme.standalone.TLSServer`, and `acme.standalone.TLSALPN01Server`.
  Also removed parameter `alpn_protocols` from `acme.crypto_util.probe_sni`

it's not good!!

@wgreenberg

Copy link
Copy Markdown
Collaborator Author

so i guess wrap=true still copies the fragment's original whitespace, so we actually can't combine it with manual wrapping. but with that in mind, the default multiline functionality is probably fine:

fragment:

Removed several deprecated classes
- Removed `acme.challenges.TLSALPN01Response`
- Removed `acme.challenges.TLSALPN01`
- Removed parameter `alpn_protocols` from `acme.crypto_util.probe_sni`
- Removed `acme.standalone.TLSServer`
- Removed `acme.standalone.TLSALPN01Server`

changelog result:

### Changed

- Removed several deprecated classes
  - Removed `acme.challenges.TLSALPN01Response`
  - Removed `acme.challenges.TLSALPN01`
  - Removed parameter `alpn_protocols` from `acme.crypto_util.probe_sni`
  - Removed `acme.standalone.TLSServer`
  - Removed `acme.standalone.TLSALPN01Server`

@ohemorange

Copy link
Copy Markdown
Contributor

Multiline with long lines now looks like this:

Screenshot 2025-07-30 at 5 39 40 PM

I agree this is solid.

@ohemorange

Copy link
Copy Markdown
Contributor

Not sure if you sure my comment at #10379 (comment), so bumping it here

@ohemorange

Copy link
Copy Markdown
Contributor

slight change to add wrapping in case @bmw wants to take another look

@bmw

bmw commented Jul 31, 2025

Copy link
Copy Markdown
Member

lgtm!

i'm merging this

@bmw
bmw merged commit 2ac7baa into main Jul 31, 2025
@bmw
bmw deleted the towncrier branch July 31, 2025 14:12
wgreenberg pushed a commit that referenced this pull request Jul 31, 2025
as i went to merge #10379, i
noticed that it moved the changelog entry from
#10319 from added to fixed which
i had missed in my prior reviews. i think added is more appropriate so
this moves it back

i personally don't think this PR requires two reviews
@bmw bmw mentioned this pull request Jan 16, 2026
wgreenberg pushed a commit that referenced this pull request Jan 16, 2026
this PR is a follow up to my comment at
#10495 (comment)

i dislike that jsha chose a slightly different column limit than
towncrier which caused it to generate awkwardly short lines in our
changelog. i also dislike contributors having to remember/know about
towncrier's wrapping behavior when writing changelog entries. i'd like
us to find a way to not have to worry about this

i initially looked into trying to set towncrier's line length limit to a
much higher value, but after searching around
https://towncrier.readthedocs.io/en/stable/configuration.html, i don't
think it's configurable

instead, i'm proposing here that we remove the wrapping entirely.
wrapping was added in response to the discussion at
#10379 (comment).
every markdown viewer i'm aware of automatically nicely handles wrapping
of long lines in markdown. most also automatically merge manually
wrapped lines to wrap based on the user's display/settings. finally,
since the changelog is automatically edited, i think it'll be rare for
certbot devs to have to manually edit the file

because of all this, i think whether the newsfragment was manually
wrapped or not is largely irrelevant, we shouldn't worry about it, and
we should let people wrap or their newsfragments or not as they see fit

i suppose alternatively we could just let towncrier double/awkwardly
wrap entries since i'm making the case that the wrapping doesn't matter,
but i personally have a slight preference for this approach. let me know
what y'all think
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.

Prevent merge conflicts and changelog entries being added to the wrong release

3 participants