Skip to content

Commit

Permalink
fix(oomstore): fix update feature missing value type
Browse files Browse the repository at this point in the history
  • Loading branch information
lianxmfor committed Nov 12, 2021
1 parent fbf998d commit 3f99547
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion featctl/cmd/update_feature.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ var updateFeatureCmd = &cobra.Command{
updateFeatureOpt.FeatureID = feature.ID

if err := oomStore.UpdateFeature(ctx, updateFeatureOpt); err != nil {
log.Fatalf("failed to update feature %s, err %v\n", feature.ID, err)
log.Fatalf("failed to update feature %d, err %v\n", feature.ID, err)
}
},
}
Expand Down
4 changes: 4 additions & 0 deletions pkg/oomstore/feature.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,9 @@ func (s *OomStore) CreateBatchFeature(ctx context.Context, opt metadatav2.Create
if group.Category != types.BatchFeatureCategory {
return 0, fmt.Errorf("expected batch feature group, got %s feature group", group.Category)
}

if opt.ValueType, err = s.offline.TypeTag(opt.DBValueType); err != nil {
return 0, err
}
return s.metadatav2.CreateFeature(ctx, opt)
}

0 comments on commit 3f99547

Please sign in to comment.