-
Notifications
You must be signed in to change notification settings - Fork 30
Merge docs-assembler commands into docs-builder #1931
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
Conversation
This caused running commands in the IDE to use an .artifacts folder under bin/ folders.
ServiceInvoker caught them returning false without emitting errors so thats good.
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 reorganizes CLI tools into services for better code sharing, ensures uncaught exceptions are properly reported, and consolidates command handling across both docs-builder and docs-assembler tools. The main changes include extracting business logic into reusable service classes, standardizing error handling, and moving shared functionality to dedicated service layers.
- Extract CLI command implementations into reusable service classes
- Implement unified exception handling and error reporting across tools
- Move shared navigation, deployment, and build functionality to service layer
Reviewed Changes
Copilot reviewed 104 out of 105 changed files in this pull request and generated 4 comments.
Show a summary per file
File | Description |
---|---|
src/tooling/docs-builder/Program.cs | Adds service registration and new command structure for docs-builder |
src/tooling/docs-assembler/Cli/ | Refactors assembler CLI commands to use service layer |
src/services/Elastic.Documentation.Services/ | New service layer with ServiceInvoker for command execution |
src/services/Elastic.Documentation.Assembler/ | Extracted assembler business logic into service classes |
src/services/Elastic.Documentation.Isolated/ | New isolated build service for standalone builds |
src/Elastic.Documentation.Links/ | Moved cross-link functionality to dedicated project |
src/tooling/Elastic.Documentation.Tooling/ | Updated diagnostics and filter infrastructure |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
src/services/Elastic.Documentation.Assembler/Building/SitemapBuilder.cs
Outdated
Show resolved
Hide resolved
src/Elastic.Documentation.Configuration/Navigation/GlobalNavigationFile.cs
Outdated
Show resolved
Hide resolved
src/tooling/Elastic.Documentation.Tooling/Filters/CatchExceptionFilter.cs
Outdated
Show resolved
Hide resolved
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…onFilter.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This PR is large apologies! One of those that has to be done in one big swoop.
This makes our tooling project's commands lightweight shims over services. These services can more easily be shared with other invokees (e.g an MCP server) and composed.
We've now merged
docs-assembler
intodocs-builder
All the commands are available under
docs assembler ..
with minor changes:Notably
content-source match
assembler content-source match
content-source validate
assembler content-source validate
deploy apply
assembler deploy apply
deploy plan
assembler deploy plan
deploy update-redirects
assembler deploy update-redirects
legacy-docs create-bloom-bin
assembler bloom-filter create
legacy-docs page-exists
assembler bloom-filter lookup
navigation validate
assembler navigation validate
navigation validate-link-reference
assembler navigation validate-link-reference
repo build-all
assembler build
repo clone-all
assembler clone
repo init-config
assembler config init
New commands
assembler serve
replaces
serve-static
ondocs-builder
assemble
You can now clone build and serve (if
--serve
) is passed the assembler build in one swoopIs the same as
Misc Fixes
When running in the IDE we were using
.artifacts/bin/.../.artifacts/...
as checkout and build folder. This is a waste of disk space and we now correctly.artifacts
in the root of the checkout.Uncaught exceptions now get reported as errors on DiagnosticCollector so its summary does not say
0 Erros
while printing an exception stacktrace. This now says1 error
.