Skip to content

Conversation

Elliot-xq
Copy link
Contributor

@Elliot-xq Elliot-xq commented Apr 10, 2024

Propagates the API key UID if it is returned in the service controller CheckResponse.

If it is not returned by the CheckResponse, we will still use the api_key as it is.

@Elliot-xq Elliot-xq requested a review from TAOXUY April 10, 2024 00:25
@Elliot-xq Elliot-xq changed the title Propagate Api Key UID when it is returned by the Chemist. Propagate Api Key UID when it is returned by the service controller. Apr 10, 2024
@Elliot-xq Elliot-xq requested a review from shuoyang2016 April 10, 2024 00:28
credential_id += info.api_key;
credential_id = credential_id
+ (info.check_response_info.api_key_uid.empty() ? info.api_key
: info.check_response_info.api_key_uid);
Copy link
Collaborator

Choose a reason for hiding this comment

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

NIT: define credential_id as constchar above and use absl::StrCat to concat string.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I mean the constexpr char like in l348

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done.

@@ -176,6 +176,8 @@ struct CheckResponseInfo {
// The trust level of the API Key that was checked.
api_key::ApiKeyState api_key_state;

Copy link
Collaborator

Choose a reason for hiding this comment

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

NIT: add comment

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done.

Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Elliot-xq, TAOXUY

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@google-oss-prow google-oss-prow bot removed the lgtm label Apr 10, 2024
Copy link

New changes are detected. LGTM label has been removed.

Copy link

@Elliot-xq: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ESPv2-gke-e2e-grpc-echo-managed 408e97e link true /test ESPv2-gke-e2e-grpc-echo-managed
ESPv2-gke-e2e-http-bookstore-managed 408e97e link true /test ESPv2-gke-e2e-http-bookstore-managed
ESPv2-gke-e2e-grpc-interop-managed 408e97e link true /test ESPv2-gke-e2e-grpc-interop-managed
ESPv2-gke-e2e-http-bookstore-managed-using-sa-cred 408e97e link true /test ESPv2-gke-e2e-http-bookstore-managed-using-sa-cred
ESPv2-anthos-cloud-run-e2e-anthos-cloud-run-http-bookstore 408e97e link true /test ESPv2-anthos-cloud-run-e2e-anthos-cloud-run-http-bookstore
ESPv2-cloud-run-e2e-app-engine-http-bookstore 408e97e link true /test ESPv2-cloud-run-e2e-app-engine-http-bookstore
ESPv2-presubmit-tsan 408e97e link true /test ESPv2-presubmit-tsan
ESPv2-presubmit-asan 408e97e link true /test ESPv2-presubmit-asan

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@Elliot-xq Elliot-xq merged commit 376ad04 into GoogleCloudPlatform:master Apr 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants