Fix Java SDK zero-to-one: NPE on OSS, no run task, helloworld requires Orkes auth#97
Open
nthmost-orkes wants to merge 2 commits intomainfrom
Open
Fix Java SDK zero-to-one: NPE on OSS, no run task, helloworld requires Orkes auth#97nthmost-orkes wants to merge 2 commits intomainfrom
nthmost-orkes wants to merge 2 commits intomainfrom
Conversation
When neither CONDUCTOR_AUTH_KEY nor CONDUCTOR_SERVER_AUTH_KEY is set (the normal case for OSS Conductor users), the backwards-compatibility fallback called .trim() on a null return value, crashing with NPE. Null-check the legacy env vars before calling .trim() so that OSS users who only set CONDUCTOR_SERVER_URL can build an ApiClient without error. Fixes #94 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…om helloworld - Add `application` plugin to examples/build.gradle so `./gradlew :examples:run` works out of the box (defaults to helloworld Main; override with -PmainClass=...) - Update helloworld/Main.java to use ConductorClient directly with CONDUCTOR_SERVER_URL env var instead of ClientUtil/ApiClient — no auth required for OSS Conductor - Update examples/README.md with concrete run instructions for both OSS and Orkes Fixes #95 #96 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Three issues that blocked any first-time OSS user from running the Java SDK examples.
Fix 1: ApiClient NPE when auth keys not set (fixes #94)
ApiClient.applyEnvVariables()called.trim()on a nullSystem.getenv()result when the legacy auth env vars were also absent. OSS Conductor users don't need auth keys — this crash stopped them before a single line of example code ran.Fix 2: examples module has no run task (fixes #95)
Added
applicationplugin toexamples/build.gradle:Fix 3: helloworld/Main.java required Orkes auth (fixes #96)
Replaced
ClientUtil(OrkesApiClient, requires auth) with a directConductorClientfromCONDUCTOR_SERVER_URL. Updatedexamples/README.mdwith OSS and Orkes run instructions.Verified
./gradlew :examples:runagainst a local OSS Conductor server →Workflow execution status: COMPLETEDZero-to-one tracking: conductor-oss/getting-started#51
🤖 Generated with Claude Code