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

core: Use Runner enum type instead of string for Job model #651

Merged
merged 1 commit into from
Apr 27, 2020

Commits on Apr 26, 2020

  1. core: Use Runner enum type instead of string for Job model

    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()`.
    ches committed Apr 26, 2020
    Configuration menu
    Copy the full SHA
    b317285 View commit details
    Browse the repository at this point in the history