Skip to content

Conversation

@swghosh
Copy link
Member

@swghosh swghosh commented Aug 25, 2025

  • Adds a make target to install *-gen tools
  • Updates generated openapi and deepcopy code

* to go install controller-gen and kube-openapi-gen

The `go-get-tool` define from boilerplate was not useful.

Signed-off-by: Swarup Ghosh <[email protected]>
* the kube-openapi-gen uses different flags from that of standard openapi-gen
* controller-gen and openapi-gen binaries used were from path, using from ./bin/ instead

Signed-off-by: Swarup Ghosh <[email protected]>
Signed-off-by: Swarup Ghosh <[email protected]>
@swghosh
Copy link
Member Author

swghosh commented Aug 25, 2025

/cc @rausingh-rh

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Aug 25, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: swghosh

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 25, 2025
@swghosh swghosh removed the request for review from vaidehi411 August 25, 2025 11:30
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Nov 24, 2025

@swghosh: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/validate-boilerplate c4752e2 link false /test validate-boilerplate
ci/prow/ci-bundle-must-gather-operator-bundle c4752e2 link true /test ci-bundle-must-gather-operator-bundle
ci/prow/images c4752e2 link true /test images
ci/prow/coverage c4752e2 link true /test coverage
ci/prow/test c4752e2 link true /test test
ci/prow/lint c4752e2 link true /test lint
ci/prow/e2e-gcp-operator c4752e2 link true /test e2e-gcp-operator

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

@openshift-merge-robot openshift-merge-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Nov 24, 2025
@openshift-merge-robot
Copy link
Contributor

PR needs rebase.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@coderabbitai
Copy link

coderabbitai bot commented Nov 24, 2025

Walkthrough

The PR updates the project's tooling infrastructure by introducing a Makefile target to install controller-gen and openapi-gen binaries, reorganizes tool dependencies into a dedicated tools/tools.go file, updates numerous Go module dependencies to newer versions including Kubernetes tooling packages, and removes OpenAPI schema generation for ProxySpec from the generated definitions.

Changes

Cohort / File(s) Summary
Build and tooling configuration
.gitignore, Makefile, tools.go, tools/tools.go
Added .gitignore entry for bin/ directory; introduced OPENAPI_GEN_PKG and CONTROLLER_GEN_PKG variables in Makefile; created go-install-tool macro and install-tools phony target; moved tool dependencies from root-level tools.go to new tools/tools.go with blank imports for controller-gen and openapi-gen.
Go module dependencies
go.mod
Bumped ginkgo/v2 from v2.22.0 to v2.23.3 and gomega from v1.36.1 to v1.37.0; updated k8s.io/kube-openapi and added k8s.io/controller-tools v0.18.0; added multiple new indirect dependencies (fatih/color, gobuffalo/flect, mattn/go-colorable, mattn/go-isatty, inconshreveable/mousetrap); updated golang.org/x/\* modules (crypto, net, mod, sys, term, text, time, tools) to newer versions; added k8s.io/code-generator v0.33.0 and k8s.io/gengo/v2; updated google/gnostic-models and google/pprof.
Makefile OpenAPI generation
boilerplate/openshift/golang-osd-operator/standard.mk
Updated CONTROLLER_GEN to ../bin/controller-gen and OPENAPI_GEN to ./bin/openapi-gen; refactored openapi-generate target flags from multi-option format to streamlined set including --logtostderr, --output-dir ./api/v1alpha1, --output-pkg my.module/api/v1alpha1, --output-file zz_generated.openapi.go, --go-header-file /dev/null, and --report-filename -.
Generated OpenAPI definitions
api/v1alpha1/zz_generated.openapi.go
Removed ProxySpec schema generation logic; GetOpenAPIDefinitions now returns empty map instead of registering ProxySpec.
CRD manifest
deploy/crds/managed.openshift.io_mustgathers.yaml
Updated controller-gen Kubebuilder version annotation from v0.18.1-0.20250818134112-b624019bbe8d to v0.18.0.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

  • go.mod: Extensive dependency updates with numerous version bumps and new indirect dependencies; verify compatibility across all Kubernetes and testing packages
  • Makefile and tooling: Review the go-install-tool macro logic and tool installation paths for correctness and platform compatibility
  • OpenAPI schema removal: Verify that removing ProxySpec schema generation from zz_generated.openapi.go is intentional and does not break API documentation or client generation
  • Migration from tools.go to tools/tools.go: Ensure the tool dependency imports are correctly specified and module resolution behaves as intended
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (1)
boilerplate/openshift/golang-osd-operator/standard.mk (1)

205-206: Tool paths are context-dependent and potentially fragile.

The inconsistent path prefixes (../bin/controller-gen vs ./bin/openapi-gen) reflect different execution contexts: CONTROLLER_GEN is used after cd ./api (line 213), while OPENAPI_GEN runs from the repository root. While functionally correct, this makes the build system fragile if invocation contexts change.

Consider using absolute paths derived from $(shell pwd) to make the build more robust:

REPO_ROOT := $(shell pwd)
CONTROLLER_GEN = $(REPO_ROOT)/bin/controller-gen
OPENAPI_GEN = $(REPO_ROOT)/bin/openapi-gen
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

Cache: Disabled due to data retention organization setting

Knowledge base: Disabled due to Reviews -> Disable Knowledge Base setting

📥 Commits

Reviewing files that changed from the base of the PR and between 390929e and c4752e2.

⛔ Files ignored due to path filters (292)
  • go.sum is excluded by !**/*.sum
  • vendor/github.com/fatih/color/LICENSE.md is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/fatih/color/README.md is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/fatih/color/color.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/fatih/color/color_windows.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/fatih/color/doc.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/gobuffalo/flect/.gitignore is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/gobuffalo/flect/.gometalinter.json is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/gobuffalo/flect/LICENSE is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/gobuffalo/flect/Makefile is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/gobuffalo/flect/README.md is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/gobuffalo/flect/SHOULDERS.md is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/gobuffalo/flect/acronyms.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/gobuffalo/flect/camelize.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/gobuffalo/flect/capitalize.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/gobuffalo/flect/custom_data.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/gobuffalo/flect/dasherize.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/gobuffalo/flect/flect.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/gobuffalo/flect/humanize.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/gobuffalo/flect/ident.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/gobuffalo/flect/lower_upper.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/gobuffalo/flect/ordinalize.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/gobuffalo/flect/pascalize.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/gobuffalo/flect/plural_rules.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/gobuffalo/flect/pluralize.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/gobuffalo/flect/rule.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/gobuffalo/flect/singular_rules.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/gobuffalo/flect/singularize.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/gobuffalo/flect/titleize.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/gobuffalo/flect/underscore.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/gobuffalo/flect/version.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/google/gnostic-models/compiler/context.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/google/gnostic-models/compiler/extensions.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/google/gnostic-models/compiler/helpers.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/google/gnostic-models/compiler/reader.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/google/gnostic-models/jsonschema/models.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/google/gnostic-models/jsonschema/reader.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/google/gnostic-models/jsonschema/writer.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/google/gnostic-models/openapiv2/OpenAPIv2.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/google/gnostic-models/openapiv2/document.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/google/gnostic-models/openapiv3/OpenAPIv3.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/google/gnostic-models/openapiv3/document.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/inconshreveable/mousetrap/LICENSE is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/inconshreveable/mousetrap/README.md is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/inconshreveable/mousetrap/trap_others.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/inconshreveable/mousetrap/trap_windows.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/mattn/go-colorable/LICENSE is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/mattn/go-colorable/README.md is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/mattn/go-colorable/colorable_appengine.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/mattn/go-colorable/colorable_others.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/mattn/go-colorable/colorable_windows.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/mattn/go-colorable/go.test.sh is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/mattn/go-colorable/noncolorable.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/mattn/go-isatty/LICENSE is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/mattn/go-isatty/README.md is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/mattn/go-isatty/doc.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/mattn/go-isatty/go.test.sh is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/mattn/go-isatty/isatty_bsd.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/mattn/go-isatty/isatty_others.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/mattn/go-isatty/isatty_plan9.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/mattn/go-isatty/isatty_solaris.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/mattn/go-isatty/isatty_tcgets.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/mattn/go-isatty/isatty_windows.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/ginkgo/v2/.gitignore is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/ginkgo/v2/CHANGELOG.md is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/ginkgo/v2/README.md is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/ginkgo/v2/core_dsl.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/ginkgo/v2/deprecated_dsl.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/ginkgo/v2/formatter/formatter.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/ginkgo/v2/ginkgo/build/build_command.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/ginkgo/v2/ginkgo/command/abort.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/ginkgo/v2/ginkgo/command/command.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/ginkgo/v2/ginkgo/command/program.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/ginkgo/v2/ginkgo/internal/compile.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/ginkgo/v2/ginkgo/internal/gocovmerge.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/ginkgo/v2/ginkgo/outline/outline.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/ginkgo/v2/ginkgo/run/run_command.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/ginkgo/v2/ginkgo/watch/watch_command.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/ginkgo/v2/ginkgo_t_dsl.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/ginkgo/v2/internal/failer.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/ginkgo/v2/internal/interrupt_handler/interrupt_handler.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/ginkgo/v2/internal/node.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/ginkgo/v2/internal/output_interceptor.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/ginkgo/v2/internal/output_interceptor_unix.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/ginkgo/v2/internal/parallel_support/client_server.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/ginkgo/v2/internal/parallel_support/http_client.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/ginkgo/v2/internal/parallel_support/http_server.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/ginkgo/v2/internal/parallel_support/rpc_client.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/ginkgo/v2/internal/parallel_support/rpc_server.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/ginkgo/v2/internal/parallel_support/server_handler.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/ginkgo/v2/internal/report_entry.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/ginkgo/v2/internal/suite.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/ginkgo/v2/internal/testingtproxy/testing_t_proxy.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/ginkgo/v2/internal/writer.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/ginkgo/v2/reporters/default_reporter.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/ginkgo/v2/reporting_dsl.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/ginkgo/v2/table_dsl.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/ginkgo/v2/types/config.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/ginkgo/v2/types/deprecated_types.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/ginkgo/v2/types/errors.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/ginkgo/v2/types/flags.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/ginkgo/v2/types/label_filter.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/ginkgo/v2/types/report_entry.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/ginkgo/v2/types/version.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/gomega/CHANGELOG.md is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/gomega/format/format.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/gomega/gcustom/make_matcher.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/gomega/gomega_dsl.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/gomega/internal/assertion.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/gomega/internal/async_assertion.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/gomega/internal/duration_bundle.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/gomega/internal/gomega.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/gomega/internal/polling_signal_error.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/gomega/internal/vetoptdesc.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/gomega/matchers.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/gomega/matchers/and.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/gomega/matchers/assignable_to_type_of_matcher.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/gomega/matchers/be_a_directory.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/gomega/matchers/be_a_regular_file.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/gomega/matchers/be_an_existing_file.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/gomega/matchers/be_closed_matcher.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/gomega/matchers/be_comparable_to_matcher.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/gomega/matchers/be_element_of_matcher.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/gomega/matchers/be_empty_matcher.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/gomega/matchers/be_equivalent_to_matcher.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/gomega/matchers/be_false_matcher.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/gomega/matchers/be_identical_to.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/gomega/matchers/be_key_of_matcher.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/gomega/matchers/be_nil_matcher.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/gomega/matchers/be_numerically_matcher.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/gomega/matchers/be_sent_matcher.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/gomega/matchers/be_temporally_matcher.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/gomega/matchers/be_true_matcher.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/gomega/matchers/be_zero_matcher.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/gomega/matchers/consist_of.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/gomega/matchers/contain_element_matcher.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/gomega/matchers/contain_elements_matcher.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/gomega/matchers/contain_substring_matcher.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/gomega/matchers/equal_matcher.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/gomega/matchers/have_cap_matcher.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/gomega/matchers/have_each_matcher.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/gomega/matchers/have_exact_elements.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/gomega/matchers/have_existing_field_matcher.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/gomega/matchers/have_field.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/gomega/matchers/have_http_body_matcher.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/gomega/matchers/have_http_header_with_value_matcher.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/gomega/matchers/have_http_status_matcher.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/gomega/matchers/have_key_matcher.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/gomega/matchers/have_key_with_value_matcher.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/gomega/matchers/have_len_matcher.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/gomega/matchers/have_occurred_matcher.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/gomega/matchers/have_prefix_matcher.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/gomega/matchers/have_suffix_matcher.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/gomega/matchers/have_value.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/gomega/matchers/match_error_matcher.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/gomega/matchers/match_json_matcher.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/gomega/matchers/match_regexp_matcher.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/gomega/matchers/match_xml_matcher.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/gomega/matchers/match_yaml_matcher.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/gomega/matchers/not.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/gomega/matchers/or.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/gomega/matchers/panic_matcher.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/gomega/matchers/receive_matcher.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/gomega/matchers/satisfy_matcher.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/gomega/matchers/semi_structured_data_support.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/gomega/matchers/succeed_matcher.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/gomega/matchers/support/goraph/bipartitegraph/bipartitegraph.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/gomega/matchers/support/goraph/node/node.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/gomega/matchers/type_support.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/gomega/matchers/with_transform.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/gomega/types/types.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/spf13/cobra/.gitignore is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/spf13/cobra/.golangci.yml is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/spf13/cobra/.mailmap is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/spf13/cobra/CONDUCT.md is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/spf13/cobra/CONTRIBUTING.md is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/spf13/cobra/LICENSE.txt is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/spf13/cobra/MAINTAINERS is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/spf13/cobra/Makefile is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/spf13/cobra/README.md is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/spf13/cobra/active_help.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/spf13/cobra/args.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/spf13/cobra/bash_completions.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/spf13/cobra/bash_completionsV2.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/spf13/cobra/cobra.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/spf13/cobra/command.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/spf13/cobra/command_notwin.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/spf13/cobra/command_win.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/spf13/cobra/completions.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/spf13/cobra/fish_completions.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/spf13/cobra/flag_groups.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/spf13/cobra/powershell_completions.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/spf13/cobra/shell_completions.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/spf13/cobra/zsh_completions.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/spf13/pflag/.editorconfig is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/spf13/pflag/.golangci.yaml is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/spf13/pflag/flag.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/spf13/pflag/ip.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/spf13/pflag/ipnet_slice.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/spf13/pflag/string_array.go is excluded by !vendor/**, !**/vendor/**
  • vendor/go.yaml.in/yaml/v2/.travis.yml is excluded by !vendor/**, !**/vendor/**
  • vendor/go.yaml.in/yaml/v2/LICENSE is excluded by !vendor/**, !**/vendor/**
  • vendor/go.yaml.in/yaml/v2/LICENSE.libyaml is excluded by !vendor/**, !**/vendor/**
  • vendor/go.yaml.in/yaml/v2/NOTICE is excluded by !vendor/**, !**/vendor/**
  • vendor/go.yaml.in/yaml/v2/README.md is excluded by !vendor/**, !**/vendor/**
  • vendor/go.yaml.in/yaml/v2/apic.go is excluded by !vendor/**, !**/vendor/**
  • vendor/go.yaml.in/yaml/v2/decode.go is excluded by !vendor/**, !**/vendor/**
  • vendor/go.yaml.in/yaml/v2/emitterc.go is excluded by !vendor/**, !**/vendor/**
  • vendor/go.yaml.in/yaml/v2/encode.go is excluded by !vendor/**, !**/vendor/**
  • vendor/go.yaml.in/yaml/v2/parserc.go is excluded by !vendor/**, !**/vendor/**
  • vendor/go.yaml.in/yaml/v2/readerc.go is excluded by !vendor/**, !**/vendor/**
  • vendor/go.yaml.in/yaml/v2/resolve.go is excluded by !vendor/**, !**/vendor/**
  • vendor/go.yaml.in/yaml/v2/scannerc.go is excluded by !vendor/**, !**/vendor/**
  • vendor/go.yaml.in/yaml/v2/sorter.go is excluded by !vendor/**, !**/vendor/**
  • vendor/go.yaml.in/yaml/v2/writerc.go is excluded by !vendor/**, !**/vendor/**
  • vendor/go.yaml.in/yaml/v2/yaml.go is excluded by !vendor/**, !**/vendor/**
  • vendor/go.yaml.in/yaml/v2/yamlh.go is excluded by !vendor/**, !**/vendor/**
  • vendor/go.yaml.in/yaml/v2/yamlprivateh.go is excluded by !vendor/**, !**/vendor/**
  • vendor/go.yaml.in/yaml/v3/LICENSE is excluded by !vendor/**, !**/vendor/**
  • vendor/go.yaml.in/yaml/v3/NOTICE is excluded by !vendor/**, !**/vendor/**
  • vendor/go.yaml.in/yaml/v3/README.md is excluded by !vendor/**, !**/vendor/**
  • vendor/go.yaml.in/yaml/v3/apic.go is excluded by !vendor/**, !**/vendor/**
  • vendor/go.yaml.in/yaml/v3/decode.go is excluded by !vendor/**, !**/vendor/**
  • vendor/go.yaml.in/yaml/v3/emitterc.go is excluded by !vendor/**, !**/vendor/**
  • vendor/go.yaml.in/yaml/v3/encode.go is excluded by !vendor/**, !**/vendor/**
  • vendor/go.yaml.in/yaml/v3/parserc.go is excluded by !vendor/**, !**/vendor/**
  • vendor/go.yaml.in/yaml/v3/readerc.go is excluded by !vendor/**, !**/vendor/**
  • vendor/go.yaml.in/yaml/v3/resolve.go is excluded by !vendor/**, !**/vendor/**
  • vendor/go.yaml.in/yaml/v3/scannerc.go is excluded by !vendor/**, !**/vendor/**
  • vendor/go.yaml.in/yaml/v3/sorter.go is excluded by !vendor/**, !**/vendor/**
  • vendor/go.yaml.in/yaml/v3/writerc.go is excluded by !vendor/**, !**/vendor/**
  • vendor/go.yaml.in/yaml/v3/yaml.go is excluded by !vendor/**, !**/vendor/**
  • vendor/go.yaml.in/yaml/v3/yamlh.go is excluded by !vendor/**, !**/vendor/**
  • vendor/go.yaml.in/yaml/v3/yamlprivateh.go is excluded by !vendor/**, !**/vendor/**
  • vendor/golang.org/x/mod/LICENSE is excluded by !vendor/**, !**/vendor/**
  • vendor/golang.org/x/mod/PATENTS is excluded by !vendor/**, !**/vendor/**
  • vendor/golang.org/x/mod/internal/lazyregexp/lazyre.go is excluded by !vendor/**, !**/vendor/**
  • vendor/golang.org/x/mod/module/module.go is excluded by !vendor/**, !**/vendor/**
  • vendor/golang.org/x/mod/module/pseudo.go is excluded by !vendor/**, !**/vendor/**
  • vendor/golang.org/x/mod/semver/semver.go is excluded by !vendor/**, !**/vendor/**
  • vendor/golang.org/x/net/context/context.go is excluded by !vendor/**, !**/vendor/**
  • vendor/golang.org/x/sync/errgroup/errgroup.go is excluded by !vendor/**, !**/vendor/**
  • vendor/golang.org/x/sys/unix/syscall_darwin.go is excluded by !vendor/**, !**/vendor/**
  • vendor/golang.org/x/sys/unix/syscall_linux.go is excluded by !vendor/**, !**/vendor/**
  • vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.go is excluded by !vendor/**, !**/vendor/**
  • vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.s is excluded by !vendor/**, !**/vendor/**
  • vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.go is excluded by !vendor/**, !**/vendor/**
  • vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.s is excluded by !vendor/**, !**/vendor/**
  • vendor/golang.org/x/sys/windows/types_windows.go is excluded by !vendor/**, !**/vendor/**
  • vendor/golang.org/x/term/terminal.go is excluded by !vendor/**, !**/vendor/**
  • vendor/golang.org/x/tools/go/ast/astutil/enclosing.go is excluded by !vendor/**, !**/vendor/**
  • vendor/golang.org/x/tools/go/ast/astutil/imports.go is excluded by !vendor/**, !**/vendor/**
  • vendor/golang.org/x/tools/go/ast/astutil/rewrite.go is excluded by !vendor/**, !**/vendor/**
  • vendor/golang.org/x/tools/go/ast/astutil/util.go is excluded by !vendor/**, !**/vendor/**
  • vendor/golang.org/x/tools/go/ast/inspector/inspector.go is excluded by !vendor/**, !**/vendor/**
  • vendor/golang.org/x/tools/go/ast/inspector/iter.go is excluded by !vendor/**, !**/vendor/**
  • vendor/golang.org/x/tools/go/ast/inspector/typeof.go is excluded by !vendor/**, !**/vendor/**
  • vendor/golang.org/x/tools/go/ast/inspector/walk.go is excluded by !vendor/**, !**/vendor/**
  • vendor/golang.org/x/tools/go/gcexportdata/gcexportdata.go is excluded by !vendor/**, !**/vendor/**
  • vendor/golang.org/x/tools/go/gcexportdata/importer.go is excluded by !vendor/**, !**/vendor/**
  • vendor/golang.org/x/tools/go/packages/doc.go is excluded by !vendor/**, !**/vendor/**
  • vendor/golang.org/x/tools/go/packages/external.go is excluded by !vendor/**, !**/vendor/**
  • vendor/golang.org/x/tools/go/packages/golist.go is excluded by !vendor/**, !**/vendor/**
  • vendor/golang.org/x/tools/go/packages/golist_overlay.go is excluded by !vendor/**, !**/vendor/**
  • vendor/golang.org/x/tools/go/packages/loadmode_string.go is excluded by !vendor/**, !**/vendor/**
  • vendor/golang.org/x/tools/go/packages/packages.go is excluded by !vendor/**, !**/vendor/**
  • vendor/golang.org/x/tools/go/packages/visit.go is excluded by !vendor/**, !**/vendor/**
  • vendor/golang.org/x/tools/go/types/objectpath/objectpath.go is excluded by !vendor/**, !**/vendor/**
  • vendor/golang.org/x/tools/go/types/typeutil/callee.go is excluded by !vendor/**, !**/vendor/**
  • vendor/golang.org/x/tools/go/types/typeutil/imports.go is excluded by !vendor/**, !**/vendor/**
  • vendor/golang.org/x/tools/go/types/typeutil/map.go is excluded by !vendor/**, !**/vendor/**
  • vendor/golang.org/x/tools/go/types/typeutil/methodsetcache.go is excluded by !vendor/**, !**/vendor/**
  • vendor/golang.org/x/tools/go/types/typeutil/ui.go is excluded by !vendor/**, !**/vendor/**
  • vendor/golang.org/x/tools/imports/forward.go is excluded by !vendor/**, !**/vendor/**
  • vendor/golang.org/x/tools/internal/aliases/aliases.go is excluded by !vendor/**, !**/vendor/**
  • vendor/golang.org/x/tools/internal/aliases/aliases_go122.go is excluded by !vendor/**, !**/vendor/**
  • vendor/golang.org/x/tools/internal/astutil/edge/edge.go is excluded by !vendor/**, !**/vendor/**
  • vendor/golang.org/x/tools/internal/event/core/event.go is excluded by !vendor/**, !**/vendor/**
  • vendor/golang.org/x/tools/internal/event/core/export.go is excluded by !vendor/**, !**/vendor/**
  • vendor/golang.org/x/tools/internal/event/core/fast.go is excluded by !vendor/**, !**/vendor/**
  • vendor/golang.org/x/tools/internal/event/doc.go is excluded by !vendor/**, !**/vendor/**
  • vendor/golang.org/x/tools/internal/event/event.go is excluded by !vendor/**, !**/vendor/**
  • vendor/golang.org/x/tools/internal/event/keys/keys.go is excluded by !vendor/**, !**/vendor/**
  • vendor/golang.org/x/tools/internal/event/keys/standard.go is excluded by !vendor/**, !**/vendor/**
  • vendor/golang.org/x/tools/internal/event/keys/util.go is excluded by !vendor/**, !**/vendor/**
  • vendor/golang.org/x/tools/internal/event/label/label.go is excluded by !vendor/**, !**/vendor/**
  • vendor/golang.org/x/tools/internal/gcimporter/bimport.go is excluded by !vendor/**, !**/vendor/**
  • vendor/golang.org/x/tools/internal/gcimporter/exportdata.go is excluded by !vendor/**, !**/vendor/**
  • vendor/golang.org/x/tools/internal/gcimporter/gcimporter.go is excluded by !vendor/**, !**/vendor/**
  • vendor/golang.org/x/tools/internal/gcimporter/iexport.go is excluded by !vendor/**, !**/vendor/**
  • vendor/golang.org/x/tools/internal/gcimporter/iimport.go is excluded by !vendor/**, !**/vendor/**
  • vendor/golang.org/x/tools/internal/gcimporter/iimport_go122.go is excluded by !vendor/**, !**/vendor/**
📒 Files selected for processing (8)
  • .gitignore (1 hunks)
  • Makefile (1 hunks)
  • api/v1alpha1/zz_generated.openapi.go (1 hunks)
  • boilerplate/openshift/golang-osd-operator/standard.mk (2 hunks)
  • deploy/crds/managed.openshift.io_mustgathers.yaml (1 hunks)
  • go.mod (7 hunks)
  • tools.go (0 hunks)
  • tools/tools.go (1 hunks)
💤 Files with no reviewable changes (1)
  • tools.go
🧰 Additional context used
📓 Path-based instructions (1)
**

⚙️ CodeRabbit configuration file

-Focus on major issues impacting performance, readability, maintainability and security. Avoid nitpicks and avoid verbosity.

Files:

  • api/v1alpha1/zz_generated.openapi.go
  • boilerplate/openshift/golang-osd-operator/standard.mk
  • tools/tools.go
  • deploy/crds/managed.openshift.io_mustgathers.yaml
  • Makefile
  • go.mod
🪛 checkmake (0.2.2)
Makefile

[warning] 23-23: Missing required phony target "all"

(minphony)


[warning] 23-23: Missing required phony target "clean"

(minphony)


[warning] 23-23: Missing required phony target "test"

(minphony)

🔇 Additional comments (8)
.gitignore (1)

90-91: LGTM!

The addition of bin/ to ignore binaries produced by the new install-tools target is appropriate and necessary.

deploy/crds/managed.openshift.io_mustgathers.yaml (1)

6-6: LGTM!

The controller-gen version annotation update to v0.18.0 aligns with the tooling changes in the PR and matches the version in go.mod.

tools/tools.go (1)

1-10: LGTM!

This follows the standard Go pattern for declaring tool dependencies as side-effect imports, ensuring go mod downloads and manages these tools correctly.

Makefile (1)

23-26: LGTM!

The install-tools target correctly uses the macro to install both controller-gen and openapi-gen into the bin/ directory.

boilerplate/openshift/golang-osd-operator/standard.mk (1)

217-226: LGTM!

The openapi-generate target correctly invokes the new tool with appropriate flags for output directory, package, and file generation.

go.mod (2)

8-9: LGTM!

The dependency updates for testing frameworks (ginkgo/gomega), kube-openapi, and controller-tools align with the tooling infrastructure changes and support the new install-tools workflow.

Also applies to: 19-19, 21-21


36-115: Dependency updates look consistent.

The indirect dependency updates across the Go ecosystem (stdlib extensions, Kubernetes tooling, formatting libraries) are routine version bumps that support the tooling changes.

api/v1alpha1/zz_generated.openapi.go (1)

12-14: Clarify whether the empty OpenAPI definitions are intentional or a side effect of code generation.

The file is auto-generated by openapi-gen, but a discrepancy exists: the // +k8s:openapi-gen=true marker remains on line 64 of mustgather_types.go, yet the generated zz_generated.openapi.go returns an empty map despite struct types (MustGatherSpec, ProxySpec, MustGather, etc.) being defined.

Either:

  1. Remove the // +k8s:openapi-gen=true marker if OpenAPI schemas are no longer needed for this API version, or
  2. Investigate why the marker is present but no schemas are generated.

This inconsistency should be clarified to avoid confusion during future maintenance.

Comment on lines +12 to +21
# go-install-tool will 'go install' any package $2 and install it to $1.
define go-install-tool
@{ \
set -e ;\
echo "Downloading $(2)" ;\
GOBIN=$(shell dirname $(1)) go install $(2) ;\
echo "Installed in $(1)" ;\
rm -rf $$TMP_DIR ;\
}
endef
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Remove unused TMP_DIR cleanup.

The macro references $$TMP_DIR on line 19 but never creates it. This appears to be residual code from a copy-paste of the go-get-tool macro in standard.mk (which does create and use TMP_DIR).

Apply this diff to remove the unused cleanup:

 define go-install-tool
 @{ \
 set -e ;\
 echo "Downloading $(2)" ;\
 GOBIN=$(shell dirname $(1)) go install $(2) ;\
 echo "Installed in $(1)" ;\
-rm -rf $$TMP_DIR ;\
 }
 endef
🤖 Prompt for AI Agents
In Makefile around lines 12 to 21, the go-install-tool macro calls rm -rf
$$TMP_DIR even though TMP_DIR is never created or used; remove the unused
cleanup line (rm -rf $$TMP_DIR) from the macro so it no longer references a
non-existent TMP_DIR and leave the rest of the macro intact.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants