[RFE] Add bro-tool CLI for support use#908
Conversation
… kinds when omitted
|
There was a problem hiding this comment.
Pull request overview
This PR introduces a Go workspace and adds a new companion CLI (bro-tool) as a separate Go module, while consolidating version metadata into a shared package and updating CI/build tooling to support the multi-module layout.
Changes:
- Add
cmd/tool(“bro-tool”) as a standalone Go module and wire it into builds and release tooling. - Introduce
go.workworkspace management and update validation/CI to lint/sync modules consistently. - Move build-time version variables into
pkg/versionand update consumers (operator + objectstore) accordingly.
Reviewed changes
Copilot reviewed 27 out of 32 changed files in this pull request and generated 10 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/hull/main.go | Go formatting / minor test cleanup (composite literals, unused param). |
| tests/go.mod | Updates indirect dependencies for the tests module. |
| tests/go.sum | Dependency checksum updates for the tests module. |
| scripts/validate-ci | Runs go work sync to keep workspace sums in sync during CI validation. |
| scripts/validate | Lints each workspace module (., cmd/tool, tests) independently. |
| scripts/tidy | New helper to go mod tidy each module and then go work sync. |
| scripts/build | Switches ldflags to pkg/version and builds bro-tool binary. |
| README.md | Adds a top-level section describing bro-tool and links to full docs. |
| pkg/version/version.go | New shared version package + formatted version string helper. |
| pkg/objectstore/s3minio.go | Updates version import path to pkg/version. |
| go.work | Introduces workspace definition for root, cmd/tool, and tests. |
| go.sum | Root module checksum updates (notably easyjson, cobra/pflag, otlp http exporter, etc.). |
| go.mod | Root module dependency updates (easyjson, pflag, x/time, ansiterm, term, cobra, otlp http exporter). |
| docs/bro-tool.md | New end-user documentation for bro-tool. |
| DEVELOPING.md | Documents workspace/module layout and common dev workflows. |
| cmd/tool/README.md | Adds module-local README describing bro-tool usage and dev rules. |
| cmd/tool/main.go | Implements bro-tool entrypoint and command dispatch. |
| cmd/tool/internal/cmd/resourcesetview/cmd.go | Implements resource-set:view subcommand and output formatting. |
| cmd/tool/internal/cmd/resourcesetcheck/infer_crd_versions.go | Adds apiVersion inference for well-known kinds via scheme. |
| cmd/tool/internal/cmd/resourcesetcheck/cmd.go | Implements resource-set:check subcommand, parsing and output. |
| cmd/tool/internal/chart/render.go | Loads/renders chart and annotates selectors with source attribution. |
| cmd/tool/internal/chart/match.go | Implements offline selector matching logic and caveat reporting. |
| cmd/tool/internal/chart/fetch.go | Downloads/caches charts from GitHub releases for offline analysis. |
| cmd/tool/go.mod | New cmd/tool module definition and dependencies. |
| cmd/tool/go.sum | New dependency checksums for cmd/tool module. |
| cmd/operator/version/version.go | Removes old operator-local version variables (moved to pkg/version). |
| cmd/operator/main.go | Adds --version support and switches to shared pkg/version. |
| .goreleaser.yaml | Updates ldflags to pkg/version and adds a bro-tool build. |
| .golangci.yaml | Adds revive exclusion for new pkg/version vars. |
| .gitignore | Adjusts ignored binary names / patterns. |
| .github/workflows/ci.yaml | Adds workspace sync check + runs golangci-lint per module. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Samuel Vasconcelos <samuel.vasconcelos@suse.com>
… a dedicated function
Introduces
bro-tool, a companion CLI for support engineers and developers working with the Backup and Restore Operator.The tool operates entirely offline — it fetches or reads a BRO helm chart and inspects its bundled ResourceSet configuration without requiring a live cluster.
What's included:
Note
bro-tool is explicitly out-of-scope for SUSE/Rancher support SLAs and is documented as such.