You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
core: Use Runner enum type instead of string for Job model (#651)
#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()`.
0 commit comments