Fix changelog block hiding links for private+skip repos - #3982
Merged
Conversation
`ChangelogBlock.LoadPrivateRepositories` read `PrivateRepositories.Keys`,
which excludes repos with `skip: true` set. That excluded all ten existing
team repos (`kibana-team`, `search-team`, etc.) from render-time link
hiding, so a local `{changelog}` render printed their PR links.
The root cause was that `AssemblyConfiguration.PrivateRepositories` serves
two consumers with different needs:
- `AssemblerCrossLinkFetcher` needs repos whose cross-links can actually be
fetched; `skip:true` means no link index exists, so the `!Skip` filter is
correct there.
- `ChangelogBlock` needs repos whose links must be hidden; `skip:true` means
"does not publish docs", not "is public", so the filter is wrong there.
The fix adds `AllPrivateRepositoryNames` — all repos marked `private: true`
regardless of `skip: true`, derived from the same pre-removal snapshot.
`LoadPrivateRepositories` switches to this set; `PrivateRepositories` and
its cross-link consumer are unchanged.
The `:cdn:` publication path was already safe (the scrubber strips those
refs before publication), but a local bundle render leaked them.
Co-Authored-By: Claude <noreply@anthropic.com>
Docs preview (local build)Handbook preview: https://docs-v3-preview.elastic.dev/elastic/docs-builder/pull/3982/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ChangelogBlocknever hid PR links for the tenprivate: true, skip: trueteam repos inassembler.yml(kibana-team,search-team,security-team, and the rest). A local{changelog}render printed their links in plain text.Affects: Release notes, Authoring
Why
LoadPrivateRepositoriespopulated the hidden-repo set fromPrivateRepositories.Keys. That dictionary is built with.Where(r => !r.Value.Skip), which excludes every repo withskip: true. The filter exists for good reason inAssemblerCrossLinkFetcher— askip: truerepo publishes no link index, so fetching cross-links for it would throw. Butskip: truemeans "does not publish docs", not "is public". The two consumers need different subsets of the same snapshot, and they were sharing one.The
:cdn:publication path was already safe — the scrubber strips disallowed refs before a bundle reaches the public bucket. Local renders were the hole.What
Distinct set for render-time visibility
AssemblyConfigurationgainsAllPrivateRepositoryNames— anIReadOnlySet<string>of every repo markedprivate: true, derived from the pre-removal snapshot without the!Skipfilter. The existingPrivateRepositoriesdictionary and its cross-link consumer are unchanged.ChangelogBlockuses the right setLoadPrivateRepositoriesswitches fromPrivateRepositories.KeystoAllPrivateRepositoryNames. A repo that is private and skipped now hides its links at render time, matching the scrubber's behaviour at publication time.Regression test
LoadPrivateRepositories_IncludesSkipTruePrivateReposasserts thatkibana-team— present in the embeddedassembler.ymlasprivate: true, skip: true— appears inBlock.PrivateRepositoriesafter initialisation. The test failed before this fix.Verify