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

Fix bug in core not setting default Kafka source #297

Merged
merged 2 commits into from
Nov 8, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Next Next commit
Fix bug in core not setting default Kafka source
  • Loading branch information
woop committed Nov 8, 2019
commit c991bd144c5d1481cd2fce6dcd41dd37eda0e7ef
4 changes: 3 additions & 1 deletion core/src/main/java/feast/core/model/Source.java
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,9 @@ public Source(SourceType type, KafkaSourceConfig config, boolean isDefault) {
*/
public static Source fromProto(SourceProto.Source sourceProto) {
if (sourceProto.equals(SourceProto.Source.getDefaultInstance())) {
return new Source();
Source source = new Source();
source.isDefault = true;
return source;
}

switch (sourceProto.getType()) {
Expand Down
4 changes: 2 additions & 2 deletions sdk/python/feast/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ def _apply_feature_set(self, feature_set: FeatureSet):
self._connect_core()
feature_set._client = self

try:
try
apply_fs_response = self._core_service_stub.ApplyFeatureSet(
ApplyFeatureSetRequest(feature_set=feature_set.to_proto()),
timeout=GRPC_CONNECTION_TIMEOUT_APPLY,
Expand All @@ -219,7 +219,7 @@ def _apply_feature_set(self, feature_set: FeatureSet):
feature_set._update_from_feature_set(applied_fs, is_dirty=False)
return
if apply_fs_response.status == ApplyFeatureSetResponse.Status.NO_CHANGE:
print(f'No change detected in feature set {feature_set.name}:{feature_set.version}')
print(f'No change detected in feature set {feature_set.name}')
return
except grpc.RpcError as e:
print(format_grpc_exception("ApplyFeatureSet", e.code(), e.details()))
Expand Down