@@ -32,7 +32,6 @@ import (
3232 "github.com/sdcio/config-server/apis/config"
3333 invv1alpha1 "github.com/sdcio/config-server/apis/inv/v1alpha1"
3434 dsclient "github.com/sdcio/config-server/pkg/sdc/dataserver/client"
35- "github.com/sdcio/data-server/pkg/utils"
3635 sdcpb "github.com/sdcio/sdc-protos/sdcpb"
3736 "google.golang.org/grpc"
3837 "google.golang.org/grpc/codes"
@@ -271,7 +270,7 @@ func (r *Context) getIntentUpdate(ctx context.Context, key storebackend.Key, con
271270 }
272271
273272 for _ , config := range configSpec {
274- path , err := utils .ParsePath (config .Path )
273+ path , err := sdcpb .ParsePath (config .Path )
275274 if err != nil {
276275 return nil , fmt .Errorf ("create data failed for target %s, path %s invalid" , key .String (), config .Path )
277276 }
@@ -294,7 +293,7 @@ func (r *Context) getDeviationUpdate(ctx context.Context, targetKey storebackend
294293
295294 for _ , deviation := range deviation .Spec .Deviations {
296295 if deviation .Reason == "NOT_APPLIED" {
297- path , err := utils .ParsePath (deviation .Path )
296+ path , err := sdcpb .ParsePath (deviation .Path )
298297 if err != nil {
299298 return nil , fmt .Errorf ("deviation path parsing failed forr target %s, path %s invalid" , targetKey .String (), deviation .Path )
300299 }
@@ -304,7 +303,7 @@ func (r *Context) getDeviationUpdate(ctx context.Context, targetKey storebackend
304303 log .Error ("deviation proto unmarshal failed" , "key" , targetKey .String (), "path" , deviation .Path , "currentValue" , deviation .CurrentValue )
305304 continue
306305 //return nil, fmt.Errorf("create data failed for target %s, val %s invalid", key.String(), deviation.CurrentValue)
307- }
306+ }
308307
309308 //val, err := parse_value((deviation.CurrentValue))
310309 //if err != nil {
@@ -396,7 +395,7 @@ func (r *Context) TransactionSet(ctx context.Context, req *sdcpb.TransactionSetR
396395 if req .DryRun {
397396 return msg , nil
398397 }
399-
398+
400399 if err := r .TransactionConfirm (ctx , req .DatastoreName , req .TransactionId ); err != nil {
401400 return msg , err
402401 }
@@ -492,11 +491,11 @@ func (r *Context) DeleteIntent(ctx context.Context, key storebackend.Key, config
492491 Timeout : ptr .To (int32 (60 )),
493492 Intents : []* sdcpb.TransactionIntent {
494493 {
495- Intent : GetGVKNSN (config ),
496- Priority : int32 (config .Spec .Priority ),
497- Delete : true ,
494+ Intent : GetGVKNSN (config ),
495+ Priority : int32 (config .Spec .Priority ),
496+ Delete : true ,
498497 DeleteIgnoreNoExist : true ,
499- Orphan : config .Orphan (),
498+ Orphan : config .Orphan (),
500499 },
501500 },
502501 })
@@ -611,9 +610,9 @@ func (r *Context) SetIntents(
611610 deviationsToDeleteSet .Insert (key )
612611 // only include items for which deviations exist
613612 intents = append (intents , & sdcpb.TransactionIntent {
614- Intent : fmt .Sprintf ("deviation:%s" , GetGVKNSN (deviation )),
613+ Intent : fmt .Sprintf ("deviation:%s" , GetGVKNSN (deviation )),
615614 //Priority: int32(config.Spec.Priority),
616- Delete : true ,
615+ Delete : true ,
617616 DeleteIgnoreNoExist : true ,
618617 })
619618 }
@@ -633,9 +632,9 @@ func (r *Context) SetIntents(
633632 for key , config := range configsToDelete {
634633 configsToDeleteSet .Insert (key )
635634 intents = append (intents , & sdcpb.TransactionIntent {
636- Intent : GetGVKNSN (config ),
635+ Intent : GetGVKNSN (config ),
637636 //Priority: int32(config.Spec.Priority),
638- Delete : true ,
637+ Delete : true ,
639638 DeleteIgnoreNoExist : true ,
640639 })
641640 }
0 commit comments