-
Notifications
You must be signed in to change notification settings - Fork 454
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
Add httpReq to placement source (debug) #1981
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1981 +/- ##
=========================================
+ Coverage 60.1% 63.6% +3.4%
=========================================
Files 1120 1122 +2
Lines 106270 106531 +261
=========================================
+ Hits 63956 67790 +3834
+ Misses 38286 34413 -3873
- Partials 4028 4328 +300
Continue to review full report at Codecov.
|
src/x/debug/placement.go
Outdated
func (p *placementInfoSource) Write(w io.Writer) error { | ||
placement, _, err := p.getHandler.Get(p.serviceName, nil) | ||
func (p *placementInfoSource) Write(w io.Writer, httpReq *http.Request) error { | ||
placement, _, err := p.getHandler.Get(p.serviceName, httpReq) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey I was going to comment on this and say we really should just be flowing defaults all the way from the DB Node and/or the coordinator to all service related endpoints (as well as supporting the headers just in case you want to override it).
Anyway I went ahead and did this, now basically you don't need a special header, if you hit the DB node coordinator endpoint, or even just the default debug dump on the debug address HTTP server, it'll just return you whatever the current config is configured for:
#1984
If you're good to go ahead with this, let's merge my pull request into your branch (by just using the merge button on that PR) and then maybe you could help fix up the tests and then get the resulting PR here merged into master?
9507918
to
b403aa4
Compare
b403aa4
to
212edf3
Compare
src/query/api/v1/handler/options.go
Outdated
} | ||
|
||
// ServiceOptionsDefaults is the defaults for optional service options. | ||
type ServiceOptionsDefaults struct { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Heh this is probably my bad - I think this isn't used anymore, perhaps remove this struct?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM other than the comment about removing the unused struct
What this PR does / why we need it:
Fixes #
Special notes for your reviewer:
Does this PR introduce a user-facing and/or backwards incompatible change?:
Does this PR require updating code package or user-facing documentation?: