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

Enable storage options to be filtered out based on specified storage … #94

Merged
merged 2 commits into from
Nov 7, 2018
Merged

Conversation

objectiser
Copy link
Contributor

…type

Signed-off-by: Gary Brown gary@brownuk.com

…type

Signed-off-by: Gary Brown <gary@brownuk.com>
@jpkrohling
Copy link
Contributor

This change is Reviewable

@codecov
Copy link

codecov bot commented Nov 7, 2018

Codecov Report

Merging #94 into master will increase coverage by 0.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #94      +/-   ##
==========================================
+ Coverage   99.35%   99.36%   +0.01%     
==========================================
  Files          18       19       +1     
  Lines         776      791      +15     
==========================================
+ Hits          771      786      +15     
  Misses          5        5
Impacted Files Coverage Δ
pkg/apis/io/v1alpha1/options.go 100% <100%> (ø) ⬆️
pkg/controller/controller.go 100% <100%> (ø) ⬆️
pkg/deployment/collector.go 100% <100%> (ø) ⬆️
pkg/storage/types.go 100% <100%> (ø)
pkg/deployment/all-in-one.go 100% <100%> (ø) ⬆️
pkg/deployment/query.go 100% <100%> (ø) ⬆️

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 61150a9...b106e18. Read the comment docs.

Signed-off-by: Gary Brown <gary@brownuk.com>
Copy link
Contributor

@jpkrohling jpkrohling left a comment

Choose a reason for hiding this comment

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

Reviewed 7 of 8 files at r1, 1 of 1 files at r2.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @objectiser)


pkg/apis/io/v1alpha1/options.go, line 21 at r2 (raw file):

}

// Filter creates a new Options object with just the elements identified by the supplied prefix

I think it would be more appropriate to be explicit about which prefixes to remove, instead of which ones to keep. The storage package could hold the logic about removing everything except one prefix.

With this change, the example file all-in-one-with-options.yaml would break, as the log-level option would be filtered out if I understood this code correctly.


pkg/apis/io/v1alpha1/options_test.go, line 52 at r2 (raw file):

	o := NewOptions(map[string]interface{}{
		"es.server-urls":    "http://elasticsearch.default.svc:9200",
		"memory.max-traces": "50000",

Can you add a test with other options as well? Right now, it looks like they would get filtered out (like log-level), but would be good to have an option not related to storage in the test, to be explicit about what's the expected behavior.

Copy link
Contributor

@jpkrohling jpkrohling left a comment

Choose a reason for hiding this comment

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

Reviewable status: :shipit: complete! all files reviewed, all discussions resolved


pkg/apis/io/v1alpha1/options.go, line 21 at r2 (raw file):

Previously, jpkrohling (Juraci Paixão Kröhling) wrote…

I think it would be more appropriate to be explicit about which prefixes to remove, instead of which ones to keep. The storage package could hold the logic about removing everything except one prefix.

With this change, the example file all-in-one-with-options.yaml would break, as the log-level option would be filtered out if I understood this code correctly.

As pointed out, this change affects only the options within the JaegerStorageSpec, so, it makes sense to follow this approach.

@jpkrohling jpkrohling merged commit 04af229 into jaegertracing:master Nov 7, 2018
@objectiser objectiser deleted the storageopts branch November 7, 2018 17:11
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.

2 participants