Skip to content

helloworld/Main.java and most examples use OrkesApiClient — crash without auth for OSS users #96

@nthmost-orkes

Description

@nthmost-orkes

Problem

The primary examples (helloworld/Main.java, workflowops/Main.java, and all io.orkes.* examples) use ClientUtil, which builds an io.orkes.conductor.client.ApiClient — an Orkes-specific client that requires authentication credentials.

OSS Conductor does not use authentication. This means the "recommended" examples are nonfunctional for any OSS user.

Tracked as a zero-to-one onboarding blocker in conductor-oss/getting-started#51

Observed Behavior

Running helloworld/Main.java with only CONDUCTOR_SERVER_URL set:

Caused by: java.lang.NullPointerException: Cannot invoke "String.trim()" because
the return value of "java.lang.System.getenv(String)" is null
    at io.orkes.conductor.client.ApiClient$ApiClientBuilder.applyEnvVariables(ApiClient.java:186)

(See also: #94 for the NPE itself.)

Root Cause

examples/src/main/java/io/orkes/conductor/sdk/examples/util/ClientUtil.java uses:

ApiClient.builder()
    .useEnvVariables(true)
    ...
    .build();

ApiClient is the Orkes-flavored client. The base ConductorClient works without auth:

var client = new ConductorClient("http://localhost:8080/api");

The only examples that work out-of-the-box for OSS are in the com.netflix.conductor.gettingstarted package (CreateWorkflow, StartWorkflow, HelloWorker), but these are buried and not prominently documented.

Additional Context

The io.orkes.* examples also hardcode orkes.io email addresses and HTTP task URLs pointing to orkes-api-tester.orkesconductor.com, which further signals they are Orkes-specific.

Suggested Fix

  • Either add a ClientUtil-equivalent that works for OSS (env CONDUCTOR_SERVER_URL only, no auth)
  • Or clearly document which examples require Orkes vs. which work with OSS
  • Update helloworld/Main.java to use the base ConductorClient so it works for OSS users

Zero-to-one tracking: conductor-oss/getting-started#51

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingdocumentationImprovements or additions to documentation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions