[14:20] i should be pushing my stuff to Codeberg instead of github with how unhappy Travis has been with my work [14:20] or, you know, develop on the VM that I'm testing?? [14:48] okay! I have the parser and the state object in somewhat usable form [14:50] but now I'm already wishing I could access the Ifstate objects by name [14:50] I'd have to make it … iterable? [14:55] Also: https://github.com/igalic/cloud-init/blob/net/add-ifconfig-parsers/cloudinit/distros/parsers/ifconfig.py ← should I put me in (c) here or the FreeBSD Foundation? [15:10] also, i need to fix def foo(self) -> list[str]: [15:11] Python 3.8 doesn't seem to like that [15:11] Might have to use List[str]? [15:20] okay, 1 mypy error down, 48 to go… [15:24] hrm… might be easier to return {'name': Ifstate(name, ifs[name])} even if that duplicates name… [15:55] * smoser learns of codeberg === esv_ is now known as esv [17:10] smoser: it's a coop. When i have money again, I'm planning to become a contributing member [18:13] just a quick sanity check: when using write_files, and specifying permissions for a file to be created, will that also affect permissions for all of the intermediate dirs that may need to be created? [20:13] ananke: i couldn't figure it out from a quick glance at the docs. What does the source say? [20:31] I need some help with those mypy errors. Half of them make no sense to me. [20:32] cloudinit/distros/parsers/ifconfig.py:17: error: Need type annotation for "DEFAULT_IF" # why?? [21:06] Where's aciba when you, when I need 'em? [21:08] DEFAULT_IF: Mapping[str, Any] ... ? [21:12] * meena is in #python asking important questions [21:14] * falcojr missed first half of that conversation [21:51] falcojr: got rid of DEFAULT_IF completely… [21:52] new code: https://codeberg.org/meena/cloud-init/src/commit/0f0aaec6cb1b8318e7d859af899c06caf264170b/cloudinit/distros/parsers/ifconfig.py but now mypy is giving me lots of: [21:52] cloudinit/distros/parsers/ifconfig.py:91: error: Item "None" of "Optional[Ifstate]" has no attribute "flags" [21:52] cloudinit/distros/parsers/ifconfig.py:92: error: Item "None" of "Optional[Ifstate]" has no attribute "up" [21:52] cloudinit/distros/parsers/ifconfig.py:93: error: Item "None" of "Optional[Ifstate]" has no attribute "mtu" [21:52] errors… [21:52] What the heck is an attribute? [21:53] oh, i created private attributes… [21:53] no… no i didn't. [21:57] oh… removing that dev = None, fixes it… [22:01] holy shit it's finished and beautiful (please ignore the journey) [22:01] well, I'm down to 1 mypy error [22:09] phew. what a journey [22:10] i'm gonna un-draft this, so y'all can take a look, and make suggestions for better tests, and where to first hook it into [22:12] I feel like the most interesting function would be get_interfaces_by_mac() [22:13] also having a driver mapping would be good… [23:22] Hello everyone. I am writing a custom datasource and for some reason the fallback None keeps being used; not sure how to test why even. In /run/cloud-init/cloud.cfg I see datasource_list: [ MINE, None]. I check in the /var/log/cloud-init.log and I see: Looking for data source in: [ 'MINE', 'None'] via packages... Then immediately on next line [23:22] "Searching for network data source in: ['DataSourceNone']. I have my custom data source in sources/DataSourceMINE.py. But, for some reason it's not being detected. I added to to settings.py and updated ds-identify too. I also installed freshest cloud-init (22.3.3) and added my modifications and still nothing. How do I test that my actual datasource [23:22] works as intended? [23:39] Guest93: what do you get when you run ds-identify? [23:39] sudo -H /usr/local/lib/cloud-init/ds-identify or where that is on your platform [23:39] and I mean: the full log [23:45] meena: see https://0bin.net/paste/JLIBp3gA#VSyVBDTuK18Rp87jO43cpTh+Qmvt-56Qe8jyOPH3ZdT; it does find the datasource it seems. [23:46] Guest93: so why does cloud-init then disagree with that? What does the log say? [23:50] meena: All that cloud-init.log tells me: https://0bin.net/paste/pBLNvg23#nA8-BmQtbbKdEdysVrvIMZCITt94HGaErr0zB+H3Xjx . When I run `cloud-init -d init` (after cloud-init clean). I do not have DEP_NETWORK though on my datasource. That may be the requirement in this case? Or, do I need to test this differently? [23:51] Guest93: there has to be a discovery phase before this: 2022-10-18 23:30:57,441 - __init__.py[DEBUG]: Looking for data source in: ['MINE', 'None'], via packages ['', 'cloudinit.sources'] that matches dependencies ['FILESYSTEM', 'NETWORK'] [23:51] can you run cloud-init clean -lrs # ceans logs, state, and reboots [23:51] when we'll get a fresh set of logs, and can get a clearer idea