[DE-4142] feat(release): emit step summaries for prep, build, publish#4770
Open
radTuti wants to merge 1 commit intotigera:masterfrom
Open
[DE-4142] feat(release): emit step summaries for prep, build, publish#4770radTuti wants to merge 1 commit intotigera:masterfrom
radTuti wants to merge 1 commit intotigera:masterfrom
Conversation
0a5a03a to
f942f05
Compare
f942f05 to
6757bed
Compare
Contributor
There was a problem hiding this comment.
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.WithSummarysupport/tests and use it forrelease prep,build, andpublish. - Move logging setup from command actions/pre-actions into
middleware.WithLoggingwrappingBefore. - 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.
6757bed to
14f9e4c
Compare
…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.
14f9e4c to
67b341d
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Wraps
prep,build, andpublishwithmiddleware.WithSummaryso each emits a step summary YAML tohack/release/_output/summary/<version>/<step>.yaml.Also reshapes
middleware.WithLoggingto wrapBeforeinstead ofAction, so log setup happens before eachBeforeruns (they log warnings worth capturing). All leaf commands now use it consistently.Refs: DE-4142
Release Note