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

Fixed bug in featurset proto to model conversion in DataflowJobManager #578

Merged
merged 1 commit into from
Mar 27, 2020
Merged

Fixed bug in featurset proto to model conversion in DataflowJobManager #578

merged 1 commit into from
Mar 27, 2020

Conversation

mrzzy
Copy link
Collaborator

@mrzzy mrzzy commented Mar 27, 2020

What this PR does / why we need it:
Which issue(s) this PR fixes:
Fixes Bug caused by toString() method being used in the conversion lambda used to convert from FeatureSet protos to FeatureSet models instead of the getName() method.

Since the conversion lambda duplicates functionality already implemented by FeatureSet.fromProto(), removing the lambda block in favor using the method to do the conversion.

Fixes #577

Does this PR introduce a user-facing change?:

NONE

Bug caused by toString() method being used in the conversion lambda instead of
the getName() method.  Since lambda duplicates functionality already
implemented by Feature.fromProto, removing the lambda block in favor
using the method to do the conversion.
@feast-ci-bot
Copy link
Collaborator

Hi @mrzzy. Thanks for your PR.

I'm waiting for a gojek member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@woop
Copy link
Member

woop commented Mar 27, 2020

/ok-to-test

@feast-ci-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: mrzzy, woop

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@woop
Copy link
Member

woop commented Mar 27, 2020

/lgtm

@feast-ci-bot feast-ci-bot merged commit 90debca into feast-dev:master Mar 27, 2020
khorshuheng pushed a commit to khorshuheng/feast that referenced this pull request Apr 15, 2020
feast-dev#578)

Bug caused by toString() method being used in the conversion lambda instead of
the getName() method.  Since lambda duplicates functionality already
implemented by Feature.fromProto, removing the lambda block in favor
using the method to do the conversion.

Co-authored-by: Zhu Zhanyan <zhu.zhanyan@gojek.com>
khorshuheng pushed a commit that referenced this pull request Apr 15, 2020
#578)

Bug caused by toString() method being used in the conversion lambda instead of
the getName() method.  Since lambda duplicates functionality already
implemented by Feature.fromProto, removing the lambda block in favor
using the method to do the conversion.

Co-authored-by: Zhu Zhanyan <zhu.zhanyan@gojek.com>
@mrzzy mrzzy deleted the fix-jpa-error-bug branch April 22, 2020 03:18
@ches ches added the backport-candidate Changes that may be desired for backport to earlier Feast release tracks label Apr 25, 2020
ches added a commit to agoda-com/feast that referenced this pull request Apr 26, 2020
feast-dev#575 sought to clear up inconsistencies between uses of `Runner#name()`
(the standard final method of `java.lang.Enum` that returns the value's
enum constant name) and the riskily-named `Runner#getName()` defined in
Feast for human-readable Beam Runner names.

The latter is used as runner name users can set in config. The former
is used for values of the runner column of the jobs table in SQL (as it
should be). But it relied on careful coding to use the right one when
constructing `Job` instances. This is error prone, as feast-dev#578 demonstrates.

There is a more robust way: use the enum instead of stringly-typed
programming. It's one of the reasons we have enums :-)

This also renames the internal identifier in the Runner definition to
`humanName`, to distinguish it further from `Enum#name()`.
feast-ci-bot pushed a commit that referenced this pull request Apr 27, 2020
#575 sought to clear up inconsistencies between uses of `Runner#name()`
(the standard final method of `java.lang.Enum` that returns the value's
enum constant name) and the riskily-named `Runner#getName()` defined in
Feast for human-readable Beam Runner names.

The latter is used as runner name users can set in config. The former
is used for values of the runner column of the jobs table in SQL (as it
should be). But it relied on careful coding to use the right one when
constructing `Job` instances. This is error prone, as #578 demonstrates.

There is a more robust way: use the enum instead of stringly-typed
programming. It's one of the reasons we have enums :-)

This also renames the internal identifier in the Runner definition to
`humanName`, to distinguish it further from `Enum#name()`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved backport-candidate Changes that may be desired for backport to earlier Feast release tracks lgtm ok-to-test size/S
Projects
None yet
Development

Successfully merging this pull request may close these issues.

JPA Exception when using Dataflow Runner
4 participants