Skip to content

Conversation

@beanuwave
Copy link
Contributor

@beanuwave beanuwave commented Aug 13, 2025

Description

The issue is within PemTrustConfigTests#generateRandomByteArrayOfLength
when random bytes accidentally start with 0x30 (the ASN.1 SEQUENCE tag), the certificate parser do attempt to parse them as DER-encoded ASN.1 data, leading to a different error message ("cannot create trust using PEM certificates") compared to when the bytes clearly aren't certificate-like ("Failed to parse any certificate from"). This cause test flakiness because the same test would sometimes pass with one expected error message and sometimes fail when the random data triggers the other parsing path.

Related Issues

Resolves #17983

Check List

  • Functionality includes testing.
  • API changes companion pull request created, if applicable.
  • Public documentation issue/PR created, if applicable.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

@beanuwave beanuwave requested a review from a team as a code owner August 13, 2025 11:57
@github-actions
Copy link
Contributor

❌ Gradle check result for 1606dff: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

Copy link
Member

@cwperks cwperks left a comment

Choose a reason for hiding this comment

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

Thank you for the flaky test fix! 🎉

@github-actions
Copy link
Contributor

❌ Gradle check result for 1606dff: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

@github-actions
Copy link
Contributor

❌ Gradle check result for 76322ec: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

(opensearch-project#19057)

Signed-off-by: Igonin <iigonin@sternad.de>
Co-authored-by: Benny Goerzig <benny.goerzig@sap.com>
Co-authored-by: Karsten Schnitter <k.schnitter@sap.com>
Co-authored-by: Kai Sternad <k.sternad@sternad.de>
@github-actions
Copy link
Contributor

❌ Gradle check result for 41c1fb2: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

@github-actions
Copy link
Contributor

✅ Gradle check result for 41c1fb2: SUCCESS

@andrross andrross merged commit 600f47e into opensearch-project:main Aug 14, 2025
30 of 43 checks passed
RajatGupta02 pushed a commit to RajatGupta02/OpenSearch that referenced this pull request Aug 18, 2025
…opensearch-project#19057)

(opensearch-project#19057)

Signed-off-by: Igonin <iigonin@sternad.de>
Co-authored-by: Igonin <iigonin@sternad.de>
Co-authored-by: Benny Goerzig <benny.goerzig@sap.com>
Co-authored-by: Karsten Schnitter <k.schnitter@sap.com>
Co-authored-by: Kai Sternad <k.sternad@sternad.de>
karenyrx pushed a commit to karenyrx/OpenSearch that referenced this pull request Aug 21, 2025
…opensearch-project#19057)

(opensearch-project#19057)

Signed-off-by: Igonin <iigonin@sternad.de>
Co-authored-by: Igonin <iigonin@sternad.de>
Co-authored-by: Benny Goerzig <benny.goerzig@sap.com>
Co-authored-by: Karsten Schnitter <k.schnitter@sap.com>
Co-authored-by: Kai Sternad <k.sternad@sternad.de>
atris pushed a commit to atris/OpenSearch that referenced this pull request Aug 28, 2025
…opensearch-project#19057)

(opensearch-project#19057)

Signed-off-by: Igonin <iigonin@sternad.de>
Co-authored-by: Igonin <iigonin@sternad.de>
Co-authored-by: Benny Goerzig <benny.goerzig@sap.com>
Co-authored-by: Karsten Schnitter <k.schnitter@sap.com>
Co-authored-by: Kai Sternad <k.sternad@sternad.de>
kh3ra pushed a commit to kh3ra/OpenSearch that referenced this pull request Sep 5, 2025
…opensearch-project#19057)

(opensearch-project#19057)

Signed-off-by: Igonin <iigonin@sternad.de>
Co-authored-by: Igonin <iigonin@sternad.de>
Co-authored-by: Benny Goerzig <benny.goerzig@sap.com>
Co-authored-by: Karsten Schnitter <k.schnitter@sap.com>
Co-authored-by: Kai Sternad <k.sternad@sternad.de>
vinaykpud pushed a commit to vinaykpud/OpenSearch that referenced this pull request Sep 26, 2025
…opensearch-project#19057)

(opensearch-project#19057)

Signed-off-by: Igonin <iigonin@sternad.de>
Co-authored-by: Igonin <iigonin@sternad.de>
Co-authored-by: Benny Goerzig <benny.goerzig@sap.com>
Co-authored-by: Karsten Schnitter <k.schnitter@sap.com>
Co-authored-by: Kai Sternad <k.sternad@sternad.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants