Skip to content

Conversation

@matt-goldman
Copy link
Owner

Summary

Bake was failing with opaque error messages. This PR adds better logging, as well as a continue-on-error option for the CLI.

Additionally resolved an issue where content index generation would fail if any pages were missing tags.


🧷 This PR will be released as a preview by default.

To trigger a stable release:

  • Remove the preview label
  • Add the release label
  • Optionally add Semver-Minor or Semver-Major to control version bump

🏷️ Add labels to control release notes:

  • enhancement, bug, breaking-change, dependencies
  • Or use ignore-for-release to suppress it from notes

Copilot AI review requested due to automatic review settings August 15, 2025 06:51
@github-actions github-actions bot added preview Triggers a release of preview version of Nuget packages enhancement New feature or request Blake.CLI Blake.BuildTools labels Aug 15, 2025
Copy link
Contributor

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 enhances error handling and resilience in Blake's content generation process by adding better logging and a continue-on-error option to prevent build failures from stopping the entire process. The primary goal is to make the baking process more robust when encountering individual content generation errors.

  • Added --continueOnError CLI flag to allow builds to continue despite individual page failures
  • Enhanced error logging throughout the content generation pipeline
  • Fixed a bug where content index generation would fail if pages had null/missing tags

Reviewed Changes

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

File Description
src/Blake.CLI/Program.cs Added help text for the new --continueOnError CLI option
src/Blake.BuildTools/Generator/SiteGenerator.cs Implemented continue-on-error logic with enhanced exception handling and logging in the content baking process
src/Blake.BuildTools/Generator/ContentIndexBuilder.cs Added null-safe handling for page tags and continue-on-error support in content index generation

- Updated `ContentIndexBuilder` to correctly handle `page.Tags`.
- Added `ContinueOnError` and `Arguments` properties in `GeneratorOptions`.
- Simplified error handling in `SiteGenerator` using `options.ContinueOnError`.
- Removed `continueOnError` parameter from `BakeContent` method.
- Updated `Program` to initialize `ContinueOnError` from command-line arguments.
@matt-goldman matt-goldman merged commit 6cdb06a into main Aug 15, 2025
2 checks passed
@matt-goldman matt-goldman deleted the better-failure-logging-and-resiliance branch August 15, 2025 07:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Blake.BuildTools Blake.CLI enhancement New feature or request preview Triggers a release of preview version of Nuget packages

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants