Skip to content
This repository was archived by the owner on Oct 11, 2024. It is now read-only.

Copy backoff module from Trillian#1424

Merged
gdbelvin merged 3 commits intogoogle:masterfrom
gdbelvin:backkoff
Jan 3, 2020
Merged

Copy backoff module from Trillian#1424
gdbelvin merged 3 commits intogoogle:masterfrom
gdbelvin:backkoff

Conversation

@gdbelvin
Copy link
Contributor

@gdbelvin gdbelvin commented Jan 3, 2020

A little copying is better than a little dependency

  • Go Proverb

@gdbelvin gdbelvin requested a review from a team as a code owner January 3, 2020 16:43
@codecov
Copy link

codecov bot commented Jan 3, 2020

Codecov Report

Merging #1424 into master will decrease coverage by 0.01%.
The diff coverage is 82.5%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1424      +/-   ##
==========================================
- Coverage   66.33%   66.31%   -0.02%     
==========================================
  Files          53       54       +1     
  Lines        3986     4026      +40     
==========================================
+ Hits         2644     2670      +26     
- Misses        952      962      +10     
- Partials      390      394       +4
Impacted Files Coverage Δ
internal/backoff/backoff.go 82.5% <82.5%> (ø)
core/sequencer/trillian_client.go 58.57% <0%> (-4.29%) ⬇️
impl/sql/directory/storage.go 67.66% <0%> (-1.51%) ⬇️
core/sequencer/server.go 72.96% <0%> (-0.66%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 850d311...245f58a. Read the comment docs.

Copy link
Contributor

@pav-kv pav-kv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM % file location and spelling warning.

@gdbelvin gdbelvin merged commit 2559372 into google:master Jan 3, 2020
@gdbelvin gdbelvin deleted the backkoff branch January 3, 2020 17:20
gdbelvin added a commit to gdbelvin/keytransparency that referenced this pull request Jan 3, 2020
* master:
  Copy backoff module from Trillian (google#1424)
// See the License for the specific language governing permissions and
// limitations under the License.

// Package backoff allows retrying an operation with backoff.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there any way of denoting that this is a copy of code that is shared in Trillian (and vice versa)? I notelic lid your copy vs dependency proverb, but the potential to divergence in both flavours is worrisome.

While here - was there not a public backoff or retry library that was suitable?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Divergence is less of a risk here because we can fully test it in this project without worrying about breaking other projects. Perhaps I'm missing something though.

grpc-go has a backoff library but it is also inside an internal directory.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

Comments