Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make sure options are propagated to child Writes #818

Merged
merged 2 commits into from
Nov 9, 2020

Conversation

jonjohnsonjr
Copy link
Collaborator

Right now we are just passing through cherrypicked options from
WriteIndex to other WriteIndex and Write calls. This isn't sustainable
as we add more options, since we'd have to keep these in sync.

Instead, for WriteIndex, we can reuse the writer by pulling the
implementation out into writer.writeIndex.

For Write, since we do scope calculation based on layers, we can't reuse
the writer because we don't do scope calculation for WriteIndex.

Right now we are just passing through cherrypicked options from
WriteIndex to other WriteIndex and Write calls. This isn't sustainable
as we add more options, since we'd have to keep these in sync.

Instead, for WriteIndex, we can reuse the writer by pulling the
implementation out into writer.writeIndex.

For Write, since we do scope calculation based on layers, we can't reuse
the writer because we don't do scope calculation for WriteIndex.
@codecov-io
Copy link

codecov-io commented Nov 6, 2020

Codecov Report

Merging #818 (e237685) into master (6a63025) will decrease coverage by 0.06%.
The diff coverage is 53.57%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #818      +/-   ##
==========================================
- Coverage   74.77%   74.71%   -0.07%     
==========================================
  Files         103      103              
  Lines        4313     4314       +1     
==========================================
- Hits         3225     3223       -2     
- Misses        611      614       +3     
  Partials      477      477              
Impacted Files Coverage Δ
pkg/v1/remote/multi_write.go 57.54% <0.00%> (ø)
pkg/v1/remote/write.go 65.09% <55.55%> (+0.12%) ⬆️
pkg/v1/remote/options.go 61.53% <0.00%> (-7.70%) ⬇️

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 6a63025...e237685. Read the comment docs.

@jonjohnsonjr jonjohnsonjr merged commit 5fa6b58 into google:master Nov 9, 2020
@jonjohnsonjr jonjohnsonjr deleted the write-context branch November 9, 2020 18:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants