Backwards Compatibility for Property with Default Value

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Backwards Compatibility for Property with Default Value

Peter Wicks (pwicks)
I'm working on a ticket that tweaks the way the Minimum File Age property works in GetFile and ListFile (NIFI-5897). Right now users see "0 sec" and assumes that means the minimum age check does not happen, when in fact it does; and in some timezone scenarios you have future dated files, and this check delays files by hours and hours...

I'm trying to provide backwards compatibility with my fix by maintaining a default value of "0 sec", in case some users actually are ignoring future dated files, but making the property not required. But, if you clear the property, the default value takes over. And if you put in an "Empty String", well, then it just fails validation.

Thoughts on the path forward? I could just remove the default value, and users who already have the processor instantiated in their Flow when they upgrade will still be fine, as the old default value will be loaded.

Thanks,
  Peter
Reply | Threaded
Open this post in threaded view
|

Re: Backwards Compatibility for Property with Default Value

Joe Witt
In this case I'd just update the behavior and docs to state that if a
value of '0 secs' is supplied then minimum age checks are bypassed
altogether.

Thanks
On Fri, Dec 14, 2018 at 3:38 PM Peter Wicks (pwicks) <[hidden email]> wrote:
>
> I'm working on a ticket that tweaks the way the Minimum File Age property works in GetFile and ListFile (NIFI-5897). Right now users see "0 sec" and assumes that means the minimum age check does not happen, when in fact it does; and in some timezone scenarios you have future dated files, and this check delays files by hours and hours...
>
> I'm trying to provide backwards compatibility with my fix by maintaining a default value of "0 sec", in case some users actually are ignoring future dated files, but making the property not required. But, if you clear the property, the default value takes over. And if you put in an "Empty String", well, then it just fails validation.
>
> Thoughts on the path forward? I could just remove the default value, and users who already have the processor instantiated in their Flow when they upgrade will still be fine, as the old default value will be loaded.
>
> Thanks,
>   Peter