Skip to content

Conversation

cotti
Copy link
Contributor

@cotti cotti commented Sep 10, 2025

Handles #1637

This PR performs a few refactorings into how we deal with product, versioning and legacy URL mapping definitions.

Configuration

  • Substitutions have been added for products to access their labels.
  • Initialization for products.yml and legacy-url-mappings.yml occurs during early service bootstrapping.

Products Listing

  • We now have a products.yml file to gather essential product metadata. Currently, we have a friendly label for each, and reference the versioning system adopted by the project in question.

Versioning

  • Updated to leverage the connection between Product/Version/LegacyURL.

Legacy Url Mapping

  • legacy-url-mappings.yml has been reviewed to include a reference to a product. Most entries have a direct correlation. For a few cases, a best-match approach was taken.

Docs

  • Docs-builder's documentation was updated to reflect these changes.

Copy link
Contributor

@theletterf theletterf left a comment

Choose a reason for hiding this comment

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

@elastic/docs-engineering I think this PR would also solve #1497

What happens with existing product subs define in docset.yml files, by the way? Should we prefer products.yml driven substitutions from now on?

Copy link
Member

@Mpdreamz Mpdreamz left a comment

Choose a reason for hiding this comment

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

A few small nits and q's.

Would be good to include more tests on resolving product names and their attached versioning schemes.

Co-authored-by: Fabrizio Ferri-Benedetti <[email protected]>
Fabrizio with the save.

Co-authored-by: Fabrizio Ferri-Benedetti <[email protected]>
@reakaleek
Copy link
Member

Smoke tests are failing. We should run a full assembler build to validate.

Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR refactors how the documentation system handles product configuration, versioning, and legacy URL mapping definitions by introducing a new products.yml configuration file and updating the configuration architecture.

  • Introduces a centralized products.yml file for product metadata including display names and versioning systems
  • Refactors legacy URL mappings to reference products instead of raw version lists
  • Updates configuration initialization to load products and legacy mappings during service bootstrap

Reviewed Changes

Copilot reviewed 51 out of 51 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
config/products.yml New configuration file defining all product metadata with display names and versioning systems
config/legacy-url-mappings.yml Updated to reference products from products.yml instead of direct version arrays
src/Elastic.Documentation.Configuration/Products/ New product configuration classes and extensions for handling product metadata
src/Elastic.Documentation.Configuration/LegacyUrlMappings/ New legacy URL mapping configuration classes replacing the old Legacy namespace
Multiple test files Updated test helpers to include new ProductsConfiguration and LegacyUrlMappingConfiguration dependencies

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@reakaleek
Copy link
Member

Are there any changes needed due to #1932?

@theletterf
Copy link
Contributor

@cotti @reakaleek Yeah, we'll need to add edot_cf_azure changes from #1932

# Conflicts:
#	config/versions.yml
#	src/Elastic.Documentation.Configuration/ConfigurationFileProvider.cs
#	src/Elastic.Documentation.LegacyDocs/PageLegacyUrlMapper.cs
#	src/Elastic.Documentation/AppliesTo/ApplicableToYamlConverter.cs
#	src/services/Elastic.Documentation.Assembler/AssembleSources.cs
#	src/tooling/docs-assembler/Cli/RepositoryCommands.cs
#	tests/Elastic.ApiExplorer.Tests/TestHelpers.cs
#	tests/Elastic.Markdown.Tests/TestHelpers.cs
#	tests/authoring/Framework/Setup.fs
Copy link
Member

@reakaleek reakaleek left a comment

Choose a reason for hiding this comment

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

Good work!

cotti and others added 3 commits September 25, 2025 13:37
# Conflicts:
#	config/legacy-url-mappings.yml
Co-authored-by: Fabrizio Ferri-Benedetti <[email protected]>
Copy link
Member

@Mpdreamz Mpdreamz left a comment

Choose a reason for hiding this comment

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

One last nit, not blocking the PR on it though

@cotti cotti merged commit a78511e into main Sep 25, 2025
19 checks passed
@cotti cotti deleted the feature/product_config branch September 25, 2025 20:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants