Skip to content

Releases: grafana/grafana-app-sdk

v0.15.3

18 Apr 21:09
a6c0324
Compare
Choose a tag to compare

What Has Changed

The plugin package has been moved into a submodule using go workspaces. Your project may now require that you run go get github.com/grafana/grafana-app-sdk/[email protected] to add it to your go.mod if you use the plugin package.

Changelog

v0.15.2

12 Apr 13:07
93ceced
Compare
Choose a tag to compare

Changelog

  • 93ceced Bump github.com/grafana/grafana-plugin-sdk-go from 0.221.0 to 0.222.0 in the all group (#249)
  • 4dca9d4 Bump the all group with 2 updates (#246)
  • e68c7c7 Bump the all group with 8 updates (#244)
  • 7c02594 Updating Operator docs (#241)
  • af762e2 [bugfix] Local CRD Generation with Webhook Conversion Strategy (#247)

v0.15.1

05 Apr 14:26
v0.15.1
086fcb1
Compare
Choose a tag to compare

Changelog

v0.14.15

05 Apr 14:27
v0.14.15
807025e
Compare
Choose a tag to compare

Changelog

v0.15.0

28 Mar 13:06
78768eb
Compare
Choose a tag to compare

What's Changed

This release refactors the resource.Object interface to be composed of the kubernetes runtime.Object, schema.ObjectKind, and metav1.Object interfaces, with additional methods for use by the grafana-app-sdk. It also expands upon resource.Schema with the resource.Kind type, which includes (de)serialization logic based on byte encoding (moved out from resource.Object.Unmarshal). The resource.List interface has also been changed similarly to the resource.Object, now being comprised of runtime.Object, schema.ObjectKind, and metav1.ListObject.

The Simple/Basic objects are now resource.UntypedObject and resource.TypedObject/reosurce.TypedSpecObject/resource.TypedSpecStatusObject. Likewise, the simple list has been split into resource.UntypedList and resource.TypedList.

All other changes in this release flow out of these changes: codegen is updated to satisfy the new interfaces, and generate a Kind and Codec for JSON-encoding of the Kind. k8s has been updated to use the resource.Kind/resource.Codec for its marshal and unmarshal logic to/from JSON bytes. The operator package accepts resource.Kind in some places where it used to accept resource.Schema.

Codegen Changes

Specific list of breaking changes to codegen are as follows:

  • The Metadata object is still generated, but is deprecated, and only used for thema unmarshal.
  • The resource.Object-implementing type now has metav1.TypeMeta and metav1.ObjectMeta embedded, and all metadata can be access via ObjectMeta.
  • The resource.Object-implementing type's name is now the Kind's name.
  • Custom metadata is now set via generated GetX/SetX methods on the Object type. At rest in the type, it is stored in the Annotations map.
  • ExtraFields has been removed, as all supported kubernetes fields are now within the metadata. ExtraFields can still be used with GetCommonMetadata() and SetCommonMetadata(), however, for legacy support.
  • TypeScript generation of resource-type kinds now generates interfaces for each of Spec, Status, etc., and generates an Object interface that contains them, and the kubernetes metadata, the same way the go codegen behaves. model-type TypeScript codegen is unchanged.

You can view all codegen changes by looking at the diff to the diff to codegen/testing/golden_generated in this PR.

resource Changes

Specific list of breaking changes to the resource package are as follows:

  • Object interface has been changed. New codegen will automatically implement it.
  • Simple Object implementations such as BasicMetadataObject and SimpleObject have been replaced by UntypedObject, TypedSpecObject, TypedSpecStatusObject, and TypedObject.
  • List interface has been changed.
  • SimpleList has been replaced by TypedList and UntypedList
  • The various stores, which previously required a Schema now require a Kind
  • ClientGenerator.ClientFor now requires a Kind instead of a Schema

Other changes

Specific list of breaking changes to all other packages are as follows:

  • operator.KubernetesBasedInformer requires a resource.Kind instead of a resource.Schema
  • simple.WebhookConfig uses *resource.Kind instead of resource.Schema
  • simple.Operator.WatchKind, simple.Operator.ReconcileKind, simple.Operator.ValidateKind, and simple.Operator.MutateKind all now consume a resource.Kind instead of a resource.Schema

Commits

  • Refactor of the Object interface to be a superset of the kubernetes interfaces, introduce Kinds by @IfSentient in #200
  • Implement New resource.Kind and resource.Object in Other Packages by @IfSentient in #207
  • [Kind/Object Refactor] Codegen Updates by @IfSentient in #211
  • Update tutorial based on changes to Object interface and codegen. by @IfSentient in #214
  • [Kind/Object Refactor] Misc Final Fixes by @IfSentient in #216
  • Bump the all group with 6 updates by @dependabot in #220

Full Changelog: v0.14.14...v0.15.0

Changelog

v0.14.14

28 Mar 12:35
1537b84
Compare
Choose a tag to compare

Changelog

v0.14.13-alpha.1

27 Mar 09:45
v0.14.13-alpha.1
25d6c90
Compare
Choose a tag to compare
v0.14.13-alpha.1 Pre-release
Pre-release

Changelog

  • 0d80905 Bump the all group with 1 update (#234)
  • 1011654 Bump the all group with 5 updates (#232)
  • d2cd257 Merge branch 'main' into chore/optimise-list
  • a67974f Optimise allocations when LISTing objects
  • 25d6c90 Reuse slices for LIST calls

v0.15.0-alpha.3

26 Mar 13:37
dda0b42
Compare
Choose a tag to compare
v0.15.0-alpha.3 Pre-release
Pre-release

This release updates the previous v0.15.0-alpha release (v0.15.0-alpha.2) with changes to the codegen for the kind resource.Object implementation, changing the generated Object type name to the name of the kind itself.

v0.15.0-alpha.2

18 Mar 13:06
Compare
Choose a tag to compare
v0.15.0-alpha.2 Pre-release
Pre-release

Follow-up release to v0.15.0-alpha.1 with the following change to TS generation: commit 66c96ee

v0.14.13

18 Mar 05:59
v0.14.13
b594943
Compare
Choose a tag to compare

Changelog