Skip to content

MLE-26966 Simplifying Nuclia options#609

Merged
rjrudin merged 1 commit intodevelopfrom
feature/26966-renames
Feb 4, 2026
Merged

MLE-26966 Simplifying Nuclia options#609
rjrudin merged 1 commit intodevelopfrom
feature/26966-renames

Conversation

@rjrudin
Copy link
Contributor

@rjrudin rjrudin commented Feb 4, 2026

Only need a NUA key by default now. Removed region, added API URL as a fallback. Touched up logging some more, needed to get the filename in there for debug purposes.

Only need a NUA key by default now. Removed region, added API URL as a fallback. Touched up logging some more, needed to get the filename in there for debug purposes.
Copilot AI review requested due to automatic review settings February 4, 2026 16:11
@github-actions
Copy link

github-actions bot commented Feb 4, 2026

Copyright Validation Results
Total: 5 | Passed: 5 | Failed: 0 | Skipped: 0 | at: 2026-02-04 16:11:42 UTC | commit: 250a4af

✅ Valid Files

  • marklogic-spark-connector/src/main/java/com/marklogic/spark/Options.java
  • marklogic-spark-connector/src/main/java/com/marklogic/spark/core/DocumentPipelineFactory.java
  • marklogic-spark-connector/src/main/java/com/marklogic/spark/core/nuclia/NucliaClient.java
  • marklogic-spark-connector/src/test/java/com/marklogic/spark/core/DocumentPipelineFactoryTest.java
  • marklogic-spark-connector/src/test/java/com/marklogic/spark/writer/nuclia/NucliaAdHocTest.java

✅ All files have valid copyright headers!

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR simplifies the Nuclia integration by replacing the region-based API key approach with a single NUA key configuration. The NUA key is now the only required option, with the API URL configurable as an optional fallback instead of requiring a region specification.

Changes:

  • Replaced WRITE_NUCLIA_API_KEY with WRITE_NUCLIA_NUA_KEY and removed WRITE_NUCLIA_REGION requirement
  • Introduced a Builder pattern for NucliaClient construction with optional API URL configuration
  • Updated test files to use the new NUA key environment variable and option naming

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
NucliaAdHocTest.java Updated test to use new NUCLIA_NUA_KEY environment variable and removed region configuration
DocumentPipelineFactoryTest.java Updated all test cases to use new NUA key option and removed region-related test
NucliaClient.java Refactored to use Builder pattern with NUA key, added default API URL, and removed region parameter
DocumentPipelineFactory.java Updated to use Builder pattern for NucliaClient construction with optional API URL
Options.java Renamed API key option to NUA key and replaced region option with API URL

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

this.baseUrl = builder.apiUrl;
this.timeoutSeconds = builder.timeoutSeconds;

this.httpClient = new OkHttpClient.Builder().build();
Copy link

Copilot AI Feb 4, 2026

Choose a reason for hiding this comment

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

The HTTP client is created without applying the timeout configuration from builder.timeoutSeconds. The read timeout should be set using .readTimeout(builder.timeoutSeconds, TimeUnit.SECONDS) in the builder chain.

Suggested change
this.httpClient = new OkHttpClient.Builder().build();
this.httpClient = new OkHttpClient.Builder()
.readTimeout(this.timeoutSeconds, TimeUnit.SECONDS)
.build();

Copilot uses AI. Check for mistakes.
@rjrudin rjrudin merged commit 64204ab into develop Feb 4, 2026
4 checks passed
@rjrudin rjrudin deleted the feature/26966-renames branch February 4, 2026 18:21
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