Change:
When working on I a strange issue. It seems that while auto-generating conversions it works fine, but during things like or in the presubmits what is generated is different. Looking into test results: it seems that the order in which the files are processed is different then. /kind bug /sig api-machinery
FTR: The log from above has some debug-logging and panics and the conversion-generator logs are those with
/assign
modifies conversion-gen, but doesn't change the generated files. Did you intentionally exclude those changes? I wonder if it's similar to I checked out , ran I was able to reproduce the error in If that's the case, a workaround to fix the auto-generating is to first remove the affected files and re-generate them locally.
This is supposed to be no-op :) no auto-generated files should change That's not the fix. The problem is with the test jobs themselves: for generating swagger doc, they actually generate different things than they generate when you call "make generated-files" My PR is only a trigger for the problem, it's not a root cause. The auto-generated files are correct, but as part of running swagger docs, we're in-process generating a different stuff.
It looks that packages were missing. has a shorter / list compared to the other checks (e.g. ) when I ran . In the case of , the component-base config package was missing, thus the FIXME code path got hit. The list of packages was derived from . It seems that the dir was dirty during . I'm exploring if we can clean up the dir like does.
It seems that this one isn't yet fully fixed. I have updated the based on the comments on it and a similar issue on that (which I think has a very similar root cause). However, now "govet" and "staticcheck" are failing: [Ironically all other tests are passing, so I think this is again connected to some garbage somewhere] - can you please help with this?
As previously, I can reproduce it by:
I'm fairly sure at this point that the inputdirs param here is too restrictive:
It seems that this commit might be addressing this:
Heh - I think it helped me locally, but it doesn't help for - I probably did something wrong. But I'm fairly sure it's something along those lines that we need to do. - will you be able to help with it?
So yeah - I was completely wrong. Basically, running with with DBG it clearly is a problem with gen-conversion. And the problem is that we pass only limited input to it: I think we should always pass all inputs - but we should look a bit deeper into it.
OK - so this is the problematic part: We basically process only packages that are explicitly requested by the user and ignore ones that are imported. So in order to have the conversion func imported by the generator, the package where it lives has to be explicitly imported. So we should basically always pass all input packages to conversion generator.
I actually created a new one, as it seems to be a different thing. Closing in favor of
/triage accepted

Discussion:
kube::golang::setup_env <del> make -C "${KUBE_ROOT}" WHAT=cmd/genswaggertypedocs # Find binary genswaggertypedocs=$(kube::util::find-binary "genswaggertypedocs") if [[ ! -x "$genswaggertypedocs" ]]; then { echo "It looks as if you don't have a compiled genswaggertypedocs binary" echo echo "If you are running from a clone of the git repo, please run" echo "'make WHAT=cmd/genswaggertypedocs'." } >&2 exit 1 fi </del> _tmpdir="$(kube::realpath "$(mktemp -d -t swagger-docs.XXXXXX)")" function swagger_cleanup { rm -rf "${_tmpdir}"