Skip to content

fix(insight): build OpenSearchExporter without the auth artifact - #717

Merged
wangyb-A merged 1 commit into
feat/insight-exporters-parityfrom
fix/insight-opensearch-optional-auth
Sep 15, 2026
Merged

wangyb-A merged 1 commit into
feat/insight-exporters-parityfrom
fix/insight-opensearch-optional-auth

Conversation

@wangyb-A

Copy link
Copy Markdown
Contributor

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Issue Link, if available

Stacked on #704; addresses #704 (comment)

Description

OpenSearchExporter.build() threw NoClassDefFoundError when software.amazon.awssdk:auth was absent, in both auth modes: the constructor's lambda captured an AwsCredentialsProvider local, so linking the call site loaded the optional type. The provider is now held as Object and cast inside Signer, which is created on first SigV4 export, so only that path links the auth artifact. The missing-artifact message now names both http-auth-aws and auth.

Demo/Screenshots

N/A

Checklist

  • I have filled out every section of the PR template
  • I have thoroughly tested this change

Testing

Unit Tests

OptionalArtifactTest gains three cases: SigV4 with http-auth-aws removed and with auth removed (build succeeds, export fails naming the artifacts), and basic auth with auth removed (build succeeds, export delivers). The isolated loader now parents to the platform loader so java.net.http resolves. mvn -pl insight-plugin clean install: 144 tests pass.

Integration Tests

Not applicable.

Examples

Not applicable.

- Hold the credentials provider as Object so building the exporter never links the auth types
- Cast inside Signer, created on first SigV4 export
- Cover OpenSearchExporter in OptionalArtifactTest with http-auth-aws and auth removed
@wangyb-A
wangyb-A marked this pull request as ready for review September 15, 2026 18:45
@wangyb-A
wangyb-A deployed to ai-pr-review-runtime September 15, 2026 18:45 — with GitHub Actions Active
@wangyb-A
wangyb-A deployed to ai-pr-review-runtime September 15, 2026 19:03 — with GitHub Actions Active
@wangyb-A
wangyb-A added this pull request to stack #718 September 15, 2026 19:09
@github-actions

Copy link
Copy Markdown
Contributor

Codex AI review

No actionable findings. Residual risk: tests were not executed because the review was restricted to read-only inspection.

Reviewed commit 90981c669b1f55db2724ebb5e01066e3d86011b1. Workflow run

@wangyb-A
wangyb-A merged commit 0f8556f into main Sep 15, 2026
27 of 29 checks passed
@wangyb-A
wangyb-A deleted the fix/insight-opensearch-optional-auth branch September 15, 2026 21:10

This branch was successfully deployed

1 active deployment
ai-pr-review-runtime 90981c66 Deployed Sep 15, 2026 by wangyb-A via ai-pr-review / Codex review / Generate Codex review #874
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants