You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@polaris.apache.org by "adutra (via GitHub)" <gi...@apache.org> on 2024/12/14 17:27:22 UTC
[PR] DefaultCallContextResolver: clean up unused variables [polaris]
adutra opened a new pull request, #558:
URL: https://github.com/apache/polaris/pull/558
(no comment)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@polaris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] DefaultCallContextResolver: clean up unused variables [polaris]
Posted by "flyrain (via GitHub)" <gi...@apache.org>.
flyrain merged PR #558:
URL: https://github.com/apache/polaris/pull/558
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@polaris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] DefaultCallContextResolver: clean up unused variables [polaris]
Posted by "adutra (via GitHub)" <gi...@apache.org>.
adutra commented on code in PR #558:
URL: https://github.com/apache/polaris/pull/558#discussion_r1885899864
##########
service/common/src/main/java/org/apache/polaris/service/context/DefaultCallContextResolver.java:
##########
@@ -67,16 +62,6 @@ public CallContext resolveCallContext(
.addKeyValue("queryParams", queryParams)
.addKeyValue("headers", headers)
.log("Resolving CallContext");
- final Map<String, String> parsedProperties = parseBearerTokenAsKvPairs(headers);
-
- if (!parsedProperties.containsKey(PRINCIPAL_PROPERTY_KEY)) {
- LOGGER.warn(
- "Failed to parse {} from headers ({}); using {}",
- PRINCIPAL_PROPERTY_KEY,
- headers,
- PRINCIPAL_PROPERTY_DEFAULT_VALUE);
- parsedProperties.put(PRINCIPAL_PROPERTY_KEY, PRINCIPAL_PROPERTY_DEFAULT_VALUE);
Review Comment:
This is dead code. The parsedProperties variable is discarded when the method returns.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@polaris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] DefaultCallContextResolver: clean up unused variables [polaris]
Posted by "flyrain (via GitHub)" <gi...@apache.org>.
flyrain commented on code in PR #558:
URL: https://github.com/apache/polaris/pull/558#discussion_r1885893811
##########
service/common/src/main/java/org/apache/polaris/service/context/DefaultCallContextResolver.java:
##########
@@ -67,16 +62,6 @@ public CallContext resolveCallContext(
.addKeyValue("queryParams", queryParams)
.addKeyValue("headers", headers)
.log("Resolving CallContext");
- final Map<String, String> parsedProperties = parseBearerTokenAsKvPairs(headers);
-
- if (!parsedProperties.containsKey(PRINCIPAL_PROPERTY_KEY)) {
- LOGGER.warn(
- "Failed to parse {} from headers ({}); using {}",
- PRINCIPAL_PROPERTY_KEY,
- headers,
- PRINCIPAL_PROPERTY_DEFAULT_VALUE);
- parsedProperties.put(PRINCIPAL_PROPERTY_KEY, PRINCIPAL_PROPERTY_DEFAULT_VALUE);
Review Comment:
We don't need set the default value for `PRINCIPAL_PROPERTY_KEY` anymore?
##########
service/common/src/main/java/org/apache/polaris/service/context/DefaultCallContextResolver.java:
##########
@@ -67,16 +62,6 @@ public CallContext resolveCallContext(
.addKeyValue("queryParams", queryParams)
.addKeyValue("headers", headers)
.log("Resolving CallContext");
- final Map<String, String> parsedProperties = parseBearerTokenAsKvPairs(headers);
-
- if (!parsedProperties.containsKey(PRINCIPAL_PROPERTY_KEY)) {
- LOGGER.warn(
- "Failed to parse {} from headers ({}); using {}",
- PRINCIPAL_PROPERTY_KEY,
- headers,
- PRINCIPAL_PROPERTY_DEFAULT_VALUE);
- parsedProperties.put(PRINCIPAL_PROPERTY_KEY, PRINCIPAL_PROPERTY_DEFAULT_VALUE);
Review Comment:
We don't need to set the default value for `PRINCIPAL_PROPERTY_KEY` anymore?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@polaris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] DefaultCallContextResolver: clean up unused variables [polaris]
Posted by "flyrain (via GitHub)" <gi...@apache.org>.
flyrain commented on PR #558:
URL: https://github.com/apache/polaris/pull/558#issuecomment-2544634532
Thanks @adutra for the PR. Thanks @ebyhr for the review.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@polaris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org