You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
changelog: gate CDN bundle sourcing on docset.yml release_notes
Make `changelog bundle` source entries from the CDN only when every
in-scope product is declared under `release_notes` in docset.yml, matching
the directive's opt-in model. Undeclared products — and `use_local_changelogs`
or `--directory` — fall back to local sourcing. The same declared-gate drives
the `--plan` `needs_network` output so the planning step and bundle run agree.
Also make CdnChangelogEntryFetcher IDisposable and fully async (shared
HttpClient in production, owned client only for injected test handlers, async
retry backoff), addressing the HttpClient review feedback.
Updates bundle configuration/registry docs and tests.
Co-authored-by: Cursor <cursoragent@cursor.com>
Copy file name to clipboardExpand all lines: docs/contribute/configure-changelogs-ref.md
+18Lines changed: 18 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -53,6 +53,7 @@ These settings are relevant to one or all of the `changelog bundle`, `changelog
53
53
|`bundle.release_dates`| When `true`, bundles include a `release-date` field (default: true). |
54
54
|`bundle.repo`| Default GitHub repository name (for example, `elasticsearch`). Used by the `{changelog}` directive to generate correct PR and issue links. Only needed when the product ID doesn't match the GitHub repository name. |
55
55
|`bundle.resolve`| When `true`, changelog contents are copied into bundle (default: `true`). |
56
+
|`bundle.use_local_changelogs`| When `true`, always source entries from the local folder and never from the CDN (default: `false`). Refer to [Entry sourcing](#bundle-entry-sourcing). |
56
57
57
58
:::
58
59
@@ -63,6 +64,23 @@ When `bundle.link_allow_repos` is omitted, no link filtering occurs.
63
64
- For public repos, add your `owner/repo` to the list at a minimum.
64
65
:::
65
66
67
+
### Entry sourcing [bundle-entry-sourcing]
68
+
69
+
`changelog bundle` reads the individual changelog entries it aggregates either from the local folder or from the public CDN. CDN sourcing is **opt-in per product** (declared-gate): an entry is pulled from the CDN only when its product is declared under `release_notes` in the docset's `docset.yml`.
70
+
71
+
```yaml
72
+
# docset.yml
73
+
release_notes:
74
+
- product: elasticsearch
75
+
```
76
+
77
+
Sourcing is decided per run:
78
+
79
+
- **Local folder (default).** Used when no product in scope is declared under `release_notes`, when `bundle.use_local_changelogs: true`, when `--directory` is passed, or when the filter resolves no concrete product (for example, `--all` or PR/issue-only filters). The folder must contain the changelog files.
80
+
- **CDN.** Used only when every product in scope is declared under `release_notes` and none of the local-sourcing conditions above apply. The product must also exist in [products.yml](https://github.com/elastic/docs-builder/blob/main/config/products.yml) with the `release-notes` feature enabled.
81
+
82
+
The product ID under `release_notes` matches the product format described in [](/cli/changelog/bundle.md#product-format). This is the same declaration the `{changelog}` directive's `:cdn:` mode consumes, so a repository that opts into CDN-sourced bundling and CDN-rendered release notes declares each product once.
83
+
66
84
### Bundle descriptions [bundle-descriptions]
67
85
68
86
You can add introductory text to bundles using the `description` field. This text appears at the top of rendered changelogs, after the release heading but before the entry sections.
0 commit comments