-
Notifications
You must be signed in to change notification settings - Fork 564
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
[Prometheus Remote Write Exporter for Cortex] Fix Panic Issue in MutualTLS Test #315
Conversation
I changed the key generation from rsa 4096 to ecdsa p256, which improved the performance substantially. This may be because Go provides an assembly implementation of P256: See golang/go/src/crypto/elliptic. Here are the results of running With RSA 4096 (original code)
With RSA 1024
With ECDSA P256
EDIT: Now passes CI tests after running them a second time. The previous commit didn't pass, but it wasn't due to the MutualTLS test: Log from CI
|
With the discovery of how to stop certificate creation from completely stalling the build, do you think we should still check in certificates? It seems like if we are able to generate this for the test it will avoid the issue of the certificates needing to be updated in the future. Though, I, myself, am a bit undecided as this approach with static certificates will remove some uncertainty from what is being tested. I'm interested what you think @ercl and @evantorrie. |
I think that it would be better to remove the static files. It would remove the need to regenerate the certificates like you said and would make the MutualTLS test more consistent with other tests, which also create files when needed. |
I'm happy either way, but since we assume (?) that the Go crypto and tls cert libraries are well-tested, I think it's fine for us to generate the keys/certs on the fly and use them rather than checking in an additional 6-7 |
@ercl this looks good to go. Can you sync it with the master branch? |
Merged! |
* change trace.WithAttributes to append values instead of replacing * improve doc
This PR resolves the test panic described in #310.
The panic occurs because the functions for generating certificates are slower on the 386 build and can cause the
MutualTLS
test to timeout. This PR updates the test to make certificate generation optional, and adds atestdata
folder with static certificates and keys as well as a bash script for generating new certificates.