Skip to content

feat: FeastClient factory methods for pre-configured stubs#343

Merged
vanitabhagwat merged 2 commits intomasterfrom
feat/add-feastclient-stub-constructor
Feb 26, 2026
Merged

feat: FeastClient factory methods for pre-configured stubs#343
vanitabhagwat merged 2 commits intomasterfrom
feat/add-feastclient-stub-constructor

Conversation

@vanitabhagwat
Copy link
Collaborator

What this PR does / why we need it:

Changes:

  • Add 3 public static factory methods: createWithStub() with
    overloads for timeout and credentials
  • Refactor constructors to use delegation pattern with a private
    master constructor that handles both ManagedChannel and stub cases
  • Add comprehensive test coverage for new factory methods
  • Maintain backward compatibility with existing create() and
    createSecure() methods

Which issue(s) this PR fixes:

Previously, FeastClient could only be instantiated with a
ManagedChannel, requiring users to manage channel lifecycle
directly. This prevented integration with libraries like
eg-spring-boot-clients that abstract channel management and
only expose pre-configured stubs via getClient() methods.

The new factory methods allow users to pass a ServingServiceBlockingStub
directly, enabling seamless integration with such libraries while
maintaining the existing API surface for backward compatibility.

Misc

@vanitabhagwat vanitabhagwat changed the title feat:FeastClient factory methods for pre-configured stubs feat: FeastClient factory methods for pre-configured stubs Feb 26, 2026
Copy link
Collaborator

@piket piket left a comment

Choose a reason for hiding this comment

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

LGTM

@vanitabhagwat vanitabhagwat merged commit f2cd866 into master Feb 26, 2026
28 of 29 checks passed
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.

2 participants