You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[codegen] Fix package import path in generated manifest go file (#828)
Fix discrepency where the package imported by the manifest go file for a
group is based on the manifest's full group's first component, but the
package path determined by the kind codegen uses the manifest short
group from the CUE (which is a variant of the appName). Use the kind
codegen's package name in the manifest go file.
Prior to this, the group used in the manifest go import statement was
just the first dot-separated component of the full manifest group, which
was fine in most cases where the full group was auto-created from the
"short" group which is just `LOWER(REPLACE(appName, "-", ""))`, and the
full group was just that short group + `ext.grafana.(com|app)`. However,
if `groupOverride` is used and the full group is set to something which
does not begin with the short group (appName) (for example, and appName
`foo` and the `groupOverride` being `bar.foo.ext.grafana.com`), the
generated path use in the manifest go file would be incorrect (`bar`
instead of `foo` in our example).
This is noted
[here](grafana/grafana#106111 (comment))
as an issue when generating code for grafana's
`apps/alerting/notifications`, as the app is `alerting`, but the
fullgroup is `notifications.alerting.grafana.app`.
0 commit comments