google-cloud-cpp icon indicating copy to clipboard operation
google-cloud-cpp copied to clipboard

`LoadP12Credentials` test flakes on Windows

Open dbolduc opened this issue 1 year ago • 4 comments

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 avatar Jun 18 '24 16:06 dbolduc

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

This time it was CreateFromP12ValidFile

dbolduc avatar Jul 10 '24 22:07 dbolduc

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

a repeat of GetKeyFromProvider().

coryan avatar Jul 25 '24 21:07 coryan

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

teo-tsirpanis avatar Jul 29 '24 00:07 teo-tsirpanis

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

dbolduc avatar Aug 14 '24 20:08 dbolduc

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

teo-tsirpanis avatar Sep 09 '24 12:09 teo-tsirpanis

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

dbolduc avatar Sep 09 '24 14:09 dbolduc