Add support for changelog entry markdown files (#3763)
## Motivation and Context [RFC: File-per-change changelog](https://smithy-lang.github.io/smithy-rs/design/rfcs/rfc0042_file_per_change_changelog.html#rfc-file-per-change-changelog) ## Description This PR is the first of the two implementing the proposal outlined in the RFC, and it focuses on the initial 4 bullets in the [Changes checklist](https://smithy-lang.github.io/smithy-rs/design/rfcs/rfc0042_file_per_change_changelog.html#changes-checklist). Crucially, this update does not modify the workflow for developers regarding changelog entries (editing `CHANGELOG.next.toml` remains necessary) or impact the `smithy-rs` CI process and our release pipeline. The PR introduces support for deserializing the following Markdown front matter in the YAML format described in the RFC, e.g. ``` --- # Adding `aws-sdk-rust` here duplicates this entry into the SDK changelog. applies_to: ["client", "server", "aws-sdk-rust"] authors: ["author1", "author2"] references: ["smithy-rs#1234", "aws-sdk-rust#1234"] # The previous `meta` section is broken up into its constituents: breaking: false # This replaces "tada": new_feature: false bug_fix: false --- Some message for the change. ``` These changelog entry Markdown files will be saved in the `smithy-rs/.changelog` directory: ``` ┌───────────┐ │ smithy-rs │ └─────┬─────┘ │ │ ┌───────────┐ ├────┤.changelog │ └─────┬─────┘ │ ├─────test1.md │ └─────test2.md ``` For a concrete example, see a test `end_to_end_changelog_entry_markdown_files` that directly converts from `end_to_end_changelog` and uses Markdown files (the expected test results remain the same). The next PR is expected to - add new subcommands to `changelogger` to a) create a Markdown file and b) preview changelog entries pending to be released - port existing `CHANGELOG.next.toml` at that time to individual Markdown files - update `sdk-lints` to disallow the existence of `CHANGELOG.next.toml` - pass a directory path for `smithy-rs/.changelog` to `--source` (one for [split](https://github.com/smithy-lang/smithy-rs/blob/dc970b37386b155eced5d41262ce0a7fc4a34a91/tools/ci-scripts/generate-smithy-rs-release#L22) and one for [render](https://github.com/smithy-lang/smithy-rs/blob/dc970b37386b155eced5d41262ce0a7fc4a34a91/tools/ci-scripts/generate-smithy-rs-release#L22)) and to [--source-to-truncate](https://github.com/smithy-lang/smithy-rs/blob/dc970b37386b155eced5d41262ce0a7fc4a34a91/tools/ci-scripts/generate-smithy-rs-release#L23C1-L23C47) (the 4th bullet effectively does the cutover to the new changelog mode) ## Testing - Added `parse_markdown` and `end_to_end_changelog_entry_markdown_files` for testing new changelog format (the rest of the tests showing up in the diff are moved from different places) - Confirmed via [a release dry-run](https://github.com/smithy-lang/smithy-rs/actions/runs/9947165056) that this PR does not break the existing `smithy-rs` release process - Confirmed that this PR does not break the use of `changelogger` in our internal release process ---- _By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice._
Loading
Please register or sign in to comment