Skip to content

Conversation

@Gearheads
Copy link
Collaborator

@Gearheads Gearheads commented Jul 11, 2025

What this PR does / why we need it:
This change will fix the make generate command. make generate was failing with no Go files in /path/to/fidelity/kconnect. Once that issue was resolved there was another issue with hack/tools/bin/conversion-gen using an unknown flag: --input-dirs and unknown flag: --output-file-base. I believe this is because the conversion-gen binary was upgraded, and the newer version of the binary no longer has these flags. Therefore, I have updated the commands to use the new flags.

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #
go generate error message:

% make generate
go generate
no Go files in /path/to/fidelity/kconnect
make: *** [generate] Error 1

hack/tools/bin/conversion-gen error message

% make generate
...
hack/tools/bin/conversion-gen \
		--input-dirs=./api/v1alpha1 \
		--output-file-base=zz_generated.conversion \
		--go-header-file=./hack/boilerplate.generatego.txt
unknown flag: --input-dirs
Usage of hack/tools/bin/conversion-gen:
      --add_dir_header                   If true, adds the file directory to the header of the log messages
      --alsologtostderr                  log to standard error as well as files (no effect when -logtostderr=true)
      --base-peer-dirs strings           Comma-separated list of apimachinery import paths which are considered, after tag-specified peers, for conversions. Only change these if you have very good reasons. (default [k8s.io/apimachinery/pkg/apis/meta/v1,k8s.io/apimachinery/pkg/conversion,k8s.io/apimachinery/pkg/runtime])
      --build-tag string                 A Go build tag to use to identify files generated by this command. Should be unique. (default "ignore_autogenerated")
      --extra-peer-dirs strings          Application specific comma-separated list of import paths which are considered, after tag-specified peers and base-peer-dirs, for conversions.
      --go-header-file string            the path to a file containing boilerplate header text; the string "YEAR" will be replaced with the current 4-digit year
      --log_backtrace_at traceLocation   when logging hits line file:N, emit a stack trace (default :0)
      --log_dir string                   If non-empty, write log files in this directory (no effect when -logtostderr=true)
      --log_file string                  If non-empty, use this log file (no effect when -logtostderr=true)
      --log_file_max_size uint           Defines the maximum size a log file can grow to (no effect when -logtostderr=true). Unit is megabytes. If the value is 0, the maximum file size is unlimited. (default 1800)
      --logtostderr                      log to standard error instead of files (default true)
      --one_output                       If true, only write logs to their native severity level (vs also writing to each lower severity level; no effect when -logtostderr=true)
      --output-file string               the name of the file to be generated (default "generated.conversion.go")
      --skip-unsafe                      If true, will not generate code using unsafe pointer conversions; resulting code may be slower.
      --skip_headers                     If true, avoid header prefixes in the log messages
      --skip_log_headers                 If true, avoid headers when opening log files (no effect when -logtostderr=true)
      --stderrthreshold severity         logs at or above this threshold go to stderr when writing to files and stderr (no effect when -logtostderr=true or -alsologtostderr=true) (default 2)
  -v, --v Level                          number for the log level verbosity
      --vmodule moduleSpec               comma-separated list of pattern=N settings for file-filtered logging
unknown flag: --input-dirs
make: *** [generate] Error 2

This branch can be deleted once it is merged.

This change will fix the make generate and make docs-generate command. make generate was failing with no Go files in /path/to/fidelity/kconnect. Once that issue was resolved there was another issue with hack/tools/bin/conversion-gen using an unknown flag: --input-dirs and unknown flag: --output-file-base. I believe this is because the conversion-gen binary was upgraded, and the newer version of the binary no longer has these flags. Therefore, I have updated the commands to use the new flags.

Signed-off-by: Casale, Robert <robert.casale@fmr.com>
@Gearheads Gearheads changed the title fix(Makefile): fix make generate and make docs-generate fix(Makefile): fix make generate Jul 11, 2025
@Gearheads Gearheads merged commit 5769b6c into main Jul 11, 2025
17 checks passed
@Gearheads Gearheads deleted the fix/make-instructions branch July 11, 2025 19:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants