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 flag enable_api_key_uid_reporting and report unknown when the check response status is not OK. #865

Merged
merged 3 commits into from
May 20, 2024

Conversation

Elliot-xq
Copy link
Collaborator

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

Verified in local unit testing.

Running main() from gmock_main.cc
[==========] Running 20 tests from 2 test cases.
[----------] Global test environment set-up.
[----------] 1 test from Proto
[ RUN ] Proto.TestProtobufStruct
[ OK ] Proto.TestProtobufStruct (0 ms)
[----------] 1 test from Proto (0 ms total)

[----------] 19 tests from ProtoTest
[ RUN ] ProtoTest.FillGoodCheckRequestTest
[ OK ] ProtoTest.FillGoodCheckRequestTest (1 ms)
[ RUN ] ProtoTest.FillGoodCheckRequestAndroidIosTest
[ OK ] ProtoTest.FillGoodCheckRequestAndroidIosTest (0 ms)
[ RUN ] ProtoTest.FillGoodAllocateQuotaRequestTest
[ OK ] ProtoTest.FillGoodAllocateQuotaRequestTest (1 ms)
[ RUN ] ProtoTest.FillAllocateQuotaRequestNoMethodNameTest
[ OK ] ProtoTest.FillAllocateQuotaRequestNoMethodNameTest (0 ms)
[ RUN ] ProtoTest.FillNoApiKeyCheckRequestTest
[ OK ] ProtoTest.FillNoApiKeyCheckRequestTest (0 ms)
[ RUN ] ProtoTest.CheckRequestMissingOperationNameTest
[ OK ] ProtoTest.CheckRequestMissingOperationNameTest (0 ms)
[ RUN ] ProtoTest.CheckRequestMissingOperationIdTest
[ OK ] ProtoTest.CheckRequestMissingOperationIdTest (0 ms)
[ RUN ] ProtoTest.FillGoodReportRequestTest
[ OK ] ProtoTest.FillGoodReportRequestTest (1 ms)
[ RUN ] ProtoTest.FillGoodReportRequestByConsumerTest
[ OK ] ProtoTest.FillGoodReportRequestByConsumerTest (0 ms)
[ RUN ] ProtoTest.FillStartReportRequestTest
[ OK ] ProtoTest.FillStartReportRequestTest (0 ms)
[ RUN ] ProtoTest.FillIntermediateReportRequestTest
[ OK ] ProtoTest.FillIntermediateReportRequestTest (0 ms)
[ RUN ] ProtoTest.FillFinalReportRequestTest
[ OK ] ProtoTest.FillFinalReportRequestTest (1 ms)
[ RUN ] ProtoTest.FillReportRequestFailedTest
[ OK ] ProtoTest.FillReportRequestFailedTest (0 ms)
[ RUN ] ProtoTest.FillReportRequestEmptyOptionalTest
[ OK ] ProtoTest.FillReportRequestEmptyOptionalTest (0 ms)
[ RUN ] ProtoTest.CredentailIdApiKeyTest
[ OK ] ProtoTest.CredentailIdApiKeyTest (0 ms)
[ RUN ] ProtoTest.CredentailIdApiKeyUidTest
[ OK ] ProtoTest.CredentailIdApiKeyUidTest (0 ms)
[ RUN ] ProtoTest.CredentailIdApiKeyUidUnknownTest
[ OK ] ProtoTest.CredentailIdApiKeyUidUnknownTest (0 ms)
[ RUN ] ProtoTest.CredentailIdIssuerOnlyTest
[ OK ] ProtoTest.CredentailIdIssuerOnlyTest (0 ms)
[ RUN ] ProtoTest.CredentailIdIssuerAudienceTest
[ OK ] ProtoTest.CredentailIdIssuerAudienceTest (0 ms)
[----------] 19 tests from ProtoTest (4 ms total)

[----------] Global test environment tear-down
[==========] 20 tests from 2 test cases ran. (4 ms total)
[ PASSED ] 20 tests.

bazel test -c opt start_esp/test/start_esp_test.py
INFO: Invocation ID: 9c360430-db95-407a-80ea-a1271afd7cb2
INFO: Analysed target //start_esp/test:start_esp_test.py (1 packages loaded, 1 target configured).
INFO: Found 1 target and 0 test targets...
INFO: Elapsed time: 0.297s, Critical Path: 0.00s
INFO: 0 processes.
INFO: Build completed successfully, 1 total action
INFO: Build completed successfully, 1 total action

bazel build -c opt src/api_manager/service_control:service_control
INFO: Invocation ID: 8da9dfac-02a9-4267-8d4f-14ce6e9d79a3
INFO: Analysed target //src/api_manager/service_control:service_control (0 packages loaded, 0 targets configured).
INFO: Found 1 target...
Target //src/api_manager/service_control:service_control up-to-date:
bazel-bin/src/api_manager/service_control/libservice_control.a
bazel-bin/src/api_manager/service_control/libservice_control.pic.a
bazel-bin/src/api_manager/service_control/libservice_control.so
INFO: Elapsed time: 52.720s, Critical Path: 13.46s
INFO: 942 processes: 942 processwrapper-sandbox.
INFO: Build completed successfully, 946 total actions

response status is not OK.

Verified in local unit testing.
@Elliot-xq Elliot-xq requested review from shuoyang2016 and TAOXUY May 9, 2024 22:01
@@ -0,0 +1,16 @@
# GRPC Python setup requirements
Copy link
Contributor

Choose a reason for hiding this comment

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

How do we keep this up to date now?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Up to date requirements might require Python later versions which is incompatible with ESP build rules.

Currently it's pinned to a specific version which could not update. How do you think we should address this?

Copy link
Contributor

Choose a reason for hiding this comment

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

I don't know. I think we have no choice to postpone the tech debts to later. Can you please log a TODO bug? File one in bugnizer so we can ask for resources based on these data points.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Sure, created todo and internal bug b/341556079.

@@ -385,6 +385,31 @@ TEST_F(ProtoTest, CredentailIdApiKeyTest) {
"apikey:api_key_x");
}

TEST_F(ProtoTest, CredentailIdApiKeyUidTest) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: typo "credential"?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

changed.

@Elliot-xq Elliot-xq merged commit 73ae111 into master May 20, 2024
5 checks passed
@TAOXUY TAOXUY mentioned this pull request Jun 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants