-
Notifications
You must be signed in to change notification settings - Fork 304
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
HPCC-29544 Remove configuration of the global-id header field name #17790
Conversation
@afishbeck for discussion. The idea is to recognise hpcc-global-id and global-id, but only ever forward it as global-id. It would definitely be a red book item. |
@afishbeck the second commit makes me think that this is never overridden - since the soapcall did not support hpcc-global-id or any other user defined header name. |
https://track.hpccsystems.com/browse/HPCC-29544 |
@rpastrana I fixed a couple of issues with the unit tests and jtrace
Other change is to add legacy header support to jtrace. |
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.
@ghalliday one comment, but once acknowledged I'm happy to approve as is.
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.
@ghalliday a few minor comments/questions.
if (!getHttpIdHeader(request, "Global-Id", value, nameused)) | ||
getHttpIdHeader(request, "HPCC-Global-Id", value, nameused); | ||
} | ||
if (!getHttpIdHeader(request, "Global-Id", value)) |
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.
why not kGlobalIdHttpHeaderName and/or kLegacyGlobalIdHttpHeaderName?
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.
Because they didn't exist when this code was written. I will update to use them
if (!getHttpIdHeader(request, "Caller-Id", value, nameused)) | ||
getHttpIdHeader(request, "HPCC-Caller-Id", value, nameused); | ||
} | ||
if (!getHttpIdHeader(request, "Caller-Id", value)) |
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.
same as above
helm/hpcc/values.schema.json
Outdated
@@ -1708,12 +1708,12 @@ | |||
"httpCallerIdHeader": { | |||
"type": "string", | |||
"default": "HPCC-Caller-Id", | |||
"description": "HTTP Header field to use for sending and receiving CallerId" | |||
"description": "HTTP Header field to use for sending and receiving CallerId (deprecated and ignored)" |
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.
If removed from the schema, it will alert users it has been deprecated, as-is, it will pass through and will be silently ignored.
roxie/ccd/ccdprotocol.cpp
Outdated
{ | ||
const char *id = queryRequestIdHeader(httpHelper, logctx.queryGlobalIdHttpHeaderName(), headerused); | ||
const char *id = httpHelper.queryRequestHeader("Global-Id"); |
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.
kGlobalIdHttpHeaderName
roxie/ccd/ccdprotocol.cpp
Outdated
if (!id || !*id) | ||
id = queryRequestIdHeader(httpHelper, "HPCC-Global-Id", headerused); | ||
} | ||
id = httpHelper.queryRequestHeader("HPCC-Global-Id"); // Backward compatibility - passed on as global-id |
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.
kLegacyGlobalIdHttpHeaderName
roxie/ccd/ccdprotocol.cpp
Outdated
{ | ||
const char *id = queryRequestIdHeader(httpHelper, logctx.queryCallerIdHttpHeaderName(), headerused); | ||
const char *id = httpHelper.queryRequestHeader("Caller-Id"); |
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.
I'm sure there's a good reason we're not using the definition from jtrace.hpp, but pointing it out in case we want/can avoid all these literals.
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.
as above - the reason was those definitions didn't exist.
f47d40f
to
a026ccd
Compare
@afishbeck @rpastrana rebased and changes from previous review squashed into a single commit. New commit contains changes following review. |
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.
@ghalliday looks good.
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.
@ghalliday looks good.
Signed-off-by: Gavin Halliday <[email protected]>
a7fa080
to
ed1a669
Compare
Type of change:
Checklist:
Smoketest:
Testing: