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

Add a flag to opt out reporting api key uid and report unknown in network error. #897

Merged
merged 6 commits into from
May 16, 2024

Conversation

Elliot-xq
Copy link
Contributor

@Elliot-xq Elliot-xq commented May 2, 2024

  1. adds flag service_control_report_api_key_uid with default false.
    TODO: enable it before release.

  2. reports unknown in check request network failure.

@Elliot-xq Elliot-xq requested a review from TAOXUY May 2, 2024 21:22
@Elliot-xq Elliot-xq requested a review from shuoyang2016 May 2, 2024 21:22
@google-oss-prow google-oss-prow bot added size/L and removed size/M labels May 2, 2024
if (info.check_response_info.error.is_network_error) {
(*labels)[l.name] = absl::StrCat(kApiKeyPrefix, "UNKNOWN");
} else {
(*labels)[l.name] = absl::StrCat(kApiKeyPrefix, info.check_response_info.api_key_uid.empty() ? info.api_key
Copy link
Collaborator

Choose a reason for hiding this comment

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

Do we still report API key if the flag is true?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, according to Chemist team, for some old apis, they don't have api_key_uid, thus we still need to report api_key when api_key_uid is empty.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Got it. Thanks.

@Elliot-xq Elliot-xq self-assigned this May 2, 2024
Copy link
Collaborator

@shuoyang2016 shuoyang2016 left a comment

Choose a reason for hiding this comment

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

if (info.check_response_info.error.is_network_error) {
(*labels)[l.name] = absl::StrCat(kApiKeyPrefix, "UNKNOWN");
} else {
(*labels)[l.name] = absl::StrCat(kApiKeyPrefix, info.check_response_info.api_key_uid.empty() ? info.api_key
Copy link
Collaborator

Choose a reason for hiding this comment

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

Got it. Thanks.

@google-oss-prow google-oss-prow bot removed the lgtm label May 2, 2024
@Elliot-xq
Copy link
Contributor Author

@Elliot-xq
Copy link
Contributor Author

/retest-required

Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Elliot-xq, shuoyang2016, 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:
  • OWNERS [TAOXUY,shuoyang2016]

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

Copy link

New changes are detected. LGTM label has been removed.

@google-oss-prow google-oss-prow bot removed the lgtm label May 10, 2024
@Elliot-xq
Copy link
Contributor Author

/retest-required

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-presubmit-tsan b6995b1 link true /test ESPv2-presubmit-tsan
ESPv2-presubmit-asan b6995b1 link true /test ESPv2-presubmit-asan
ESPv2-anthos-cloud-run-e2e-anthos-cloud-run-http-bookstore b6995b1 link true /test ESPv2-anthos-cloud-run-e2e-anthos-cloud-run-http-bookstore

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-sigs/prow repository. I understand the commands that are listed here.

@Elliot-xq Elliot-xq merged commit f957a38 into master May 16, 2024
18 of 22 checks passed
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.

4 participants