19:12:49 <sdoran> #startmeeting Ansible Core public IRC meeting 19:12:49 <zodbot> Meeting started Tue Nov 12 19:12:49 2019 UTC. 19:12:49 <zodbot> This meeting is logged and archived in a public location. 19:12:49 <zodbot> The chair is sdoran. Information about MeetBot at http://wiki.debian.org/MeetBot. 19:12:49 <zodbot> Useful Commands: #action #agreed #halp #info #idea #link #topic. 19:12:49 <zodbot> The meeting name has been set to 'ansible_core_public_irc_meeting' 19:13:41 <sdoran> Doesn't look like we have anything on the agenda today. 19:14:08 <cyberpear> https://github.com/ansible/ansible/pull/64342 19:14:31 <cyberpear> I made the changes discussed last week. Hopefully someone can sanity check 19:14:48 <sdoran> #topic https://github.com/ansible/ansible/pull/64342 19:21:21 <cyberpear> Okay, maybe I'll add it to the agenda for Thursday 19:21:37 <sdoran> I'm looking at it. Seems ok. 19:21:54 <cyberpear> Thanks for looking 19:22:17 <sdoran> I was mainly just wondering if we can add tests, whether this is a bugfix or a minor_change, and the name/placement of the file. 19:22:35 <cyberpear> I can add tests 19:22:53 <cyberpear> It stigs 19:23:16 <cyberpear> It should be a noop on modern distros 19:23:37 <sdoran> Is the license correct? 19:23:59 <cyberpear> It's the jinja license where I copied it from 19:24:27 <cyberpear> But I think I can re license GPL 19:24:38 <sdoran> Hmm, we probably need to see how that jives with GPLv3. 19:24:46 <cyberpear> (Since BSD is compatible 19:24:54 <cyberpear> But IANAL 19:24:59 <sdoran> Same. 19:25:07 <cyberpear> So I left it as is 19:26:16 <cyberpear> Should someone ask legal? 19:26:57 <cyberpear> I've got another PR IF there's any thoughts on https://github.com/ansible/ansible/pull/64474 19:27:17 <cyberpear> I've got another PR if there's any thoughts on https://github.com/ansible/ansible/pull/64474 19:27:54 <cyberpear> If there's any thoughts on my other PR https://github.com/ansible/ansible/pull/64474 19:27:57 <cyberpear> If there's any thoughts on my other PR https://github.com/ansible/ansible/pull/64474 19:28:22 <cyberpear> (sorry, my phone was acting up) 19:28:33 <cyberpear> (wasn't showing my own message) 19:29:01 <cyberpear> I'll add tests as has been requested as long as there's no other comments 19:29:27 <sdoran> #topic https://github.com/ansible/ansible/pull/64474 19:31:44 <shertel> 64474 was discussed briefly in triage last week and everyone seemed fine with it. Looks like Brian left the request for tests + changelog. 19:31:53 <sdoran> Seems fine. Just needs a changelog fragment and integration tests. 19:33:28 <cyberpear> Great, will do 19:35:30 <cyberpear> thanks... that's all from me today 19:35:38 <sdoran> #topic open floor 19:37:07 <cyberpear> more an arch q: is it possible to override just a single core filter? 19:38:27 <cyberpear> seems like I need to carry my own copy of everything in filters/core.py if I want to change any of them locally 19:40:04 <cyberpear> and if it's not possible, would it be reasonable to split out core.py into one-file-per-filter? 19:40:40 <sivel> I don't know, but I don't think one file per filter would be appreciated 19:41:15 <cyberpear> if I create my own filter, and put it in a file in my role `filter_plugins/core.py`, I lose everything that would have been provided by ansible core filters, it seems 19:41:23 <sivel> don't name it core.py 19:41:46 <cyberpear> yes, except if I want to override e.g., regex_replace locally, it doesn't show up at all unless I call it core.py 19:41:54 <cyberpear> so maybe this warrants a proposal... 19:42:01 <sivel> or just name it something else 19:42:26 <sdoran> You should be able to name it just about anything so long as it's in `filter_plugins` directory. 19:42:37 <cyberpear> turn out, you can't 19:42:47 <sivel> there might be something else going on 19:42:51 <cyberpear> generally, when I use the same name, it's because it's something from devel branch that I want to run on stable ansible, or older supported ansibles 19:43:00 <sdoran> The best approach is to use a different name for the filter. 19:43:20 <sdoran> I use weird names for my custom filter files. It's what inside that counts. 19:43:25 <shertel> that looks like the only approach at the moment 19:44:00 <sdoran> What I don't know is the order in which filters are loaded, which is why it would be much safer to use a custom filter with a different name. 19:44:35 <sdoran> That has the downside of you have to modify tasks, but it's probably worth the tradeoff there. 19:45:36 <sivel> I just tested overriding a single filter and it worked fine 19:45:46 <sivel> doing more testing though 19:45:47 <cyberpear> right now, it seems to be a tradeoff of carrying the entirety of the ansible filters/*.py w/in the role, or using a custom filter name for the "backported" filter 19:45:59 * cyberpear wonders where he messed up 19:46:37 <shertel> sdoran, I think the file name is irrelevant - you can have a core.py in a filter plugin dir. It's the filter itself which can't have the same name. 19:46:38 <cyberpear> I wonder if it's a RHEL 7 vs Fedora issue, which has happened in the past w/ jinja versions, for example 19:46:39 <sivel> it has to be named something that sorts before `core.py` it seems 19:46:53 <cyberpear> hmm 19:46:57 <cyberpear> interesting 19:47:01 <sivel> a.py works, x.py does not 19:47:02 <cyberpear> okay, that's good info 19:47:23 <shertel> Ah. Makes sense. 19:47:24 <sdoran> :) 19:47:43 <cyberpear> non-intuitive, but I appreciate the info 19:47:57 <sivel> I didn't look into it any further than that 19:48:22 <cyberpear> okay, I'm happy w/ this topic for today... thanks. (same discussion works for test plugins, I assume) 19:48:56 <sivel> I would assume, but would have to test more 19:49:28 <cyberpear> I'll let folks know what I find out if there's interest, too 19:50:01 <sivel> it seems that `filter_loader.all()` returns filter files in reverse order 19:50:23 <sivel> so that is what a.py overrides, because it is added last 19:50:38 <sivel> no idea if that is intentional, or an implementation detail 19:51:21 <sivel> # We have to instantiate a list of all plugins so that we can reverse it. We reverse it so 19:51:22 <sivel> # that calling code will deduplicate this correctly. 19:51:39 <sivel> seems intentional, at some level :) 19:52:06 <cyberpear> that's good to know 20:03:04 <sdoran> Thanks everyone for coming. 20:03:06 <sdoran> #endmeeting