Releases: grafana/grafana-app-sdk
v0.35.1
v0.35.0
What Changed in this Release
Generated Code
Generated code now uses the newly-introduced resource.CopyObjectInto
for Copy
and DeepCopy
implementations. This changes the copy code from a previous shallow-copy to a full deep-copy of the object.
Generated plugin code no longer uses prometheus.MustRegister
in the plugin factory, as the factory can be called multiple times during the plugin lifetime, and attempting to re-register the same collectors causes a panic. Instead, it now uses prometheus.Register
and returns an error from the factory if an error which is not due to attempting to re-register the same collector is returned.
Clients
Two new clients have been introduced in the resource
package, which wrap an instance of resource.Client
: resource.NamespacedClient
and resource.TypedClient
. resource.TypedClient
contains the same known type logic as resource.TypedStore
, but as a client, and resource.NamespacedClient
extends on resource.TypedClient
by restricting operations to a single namespace (and therefore not requiring namespace to be provided in any methods).
A dry-run option (DryRun
) has been introduced to resource.CreateOptions
, resource.UpdateOptions
, and resource.PatchOptions
, and the option is implemented in the k8s
client to set dryRun=All
in the request query string.
Changelog
- 163cd44 Add a README for the codegen package (#704)
- ff4892e Add dry-run options to resource client create update and patch (#705)
- df14f4a Add typed and namespaced resource clients (#703)
- eacb4b0 Bump github.com/expr-lang/expr from 1.16.9 to 1.17.0 (#711)
- 3a061b4 Bump github.com/getkin/kin-openapi from 0.130.0 to 0.131.0 in the all group (#715)
- e0533f1 Bump the all group in /plugin with 3 updates (#707)
- 0c468be Bump the all group with 2 updates (#706)
- f3e6890 Fix CopyObject to deep copy the object rather than shallow copy (#710)
- 63352d5 [codegen] Don't use
prometheus.MustRegister
in generated plugin code'snewInstanceFactory
(#713)
v0.24.7
Changelog
- da301ae Bump github.com/getkin/kin-openapi from 0.129.0 to 0.130.0 in the all group (#708)
- e91b2cc Bump github.com/getkin/kin-openapi from 0.130.0 to 0.131.0 in the all group (#714)
- 7f987c1 Bump github.com/grafana/grafana-plugin-sdk-go from 0.266.0 to 0.268.1 in /plugin in the all group (#668)
- 9520d48 Bump github.com/grafana/grafana-plugin-sdk-go from 0.268.1 to 0.269.0 in /plugin in the all group (#669)
- d2c7db7 Bump github.com/grafana/grafana-plugin-sdk-go from 0.269.1 to 0.270.0 in /plugin in the all group (#692)
- 5c221e4 Bump github.com/grafana/grafana-plugin-sdk-go from 0.271.0 to 0.273.0 in /plugin in the all group (#701)
- 5af10d5 Bump github.com/grafana/grafana-plugin-sdk-go from 0.273.0 to 0.274.0 in /plugin in the all group (#709)
- d4ee55d Bump github.com/prometheus/client_golang from 1.21.0 to 1.21.1 in /plugin in the all group (#672)
- 7703f12 Bump github.com/prometheus/client_golang from 1.21.0 to 1.21.1 in the all group (#673)
- 3009589 Bump gomodules.xyz/jsonpatch/v2 from 2.4.0 to 2.5.0 in the all group (#689)
- 5750c91 Bump the all group across 1 directory with 3 updates (#681)
- b78f2ff Bump the all group across 1 directory with 9 updates (#683)
- bdce55a Bump the all group in /plugin with 3 updates (#693)
- ddfe7b8 Bump the all group with 4 updates (#696)
v0.34.0
Changelog
- c4716dd Add a config option to allow empty disjunctions in Go (#700)
- 0a19403 Bump github.com/grafana/grafana-app-sdk/logging from 0.32.1 to 0.33.0 in the all group (#687)
- 1b04930 Bump github.com/grafana/grafana-plugin-sdk-go from 0.269.1 to 0.270.0 in /plugin in the all group (#691)
- 76cadbe Bump github.com/grafana/grafana-plugin-sdk-go from 0.270.0 to 0.271.0 in /plugin in the all group across 1 directory (#697)
- f95cd05 Bump golang.org/x/net from 0.35.0 to 0.36.0 (#699)
- 6bdb173 Bump gomodules.xyz/jsonpatch/v2 from 2.4.0 to 2.5.0 in the all group (#688)
- 4f64bc0 Bump the all group in /plugin with 2 updates (#686)
- b9ea1f0 Bump the all group with 4 updates (#695)
v0.33.0
What's Changed in this Release
This release contains changes to code generation around the default status
subresource. The flag --genoperatorstate=(*true|false)
has been introduced, allowing a user to toggle off the default status
subresource in the generated code, CRD, and manifest. As a secondary effect of this change, generated CRDs with the default status
subresource will no longer contain x-kubernetes-preserve-unknown-fields: true
at the root level of the status
schema, so fields which are not specified in the CUE for status
will not be preserved in the API server. This behavior was a bug originally, but if you need to preserve this behavior, you may add
status:
[string]: _
to your CUE schema to keep the x-kubernetes-preserve-unknown-fields: true
in the CRD.
Generated Go Code Breaking Change
Subresources such as status
now use the (exported) CUE field name as their go field name, rather than the name of the type. That means, for a kind called Foo
, the Foo
generated type changes from this:
type Foo struct {
Spec FooSpec `json:"spec"`
FooStatus FooStatus `json:"status"`
}
to this:
type Foo struct {
Spec FooSpec `json:"spec"`
Status FooStatus `json:"status"`
}
References in non-generated code will need to be updated accordingly.
Changelog
- a6fce08 Bump github.com/grafana/grafana-plugin-sdk-go from 0.266.0 to 0.268.1 in /plugin in the all group (#667)
- 3ce6164 Bump github.com/grafana/grafana-plugin-sdk-go from 0.268.1 to 0.269.1 in /plugin in the all group across 1 directory (#684)
- bb605ba Bump the all group across 1 directory with 3 updates (#661)
- a8d05e5 Bump the all group across 1 directory with 3 updates (#663)
- eb008cc Bump the all group across 1 directory with 8 updates (#680)
- 7ef042a Disable revive:use-errors-new linter (#685)
- 122b69a Make operator status fields generation optional and remote status fields type prefixes (#679)
- 4a84edf Update go version to 1.24.0 (#653)
v0.24.6
Changelog
- f8ec67f Bump github.com/getkin/kin-openapi from 0.128.0 to 0.129.0 in the all group (#615)
- 52f41b1 Bump google.golang.org/grpc from 1.69.4 to 1.70.0 in the all group (#611)
- fb3f98b Bump the all group across 1 directory with 2 updates (#640)
- b4634dd Bump the all group across 1 directory with 4 updates (#656)
- 03540fb Bump the all group across 1 directory with 7 updates (#657)
- 61bd12a Bump the all group with 2 updates (#629)
- 5cfbe7f Upgrade LTS Go Version to v0.24.0 (#664)
v0.32.1
Changelog
- 1f0b470 AppManifest Enhancements and Generated Code/Definitions (#639)
- 6e6ca51 Bump the all group across 1 directory with 6 updates (#650)
- 999a2e5 Bump the all group in /plugin with 2 updates (#634)
- d91174b Bump the all group with 2 updates (#633)
- 552303e Update go to 1.23.5 for compatibility with plugin-sdk-go version update. (#637)
- de9315b [AppManifest] Add tests for generated AppManifest code and conversion code (#658)
- 5f85dca [codegen] Fix bug in CRD generation where 'additionalProperties' is not parsed in arrays (#659)
- 34cc257 [docs] Add migration doc for v0.32.0 (#632)
v0.32.0
Changelog
- 0b3787b Add
--noschemasinmanifest
flag to CLI generate command (#623) - c70a87b Added
InformerSupplier
function tosimple.AppInformerConfig
(#612) - 93677a1 Bump github.com/grafana/grafana-app-sdk/logging from 0.31.0 to 0.31.1 in the all group (#622)
- 098ccdb Bump grafana/cog to v0.0.21 (#624)
- 5aaf71a Bump grafana/cog to v0.0.22 (#627)
- f7de428 Bump the all group across 1 directory with 2 updates (#631)
- 0605927 Bump the all group in /plugin with 2 updates (#621)
- 7fa2192 Format kind JSON the same way the manifest is formatted. (#486)
- 1b12140 [OpinionatedWatcher] Address bug where deletes on add-in-progress or add-retry resources aren't propagated (#630)
- 1adacf4 [codegen] Change
codegen
CUE block to be language-specific and use config (#625) - a59bea2 [docs] Update the 'Managing Multiple Versions' doc to use app/runner (and simple.App) (#618)
v0.31.1
Changelog
- a1298bb Bump github.com/getkin/kin-openapi from 0.128.0 to 0.129.0 in the all group (#616)
- 505c400 Bump the all group in /plugin with 2 updates (#609)
- 1d0c6a2 Bump the all group with 3 updates (#610)
- dfd6d47 Replace the outdated 'Writing an Operator' doc with two new docs (#614)
- b49b2b9 Small fixes for the Issue Tracker tutorial (#619)
- dde03c4 Update APIVersion in AppManifest Jenny to Match AppManifest CRD Definition (#613)
- 767741b [docs] Update Tutorial plugin links (#620)
v0.31.0
Changelog
- 1079593 Add migration doc for v0.30.0 (#589)
- ac58184 Added resource.WrappedObject for creating a resource.Object-implmenting type from a non-spec-based type (#605)
- bd9737d Bump github.com/grafana/cog from 0.0.17 to 0.0.18 in the all group (#606)
- 4ccdbcb Bump github.com/grafana/grafana-plugin-sdk-go from 0.262.0 to 0.263.0 in /plugin in the all group (#597)
- fe89fdc Bump the all group across 1 directory with 3 updates (#594)
- 565a872 Bump the all group across 1 directory with 6 updates (#593)
- 3bd746e Bump the all group across 1 directory with 6 updates (#603)
- 8ce8607 Fix codegen omitting Go manifest file with
defencoding=none
(#596) - e2c23ba Make the behavior of
TypedStore.Update
match the described behavior in the godoc (#595) - 88667a6 Remove
grafana/cloud-app-platform-squad
from CODEOWNERS (#601) - 646a2e4 [k8s] Allow specifying a KubeConfigProvider in k8s.ClientConfig (#608)
- 9c5322c [operator] Call ErrorHandler on reconciler errors (#607)