-
Notifications
You must be signed in to change notification settings - Fork 42
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
[BUG] org.opensearch.flowframework.util.EncryptorUtilsTests is flaky #233
Comments
And here's a CI failure. https://github.com/opensearch-project/flow-framework/actions/runs/7065973095/job/19237007060?pr=236 |
This is a strange error. The exception is thrown in this code block: public static JceMasterKey getInstance(
final SecretKey key,
final String provider,
final String keyId,
final String wrappingAlgorithm) {
switch (wrappingAlgorithm.toUpperCase()) {
case "AES/GCM/NOPADDING":
return new JceMasterKey(provider, keyId, JceKeyCipher.aesGcm(key));
default:
throw new IllegalArgumentException("Right now only AES/GCM/NoPadding is supported");
}
} But the line of code throwing the exception has a constant for that argument: JceMasterKey.getInstance(new SecretKeySpec(bytes, ALGORITHM), PROVIDER, "", WRAPPING_ALGORITHM); where
I believe it's an issue in It's 100% reproducible with
Adding on some instrumentation to test locale isolates the problem:
Output:
It's hard to see but the "i" in padding is not the correct character, unicode So two things we can do:
|
Fixed by #239 |
What is the bug?
There are 3 flaky tests all with the same exception:
run: https://github.com/opensearch-project/flow-framework/actions/runs/7052745868/job/19198492841
All the tests have this exception:
I haven't been able to reproduce this locally yet though
What is the expected behavior?
test always passes
What is your host/environment?
github runner above
Do you have any additional context?
The error is that only
AES/GCM/NoPadding
wrapping algorithm is supported, however this is the one that we are using.The text was updated successfully, but these errors were encountered: