Skip to content

Conversation

@shaileshpadave
Copy link
Contributor

@shaileshpadave shaileshpadave commented Jul 30, 2025

Pull Request type

  • Bugfix
  • Feature
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • WHOSUSING.md
  • Other (please describe):

NOTE: Please remember to run ./gradlew spotlessApply to fix any format violations.

Changes in this PR

Added SharedResourceClient and WebhookClient

Describe the new behavior from this PR, and why it's needed
Issue #

Alternatives considered

Describe alternative implementation you have considered

@codecov
Copy link

codecov bot commented Jul 30, 2025

Codecov Report

❌ Patch coverage is 0% with 107 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
...o/orkes/conductor/client/http/WebhookResource.java 0.00% 47 Missing ⚠️
...io/orkes/conductor/client/http/SharedResource.java 0.00% 27 Missing ⚠️
...rkes/conductor/client/http/OrkesWebhookClient.java 0.00% 23 Missing ⚠️
...nductor/client/http/OrkesSharedResourceClient.java 0.00% 8 Missing ⚠️
...n/java/io/orkes/conductor/client/OrkesClients.java 0.00% 2 Missing ⚠️
Files with missing lines Coverage Δ Complexity Δ
...n/java/io/orkes/conductor/client/OrkesClients.java 0.00% <0.00%> (ø) 0.00 <0.00> (ø)
...nductor/client/http/OrkesSharedResourceClient.java 0.00% <0.00%> (ø) 0.00 <0.00> (?)
...rkes/conductor/client/http/OrkesWebhookClient.java 0.00% <0.00%> (ø) 0.00 <0.00> (?)
...io/orkes/conductor/client/http/SharedResource.java 0.00% <0.00%> (ø) 0.00 <0.00> (?)
...o/orkes/conductor/client/http/WebhookResource.java 0.00% <0.00%> (ø) 0.00 <0.00> (?)

... and 17 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Shailesh Jagannath Padave added 2 commits July 30, 2025 15:53
ConductorClientResponse<List<WebhookConfig>> response = getAllWebhooks();
return response != null && response.getData() != null ? response.getData() : List.of();
} catch (Exception e) {
return List.of();
Copy link
Contributor

Choose a reason for hiding this comment

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

Is it intentional? For me as a developer it would be very confusing.

public ConductorClientResponse<WebhookConfig> updateWebhook(String id, WebhookConfig webhookConfig) {
ConductorClientRequest request = ConductorClientRequest.builder()
.method(Method.PUT)
.path("/metadata/webhook/" + id)
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: mostly in the code pathParam is used

return client.execute(request, new TypeReference<>() {
});
}
} No newline at end of file
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: new line. Doesn't spotless should check it? I'll take a look later


private String key;
private String value;
public String key;
Copy link
Contributor

Choose a reason for hiding this comment

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

Why do you need this? getter/setter is usually preferred in Java

private String createdBy;
private List<Tag> tags;

private List<WebhookExecutionHistory> webhookExecutionHistory;//TODO Remove this
Copy link
Contributor

Choose a reason for hiding this comment

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

What is this TODO? Should it be merged? If yes, then I'd add to the comment info about when and why it should be removed/

// Test error scenarios

// Test getting non-existent webhook
try {
Copy link
Contributor

Choose a reason for hiding this comment

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

assert throws

Copy link
Contributor

Choose a reason for hiding this comment

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

Seems like tests are mostly generated by LLM. I don't think they are maintainable. Are we ok with having lots of working but not maintainable tests.

Copy link
Contributor

@IvanKulik-sm IvanKulik-sm left a comment

Choose a reason for hiding this comment

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

  1. catch (){return } - I'm against it, let's discuss why we are doing it.
  2. E2E tests - are we ok with this LLM generated tests?

@IvanKulik-sm IvanKulik-sm self-requested a review August 1, 2025 15:55
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