You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@nifi.apache.org by "Peter Wicks (pwicks)" <pw...@micron.com> on 2018/12/14 20:38:45 UTC

Backwards Compatibility for Property with Default Value

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

Re: Backwards Compatibility for Property with Default Value

Posted by Joe Witt <jo...@gmail.com>.
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) <pw...@micron.com> 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