Fix invalid codegen for compose/envoy/store_encode
Lapsus in component ident field caused too much logic to be removed from the generated code. This caused some _happy accidents_ when matching up to existing resources.
This commit is contained in:
@@ -352,7 +352,7 @@ func (e StoreEncoder) matchup{{.expIdent}}s(ctx context.Context, s store.Storer,
|
||||
var aux *types.{{.expIdent}}
|
||||
var ok bool
|
||||
for i, n := range nn {
|
||||
{{ if eq .componentIdent "compose" }}
|
||||
{{ if eq .component "compose" }}
|
||||
scope := scopes[i]
|
||||
if scope == nil {
|
||||
continue
|
||||
|
||||
25
server/compose/envoy/store_encode.gen.go
generated
25
server/compose/envoy/store_encode.gen.go
generated
@@ -295,6 +295,11 @@ func (e StoreEncoder) matchupCharts(ctx context.Context, s store.Storer, uu map[
|
||||
var ok bool
|
||||
for i, n := range nn {
|
||||
|
||||
scope := scopes[i]
|
||||
if scope == nil {
|
||||
continue
|
||||
}
|
||||
|
||||
for _, idf := range n.Identifiers.Slice {
|
||||
if id, err := strconv.ParseUint(idf, 10, 64); err == nil {
|
||||
aux, ok = idMap[id]
|
||||
@@ -525,6 +530,11 @@ func (e StoreEncoder) matchupModules(ctx context.Context, s store.Storer, uu map
|
||||
var ok bool
|
||||
for i, n := range nn {
|
||||
|
||||
scope := scopes[i]
|
||||
if scope == nil {
|
||||
continue
|
||||
}
|
||||
|
||||
for _, idf := range n.Identifiers.Slice {
|
||||
if id, err := strconv.ParseUint(idf, 10, 64); err == nil {
|
||||
aux, ok = idMap[id]
|
||||
@@ -742,6 +752,11 @@ func (e StoreEncoder) matchupModuleFields(ctx context.Context, s store.Storer, u
|
||||
var ok bool
|
||||
for i, n := range nn {
|
||||
|
||||
scope := scopes[i]
|
||||
if scope == nil {
|
||||
continue
|
||||
}
|
||||
|
||||
for _, idf := range n.Identifiers.Slice {
|
||||
if id, err := strconv.ParseUint(idf, 10, 64); err == nil {
|
||||
aux, ok = idMap[id]
|
||||
@@ -973,6 +988,11 @@ func (e StoreEncoder) matchupNamespaces(ctx context.Context, s store.Storer, uu
|
||||
var ok bool
|
||||
for i, n := range nn {
|
||||
|
||||
scope := scopes[i]
|
||||
if scope == nil {
|
||||
continue
|
||||
}
|
||||
|
||||
for _, idf := range n.Identifiers.Slice {
|
||||
if id, err := strconv.ParseUint(idf, 10, 64); err == nil {
|
||||
aux, ok = idMap[id]
|
||||
@@ -1186,6 +1206,11 @@ func (e StoreEncoder) matchupPages(ctx context.Context, s store.Storer, uu map[i
|
||||
var ok bool
|
||||
for i, n := range nn {
|
||||
|
||||
scope := scopes[i]
|
||||
if scope == nil {
|
||||
continue
|
||||
}
|
||||
|
||||
for _, idf := range n.Identifiers.Slice {
|
||||
if id, err := strconv.ParseUint(idf, 10, 64); err == nil {
|
||||
aux, ok = idMap[id]
|
||||
|
||||
Reference in New Issue
Block a user