Skip to content

[DE-4142] feat(release): emit step summaries for prep, build, publish#4770

Open
radTuti wants to merge 1 commit intotigera:masterfrom
radTuti:maestro-v0-summary-schema
Open

[DE-4142] feat(release): emit step summaries for prep, build, publish#4770
radTuti wants to merge 1 commit intotigera:masterfrom
radTuti:maestro-v0-summary-schema

Conversation

@radTuti
Copy link
Copy Markdown
Contributor

@radTuti radTuti commented May 4, 2026

Wraps prep, build, and publish with middleware.WithSummary so each emits a step summary YAML to hack/release/_output/summary/<version>/<step>.yaml.

Also reshapes middleware.WithLogging to wrap Before instead of Action, so log setup happens before each Before runs (they log warnings worth capturing). All leaf commands now use it consistently.

Refs: DE-4142

Release Note

TBD

@marvin-tigera marvin-tigera added this to the v1.43.0 milestone May 4, 2026
@radTuti radTuti force-pushed the maestro-v0-summary-schema branch 4 times, most recently from 0a5a03a to f942f05 Compare May 4, 2026 17:54
@radTuti radTuti changed the title [DE-4142] feat(release): wire prep, build, publish through WithSummary middleware [DE-4142] feat(release): emit step summaries for prep, build, publish May 4, 2026
@radTuti radTuti force-pushed the maestro-v0-summary-schema branch from f942f05 to 6757bed Compare May 4, 2026 21:55
@radTuti radTuti marked this pull request as ready for review May 4, 2026 21:55
@radTuti radTuti requested a review from a team as a code owner May 4, 2026 21:55
Copilot AI review requested due to automatic review settings May 4, 2026 21:55
Copy link
Copy Markdown
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

Adds release-step summary artifact generation for the release tooling so Maestro can consume structured status for key steps, and moves logging setup into Before hooks so pre-action validation logs are captured consistently.

Changes:

  • Add middleware.WithSummary support/tests and use it for release prep, build, and publish.
  • Move logging setup from command actions/pre-actions into middleware.WithLogging wrapping Before.
  • Ignore generated release summary output under hack/release/_output.

Reviewed changes

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

Show a summary per file
File Description
hack/release/releasenotes.go Switches release-notes logging setup to Before middleware.
hack/release/publish.go Adds summary emission to publish and moves logging setup into Before.
hack/release/public.go Switches public release command logging setup to Before middleware.
hack/release/prep.go Adds summary emission to prep and moves logging setup into Before.
hack/release/internal/middleware/summary.go Introduces/test-enables summary writing keyed by version/stream.
hack/release/internal/middleware/summary_test.go Adds unit coverage for summary writing and error-preservation behavior.
hack/release/internal/middleware/logging.go Changes logging middleware to wrap cli.BeforeFunc instead of actions.
hack/release/from.go Switches release-from logging setup to Before middleware.
hack/release/build.go Adds summary emission to build and moves logging setup into Before.
hack/release/branch.go Aligns branch commands with the new logging-wrapper placement.
hack/release/.gitignore Ignores generated release summary output.
.gitignore Formatting-only adjustment to the existing log ignore entry.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread hack/release/internal/middleware/summary.go
Comment thread hack/release/internal/middleware/summary.go
@radTuti radTuti force-pushed the maestro-v0-summary-schema branch from 6757bed to 14f9e4c Compare May 4, 2026 22:44
…iddleware

- prep, build, publish: wrap actions with middleware.WithSummary
  (step labels release-prep / release-build / release-publish);
  refactor action signatures to (version, outputs, error).
- Reshape middleware.WithLogging to wrap a cli.BeforeFunc instead
  of a cli.ActionFunc, so logging is configured before each Before
  runs (Before funcs themselves emit warnings worth capturing to
  the rotating log file).
- Wrap every leaf command's Before with middleware.WithLogging
  (cut, validate, prep, build, publish, github, notes, from) and
  drop the inline middleware.ConfigureLogging calls from each
  Before body.
- Drop the local hack/release/summary.go that pre-dated tigera#4687 and
  duplicated internal/middleware. Move its WriteSummary tests into
  hack/release/internal/middleware/summary_test.go.
- Add hack/release/_output to .gitignore.
@radTuti radTuti force-pushed the maestro-v0-summary-schema branch from 14f9e4c to 67b341d Compare May 6, 2026 00:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants