Skip to content

Conversation

AngerM-DD
Copy link
Contributor

This adds a health check to the cadence-java sdk. It is useful is k8s environments where you pass in a DNS name as opposed to an IP address. This change allows you to detect if the client can no longer connect to the cadence servers and attempt to re-resolve the dns name if one was used.

Copy link
Contributor

@longquanzheng longquanzheng left a comment

Choose a reason for hiding this comment

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

LGTM(except that the name of isHealthy may be misleading for caller.

@mkolodezny @meiliang86 do you also want to take a look?
This PR should be safe to land -- it introduces a new optional API in worker/workerFactory and doesn't change any existing behavior.

@AngerM-DD thank you for the contribution.

@coveralls
Copy link

Pull Request Test Coverage Report for Build 762

  • 1 of 46 (2.17%) changed or added relevant lines in 7 files are covered.
  • 5 unchanged lines in 2 files lost coverage.
  • Overall coverage decreased (-0.2%) to 71.398%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/main/java/com/uber/cadence/internal/sync/SyncWorkflowWorker.java 1 2 50.0%
src/main/java/com/uber/cadence/internal/sync/TestActivityEnvironmentInternal.java 0 1 0.0%
src/main/java/com/uber/cadence/internal/sync/TestWorkflowEnvironmentInternal.java 0 1 0.0%
src/main/java/com/uber/cadence/worker/Worker.java 0 1 0.0%
src/main/java/com/uber/cadence/internal/testservice/TestWorkflowService.java 0 3 0.0%
src/main/java/com/uber/cadence/worker/WorkerFactory.java 0 7 0.0%
src/main/java/com/uber/cadence/serviceclient/WorkflowServiceTChannel.java 0 31 0.0%
Files with Coverage Reduction New Missed Lines %
src/main/java/com/uber/cadence/internal/sync/WorkflowThreadImpl.java 1 77.2%
src/main/java/com/uber/cadence/internal/sync/WorkflowThreadContext.java 4 82.46%
Totals Coverage Status
Change from base Build 707: -0.2%
Covered Lines: 10664
Relevant Lines: 14936

💛 - Coveralls

@longquanzheng longquanzheng merged commit 63a34bc into cadence-workflow:master Jun 25, 2021
demirkayaender added a commit to demirkayaender/cadence-java-client that referenced this pull request Jul 13, 2021
AngerM-DD added a commit to AngerM-DD/cadence-java-client that referenced this pull request Oct 26, 2021
new files

undo defaultContextProp changes

remove bad calls to method no longer in this pr

remove health check from this PR

remove default adding of otel

Add Health check API to worker and service interface (cadence-workflow#617)
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.

3 participants