googleapis / google-cloud-cpp

C++ Client Libraries for Google Cloud Services
https://cloud.google.com/
Apache License 2.0
547 stars 369 forks source link

`LoadP12Credentials` test flakes on Windows #14349

Closed dbolduc closed 1 month ago

dbolduc commented 4 months ago

https://github.com/googleapis/google-cloud-cpp/actions/runs/9559232391

[ RUN      ] GoogleCredentialsTest.LoadP12Credentials
D:\a\google-cloud-cpp\google-cloud-cpp\google\cloud\storage\oauth2\google_credentials_test.cc(549): error: Value of: creds
Expected: code is equal to OK and message is anything
  Actual: 40-byte object <90-52 3D-F5 0D-02 00-00 00-CC CC-CC CC-CC CC-CC 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 CC-CC CC-CC CC-CC CC-CC>, whose status is INVALID_ARGUMENT: No private key found in PKCS#12 file (C:\Users\RUNNER~1\AppData\Local\Temp\credentials.p12): Key does not exist.
 (error code 2148073485) error_info={reason=INVALID_ARGUMENT, domain=gcloud-cpp, metadata={gcloud-cpp.source.filename=D:\a\google-cloud-cpp\google-cloud-cpp\google\cloud\internal\win32\parse_service_account_p12_file.cc, gcloud-cpp.version=v2.26.0-rc, gcloud-cpp.source.line=171, gcloud-cpp.source.function=GetKeyFromProvider}}, with a code that isn't equal to OK, but a message that is anything

[  FAILED  ] GoogleCredentialsTest.LoadP12Credentials (206 ms)

The following tests FAILED:
    346 - storage_oauth2_google_credentials_test (Failed)
dbolduc commented 3 months ago

https://github.com/googleapis/google-cloud-cpp/actions/runs/9881692763/job/27293859323#step:12:3358

This time it was CreateFromP12ValidFile

coryan commented 2 months ago

https://github.com/googleapis/google-cloud-cpp/actions/runs/10101370384/job/27934825274?pr=14558#step:12:3381

a repeat of GetKeyFromProvider().

teo-tsirpanis commented 2 months ago

I've been aware of this issue and will try alternative methods to obtain the private key when I have time.

dbolduc commented 2 months ago

https://github.com/googleapis/google-cloud-cpp/actions/runs/10394011938/job/28782826586?pr=14644#step:12:3393

teo-tsirpanis commented 1 month ago

Has this reproduced since #14645? Maybe we can close the issue.

dbolduc commented 1 month ago

I haven't seen a flake. I am fine with closing the issue. If it happens again, we can always reopen the issue.