Resolve bundle product repo from products.yml per product - #4023
Open
Mpdreamz wants to merge 1 commit into
Open
Conversation
BundleBuilder stamped one bundle-level repo/owner onto every product in the output. Now each product's repo is resolved from ProductsConfiguration via product.Repository, falling back to the bundle-level value when the product is not in the catalogue or has no explicit repository field. elastic/cloud bundles carrying cloud-hosted, cloud-serverless, and cloud-enterprise will each carry their own repo: cloud after this change rather than whatever the caller passed as the bundle-level repo. Co-Authored-By: Claude <noreply@anthropic.com>
theletterf
approved these changes
Sep 3, 2026
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.
BundleBuilderstamped a single bundle-levelrepoandowneronto every product in the output. Now each product's repo is resolved fromProductsConfigurationviaproduct.Repository, falling back to the bundle-level value when the product is absent from the catalogue or has no explicitrepository:field.Affects: Release notes
Prompt summary: Part of a multi-PR plan to fix
elastic/cloudchangelog pipeline.elastic/cloudhosts three products (cloud-hosted,cloud-serverless,cloud-enterprise) under one repo. Without per-product resolution, every bundle produced byelastic/cloudstamps the same bundle-level repo onto all products, making PR link rendering and scrubber decisions incorrect for the individual products.Why
BundleBuilder.BuildProductssetRepo = repo(the bundle-level value) unconditionally on everyBundledProduct. For a repo likeelastic/cloudthat hosts multiple products, the resulting bundle had one repo for all products rather than the correct per-product repo. The downstream scrubber (ChangelogContentScrubber) and inline renderer (ChangelogInlineRenderer) both readBundledProduct.Repoto decide which links to hide — so a wrong value suppresses or exposes the wrong links.What
Per-product repo resolution in
BundleBuilderBundleBuildernow accepts aProductsConfiguration?and resolves each product'sRepovia a newResolveProductRepohelper: look up the product in the catalogue and returnproduct.Repository; fall back to the bundle-levelrepowhen the product is missing or itsrepository:field is null.product.Repositoryis already defaulted to the product ID when not explicitly set inproducts.yml.ChangelogBundlingServicewires in the catalogueThe single
new BundleBuilder().BuildBundle(...)call inChangelogBundlingServicenow passesconfigurationContext?.ProductsConfigurationas the last argument. No signature change at the call sites outside this service — the parameter is optional.Backward compatibility
When
productsConfigurationisnull(or the product is not found), behaviour is identical to before — the bundle-levelrepois used. All existing tests pass unchanged.Verify
Stack: 3 of 5, on top of #4022.