InsertPreviousObjects
assumes APIs have already been generated
#471
Labels
bug
Something isn't working
InsertPreviousObjects
assumes APIs have already been generated
#471
What happened?
I'm prototyping a change to upjet that'd have it generate namespaced API types and controllers. See #470.
I'm testing my change with provider-upjet-aws. Part of that involves generating a completely new
apis-namespaced
directory. When I runmake generate
upjet panics when callingversionGen.InsertPreviousObjects
:I've spent all day staring at the
versionGen.InsertPreviousObjects
(introduced in #402) but I'm having a lot of trouble understanding what it does. It seems to me that the implementation doesn't match its Godoc or the description in #402.I think there's an order dependency issue:
v1beta1/zz_*_types.go
files for all guardduty resources into package scopeHowever at the time
InsertPreviousObjects
is called there's no guarantee thatv1beta1/zz_*_types.go
files exist for all guardduty resources. In fact the first time code generation runs, they definitely won't exist.How can we reproduce it?
In provider-upjet-aws delete all the generated files (and their directories, but not e.g.
generate.go
) underapis/
and runmake generate
.The text was updated successfully, but these errors were encountered: