Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
- (Feature) Add CA Certificates
- (Feature) Chart By Tag filter
- (Feature) Add Gateway Config condition
- (Bugfix) Fix AnyPB Parsing in Meta Service

## [1.3.0](https://github.com/arangodb/kube-arangodb/tree/1.3.0) (2025-08-01)
- (Feature) (Platform) Storage Debug
Expand Down
3 changes: 1 addition & 2 deletions integrations/meta/v1/impl.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ import (
"github.com/arangodb/kube-arangodb/pkg/util"
"github.com/arangodb/kube-arangodb/pkg/util/cache"
"github.com/arangodb/kube-arangodb/pkg/util/errors"
ugrpc "github.com/arangodb/kube-arangodb/pkg/util/grpc"
"github.com/arangodb/kube-arangodb/pkg/util/svc"
)

Expand Down Expand Up @@ -129,7 +128,7 @@ func (i *implementation) Set(ctx context.Context, req *pbMetaV1.SetRequest) (*pb
obj.Key = key
obj.Rev = req.Revision

obj.Object = ugrpc.NewGRPC(req.GetObject())
obj.Object.Object = req.GetObject()

if err := i.cache.Put(ctx, key, &obj); err != nil {
if shared.IsPreconditionFailed(err) {
Expand Down
7 changes: 5 additions & 2 deletions integrations/meta/v1/object.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ import (
meta "k8s.io/apimachinery/pkg/apis/meta/v1"

pbMetaV1 "github.com/arangodb/kube-arangodb/integrations/meta/v1/definition"
ugrpc "github.com/arangodb/kube-arangodb/pkg/util/grpc"
)

type Object struct {
Expand All @@ -37,7 +36,11 @@ type Object struct {

Meta *ObjectMeta `json:"meta,omitempty"`

Object ugrpc.GRPC[*anypb.Any] `json:"object"`
Object ObjectProto `json:"object,omitempty"`
}

type ObjectProto struct {
Object *anypb.Any `json:"Object,omitempty"`
}

func (o *Object) SetKey(s string) {
Expand Down
24 changes: 24 additions & 0 deletions integrations/meta/v1/service_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ package v1

import (
"context"
"encoding/json"
"testing"

"github.com/stretchr/testify/require"
Expand All @@ -32,6 +33,29 @@ import (
"github.com/arangodb/kube-arangodb/pkg/util/tests/tgrpc"
)

func Test_Types(t *testing.T) {
z := `{
"meta": {
"updatedAt": "2025-07-07T15:13:09Z"
},
"object": {
"Object": {
"type_url": "type.googleapis.com/arangodb_platform_internal.metadata_store.GenAiProjectNames",
"value": "ChV0ZXN0X3Byb2plY3RfNmVhYWM3MjM="
}
}
}`

var obj Object

require.NoError(t, json.Unmarshal([]byte(z), &obj))

n, err := json.Marshal(obj)
require.NoError(t, err)

require.JSONEq(t, z, string(n))
}

func Handler(t *testing.T, ctx context.Context, mods ...util.ModR[Configuration]) svc.Handler {
handler, err := New(ctx, NewConfiguration().With(mods...))
require.NoError(t, err)
Expand Down