flytestdlib icon indicating copy to clipboard operation
flytestdlib copied to clipboard

DefaultProtobufStore constructor accepts scope as well as metrics

Open MorpheusXAUT opened this issue 2 years ago • 1 comments

TL;DR

NewDefaultProtobufStore was changed to expect protoMetrics instead of a promutils.Scope in #138. Some of propeller's tests need to instantiate it as well using just a scope.

Type

  • [X] Bug Fix
  • [ ] Feature
  • [ ] Plugin

Are all requirements met?

  • [X] Code completed
  • [X] Smoke tested
  • [ ] Unit tests added
  • [ ] Code documentation added
  • [ ] Any pending items have an associated Issue

Complete description

A few tests in propeller construct a CompositeDataStore (and thus a DefaultProtobufStore) directly. Since protoMetrics and the new newProtoMetrics constructor are not exported, the storage.NewDefaultProtobufStore constructor can no longer be called. We could export newProtoMetrics, however I've opted to add a contructor "overload" NewDefaultProtobufStoreWithMetrics and changed NewDefaultProtobufStore to reflect the old signature (accepting a promutils.Scope) again.

It also looks like my last PR #140 did not include all generated mocks, so the output of make generate was added as well.

Tracking Issue

NA

Follow-up issue

NA

MorpheusXAUT avatar Sep 27 '22 11:09 MorpheusXAUT

Codecov Report

Merging #141 (285faf0) into master (65025fd) will increase coverage by 0.44%. The diff coverage is 76.31%.

@@            Coverage Diff             @@
##           master     #141      +/-   ##
==========================================
+ Coverage   68.76%   69.20%   +0.44%     
==========================================
  Files          69       69              
  Lines        3419     3452      +33     
==========================================
+ Hits         2351     2389      +38     
+ Misses        909      905       -4     
+ Partials      159      158       -1     
Flag Coverage Δ
unittests 68.14% <75.75%> (+0.55%) :arrow_up:

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
cache/auto_refresh.go 78.51% <ø> (+5.78%) :arrow_up:
cli/pflags/api/tag.go 77.27% <ø> (ø)
futures/future.go 100.00% <ø> (ø)
profutils/server.go 53.33% <0.00%> (-3.81%) :arrow_down:
promutils/labeled/stopwatch.go 80.00% <ø> (ø)
promutils/scope.go 88.28% <ø> (ø)
storage/copy_impl.go 80.00% <ø> (ø)
storage/storage.go 100.00% <ø> (ø)
utils/auto_refresh_cache.go 70.00% <ø> (ø)
storage/protobuf_store.go 75.00% <33.33%> (-3.27%) :arrow_down:
... and 8 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

codecov[bot] avatar Sep 27 '22 11:09 codecov[bot]