-
Notifications
You must be signed in to change notification settings - Fork 32
Product Configuration #1865
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Product Configuration #1865
Conversation
…roduct metadata, and substitution support for them
# Conflicts: # config/legacy-url-mappings.yml # src/tooling/docs-assembler/Cli/RepositoryCommands.cs
There was a problem hiding this 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?
There was a problem hiding this 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.
src/Elastic.Documentation.Configuration/ConfigurationFileProvider.cs
Outdated
Show resolved
Hide resolved
Co-authored-by: Fabrizio Ferri-Benedetti <[email protected]>
Fabrizio with the save. Co-authored-by: Fabrizio Ferri-Benedetti <[email protected]>
Smoke tests are failing. We should run a full assembler build to validate. |
There was a problem hiding this 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.
Are there any changes needed due to #1932? |
@cotti @reakaleek Yeah, we'll need to add |
# 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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good work!
# Conflicts: # config/legacy-url-mappings.yml
Co-authored-by: Fabrizio Ferri-Benedetti <[email protected]>
…ture/product_config
There was a problem hiding this 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
Handles #1637
This PR performs a few refactorings into how we deal with product, versioning and legacy URL mapping definitions.
Configuration
products.yml
andlegacy-url-mappings.yml
occurs during early service bootstrapping.Products Listing
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
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