Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Java Client v4 documentation #268

Merged
merged 2 commits into from
Sep 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/workflows/java-client-v4-integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ on:
types:
- completed

# allow this workflow to update the status of the PR that triggered it
permissions:
statuses: write
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Apart from the documentation I'm making this change to fix a 403 response when trying to update the PR status https://github.com/conductor-oss/conductor/actions/runs/10930113251/job/30342332639#step:7:29


jobs:
integrations-tests:
runs-on: ubuntu-latest
Expand Down
31 changes: 16 additions & 15 deletions conductor-clients/java/conductor-java-sdk/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Conductor Java Client/SDK V3
# Conductor Java Client/SDK V4

## Overview

Expand All @@ -10,9 +10,9 @@ These changes are largely driven by **"dependency optimization"** and a redesign

This client has a reduced dependency set. The aim is to minimize Classpath pollution and prevent potential conflicts.

Take Netflix Eureka as an example, Spring Cloud users have reported version conflicts. Some of them weren't even using Eureka. So, we've decided to remove the direct dependency.
Consider Netflix Eureka, a direct dependency of the OSS v3 client. Some users have reported version conflicts. To prevent these unnecessary conflicts and the hassle of managing exclusions in Gradle or Maven configurations, weve decided to remove this direct dependency.

In the client it's used by the `TaskPollExecutor` before polling to make the following check:
In OSS v3 client it's used by `TaskPollExecutor` before polling to make the following check:

```java
if (eurekaClient != null
Expand All @@ -23,7 +23,7 @@ if (eurekaClient != null
}
```

You will be able to achieve the same with a `PollFilter`. It could look something like this:
You will be able to achieve the same with a `PollFilter` (we plan to provide modules with some implementations). It could look something like this:

```java
var runnerConfigurer = new TaskRunnerConfigurer
Expand All @@ -34,19 +34,15 @@ You will be able to achieve the same with a `PollFilter`. It could look somethin
})
.withListener(PollCompleted.class, (e) -> {
log.info("Poll Completed {}", e);
var timer = prometheusRegistry.timer("poll_success", "type", e.getTaskType());
var timer = prometheusRegistry.timer("poll_completed", "type", e.getTaskType());
timer.record(e.getDuration());
})
.withListener(TaskExecutionFailure.class, (e) -> {
log.error("Task Execution Failure {}", e);
var counter = prometheusRegistry.counter("execute_failure", "type", e.getTaskType(), "id", e.getTaskId());
counter.increment();
})
.build();

runnerConfigurer.init();
```

The telemetry part was also removed but you can achieve the same with Events and Listeners as shown in the example.
The telemetry part was also removed but you can achieve the same with a MetricsCollector, or Events and Listeners as shown in the example.

### Breaking Changes

Expand Down Expand Up @@ -82,8 +78,13 @@ public Builder withEurekaClient(EurekaClient eurekaClient) {

## TODO

- Stabilize the codebase
- Complete documentation
- Gather community feedback
- Achieve production readiness
Take a look at this board: https://github.com/orgs/conductor-oss/projects/3

## Feedback

We are building this based on feedback from our users and community.

We encourage everyone to share their thoughts and feedback! You can create new GitHub issues or comment on existing ones. You can also join our [Slack community](https://orkes-conductor.slack.com/) to connect with us.

Thank you! ♥

Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@

/**
* This class exists to maintain backward compatibility and facilitate the migration for
* users of orkes-conductor-client v2 to v3.
* users of orkes-conductor-client v2.
*/
@Deprecated
public final class ApiClient extends ConductorClient {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

/**
* This class exists to maintain backward compatibility and facilitate the migration
* for users of orkes-conductor-client v2 to v3.
* for users of orkes-conductor-client v2.
*/
@Deprecated
public class ApiException extends ConductorClientException {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
* API response returned by API call.
* <p>
* This class exists to maintain backward compatibility and facilitate the migration for users
* of orkes-conductor-client v2 to v3.
* of orkes-conductor-client v2.
*
* @param <T> The type of data that is deserialized from response body
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

/**
* This class exists to maintain backward compatibility and facilitate the migration for
* users of orkes-conductor-client v2 to v3.
* users of orkes-conductor-client v2.
*/
@Deprecated
public class Pair {
Expand Down
Loading