Skip to content

Commit

Permalink
fix: ensuring consumer-group scoped plugins show tags
Browse files Browse the repository at this point in the history
On running deck file render command, tags were
coming up for global and service/route scoped
plugins. However, for consumer-group scoped
plugins, the tags did not populate. This was because
the underlying struct did not have tags in the first
place.

This change updates the underlying struct for
consumer-group plugins by adding tags to them
as well. This will ensure that tags show up
during deck file render.
For: Kong/deck#1417
  • Loading branch information
Prashansa-K committed Dec 2, 2024
1 parent 4c15b26 commit a26ac5c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions pkg/file/builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ func (b *stateBuilder) ingestConsumerGroupScopedPlugins(cg FConsumerGroupObject)
ConsumerGroup: &kong.ConsumerGroup{
ID: cg.ID,
},
Tags: plugin.Tags,
},
ConfigSource: plugin.ConfigSource,
})
Expand Down
1 change: 1 addition & 0 deletions pkg/file/writer.go
Original file line number Diff line number Diff line change
Expand Up @@ -856,6 +856,7 @@ func populateConsumerGroups(kongState *state.KongState, file *Content,
ID: plugin.ID,
Name: plugin.Name,
Config: plugin.Config,
Tags: plugin.Tags,
})
}
}
Expand Down
1 change: 1 addition & 0 deletions pkg/state/builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ func buildKong(kongState *KongState, raw *utils.KongRawState) error {
Config: p.Config,
ConsumerGroup: cg.ConsumerGroup,
ConfigSource: p.ConfigSource,
Tags: p.Tags,

Check failure on line 128 in pkg/state/builder.go

View workflow job for this annotation

GitHub Actions / test

unknown field Tags in struct literal of type kong.ConsumerGroupPlugin

Check failure on line 128 in pkg/state/builder.go

View workflow job for this annotation

GitHub Actions / test

p.Tags undefined (type *kong.ConsumerGroupPlugin has no field or method Tags)) (typecheck)

Check failure on line 128 in pkg/state/builder.go

View workflow job for this annotation

GitHub Actions / test

unknown field Tags in struct literal of type kong.ConsumerGroupPlugin

Check failure on line 128 in pkg/state/builder.go

View workflow job for this annotation

GitHub Actions / test

p.Tags undefined (type *kong.ConsumerGroupPlugin has no field or method Tags)) (typecheck)

Check failure on line 128 in pkg/state/builder.go

View workflow job for this annotation

GitHub Actions / test

unknown field Tags in struct literal of type kong.ConsumerGroupPlugin

Check failure on line 128 in pkg/state/builder.go

View workflow job for this annotation

GitHub Actions / test

p.Tags undefined (type *kong.ConsumerGroupPlugin has no field or method Tags)) (typecheck)
},
},
)
Expand Down

0 comments on commit a26ac5c

Please sign in to comment.