Thursday, 2025-03-13

*** benj_9 is now known as benj_14:19
*** benj_4 is now known as benj_15:21
*** benj_2 is now known as benj_16:20
*** benj_3 is now known as benj_16:29
*** __ministry is now known as Guest1126318:06
sean-k-mooneyfungi: clarkb: what is the current stance on creating new repos in the x namespace?19:14
clarkbwe try to get people to not do that and use a more appropriate namespace (and create a new one is necessary)19:15
sean-k-mooneyim currently looking at creating a poc of a promethous plugin for horizon19:15
clarkbthe x namespace is there because we couldn't get a number of projects to do anything better when we did the big migration19:16
sean-k-mooneywe are goign to chat to the horizon and telemetyr teams about it at the ptg19:16
sean-k-mooneybut im not sure that either team will want to incldue it in there deliverable so im not sure it will fit under openstack19:17
sean-k-mooneyclarkb: i cloud create teh poc on my github and defer this conversation until after we chat to them in the ptg19:18
fungiuppenstock/horizon-prometheus-plugin ;)19:18
sean-k-mooneyis ^ a thing19:18
fungihopenslack19:19
fungiprecariouslystacked19:20
clarkbsean-k-mooney: no I think fungi is merely suggesting that you can create an arbitrary but hopefully somewhat meaningful namespace19:21
sean-k-mooneyya i was debating about that19:21
sean-k-mooneyopenstack-contrib19:21
sean-k-mooneyor something with out either software projects names in it19:21
clarkboscloudtools/foo19:22
fungiyeah, i'm basically wondering if there's a need for an openstack-adjacent place to group efforts that teams aren't likely to adopt officially19:22
fungis/place/namespace19:22
sean-k-mooneywell it might be adopted offically we jsut have not had that converstation yet19:22
sean-k-mooneybasiclly the horizon team is small and ususlaly ask the project teams to own the plugin form the governance point of view19:23
sean-k-mooneyfor prometheus there isnt a project team because its not part of openstack19:24
sean-k-mooneyand im not sure if the telemetry team are interested or not19:24
sean-k-mooneyso ya a generic namespace might be the approch we end up taking19:24
clarkbone thing I will say is that I think its a bug that we have this tendency to wait for the ptg to discuss things.19:25
clarkbIf it were me I would send an email to the list and get an answer quicker19:25
sean-k-mooneywell i may also do that19:25
clarkbthe ptg should be for things where we've already done the async thing and can't reach a resoution. Not the default appraoch19:25
sean-k-mooneyfair19:26
fungithough i can certainly understand that it's sometimes hard to get inout from the horizon team other than jumping into a ptg session of theirs19:26
fungis/inout/input/19:27
sean-k-mooneywell i asked out internal folks that work on it and they are the one that said normally they would ask the project teams to own the plugins19:27
sean-k-mooneyso they already gave the indicatoin that they would prefer if it was out side fo the upstream teams offical delvibele but suggeested i reach out ot folks publicly too19:28
sean-k-mooneyfungi: clarkb  the reaon i asked ye as 2 fold19:29
sean-k-mooney1 to gague if i should jsut wait before creating work for ye if the repo jmight changed in a few weeks19:29
sean-k-mooneyand too just to confirm that x should be avoided19:29
sean-k-mooneyi can do my poc on github i just strongly prefer gerrit19:30
clarkbya x should be avoided and ideally we also avoid renaming things shortly after creating them so having clarification upfront is a good thing19:30
sean-k-mooneyya ok ill start a mailing list topic19:31
sean-k-mooneyif no one respond ill bring it up in a ptg session19:31
sean-k-mooneyand for now ill just use my personal github to poc it19:31
fungiit's been a while since we've done a project rename, might be good for clearing out some cobwebs19:33
sean-k-mooneythe more recent ones i assuem were more retirement then renames19:34
sean-k-mooneyby the way i might need to create a couple of xstatic repos for this if i proceed with it too19:36
clarkbwe have them all recorded in opendev/project-config iirc but I can't remember off the top of my head19:36
clarkbwow we're still using xstatic?19:37
clarkbI think the way zuul does js deps actually works ok19:37
sean-k-mooney.... yes19:37
sean-k-mooneyi hate that it exists and that one of the thing i want to talk to them about19:37
fungii'd love to see us get away from redistributing (eventually old and known-insecure) copies of random javascript libraries19:38
sean-k-mooneywe are usinga 9 year old version of d3.js with a 7 year old verion of rickshaw19:38
sean-k-mooneyso i want to use a modern version of chart.js and htmx instead fo the angular techdebt19:38
sean-k-mooneyclarkb: how does zuul do it19:38
fungia yarn lockfile19:39
sean-k-mooneyin my poc i was just gong to use cdn links for now to avoid the packaging. ok that defintlly a topic i can bring up19:39
fungirun yarn to fetch the desired version of various js libs during build19:39
sean-k-mooneywhen building hte python wheel for the plugin?19:40
sean-k-mooneyor a sperate build procees19:40
fungiseparate, generally when installing or building container images19:40
sean-k-mooneyack19:40
clarkbfungi: sean-k-mooney: its part of the python packge build process too19:42
fungioh, do we add them to wheels?19:42
clarkbif you run yarn first then run pip/wheel/build then we include all the js in the wheel iirc19:42
clarkbthat may not be automatic and instead opportunistic I would have to go reread things19:42
sean-k-mooneydont worry about it19:44
clarkbits automatic. Look in setup.cfg for the _setup_hook.py and then look at that file19:44
sean-k-mooneyits somethign i can look into when i get to that point19:44
sean-k-mooneyah yes https://opendev.org/zuul/zuul/src/branch/master/setup.cfg#L2519:44
sean-k-mooneyso here https://opendev.org/zuul/zuul/src/branch/master/zuul/_setup_hook.py19:45
clarkbyup those two things work together to include the js in python artifacts19:45
fungithough looking in the wheel it doesn't immediately appear that we're vendoring any js deps19:45
fungiunless they're compiled opaquely into larger nameless js blobs19:46
sean-k-mooneyim not sure but this might only include it in the source tar19:47
clarkbfungi: its all in zuul/web/static19:47
clarkbno the js is there19:47
sean-k-mooneyye also have some level of webpack support19:47
fungiclarkb: i mean, yes there's a ton of opaquely-named js files in there19:47
clarkbyes taht the built javascript output19:47
sean-k-mooneyi came across that term over the weekend but have not looked it up yet19:48
fungibut, like, is zuul/web/static/static/js/54.a96ce836.chunk.js jquery? who knows?19:48
sean-k-mooneythe last time i did web deve was in php in 201219:48
clarkbfungi: the manifest file should in theory figure that out19:48
sean-k-mooneyso its been a bit19:48
fungifor some reason i thought we still had a script that ran during installation or container image builds to download the js dependencies. feeling really uncomfortable with the idea that these packages are redistributing copies of random js libs we didn't write19:49
fungifor the same reason i've been uncomfortable with the xstatic packages19:50
sean-k-mooneyfor right now im being lazy and just using cdn links. 19:50
sean-k-mooneyfungi: ye do https://opendev.org/zuul/zuul/src/branch/master/Dockerfile#L2719:50
clarkbI forget what the manifest system is called but its supposed to provide a mapping so that you can debug in your browser but also could be used to map things here I think19:50
fungiif there's a vulnerability in jquery, how does someone installing these packages know they need to patch it? are we even tracking that ourselves upstream?19:50
fungior do we just wait for someone to report to us that we're distributing a vulnerable copy of jquery?19:52
clarkbwell all of the deps are tracked in plaintext human readable form via the yarnlockfile you pointed out earlier19:52
clarkbthats a complete exhaustive list aiui and everything is pinned19:52
sean-k-mooneyi assume there is a yarn update or similar19:52
sean-k-mooneyto bump the deps19:52
clarkbwhat you have in the binary packeg is a binary build of those dependencies19:52
fungiis that included in the packages to indicate what versions were embedded in them though?19:53
fungii don't see the lockfile included in the zuul wheel19:53
clarkbI believe the manifest system is what you have to use on the binary side19:53
fungii guess in some near future state we'd include an sbom indicating what's in these packages that didn't come from the zuul repo itself19:54
sean-k-mooneynow that i have nerd sniped you ill go o/ automtatic sboms would make lots fo folks happy19:55
clarkbif you open https://zuul.opendev.org in firefox with web developer tools running then go to debugger on the left side you get a pane with all the files mapped out in human readable form19:55
fungibut yeah, sort of dismayed that we're redistributing copies of arbitrary third-party js libs inside the packages, since we're not well-placed to evaluate and track vulnerabilities for all of them19:56
clarkbeach of those files is also viewable in human readable form. I believe the various manifest files are responsible for making that happen to map from the optimized compressed minified code to stuff you can work with19:56
clarkbI think all of the info to do that is available. It may just be clunky to figure out how to work with the format they are in depending on the context19:56
clarkbliek I don't know how to do the mapping firefox has done for me with my editor19:57
sean-k-mooneyit sound like just including the lock file would be less work but ya it does appare to be reable19:57
sean-k-mooneyclarkb: chrome does it too for what its worth19:58
fungiyeah, i mean for the python side it's tractable because the packages aren't embedding copies of their dependencies, a package manager installs them. the same could be done for installing javascript dependencies (using e.g. npm) so that we wouldn't have to redistribute them ourselves and then consumers are on the hook to keep track of what versions of things they're installing19:58
fungiwith npm similarly to what they're installing with pip19:58
clarkbbut we use a lock file so its all the same versions19:59
clarkbyou're not going to trivially edit that lockfile as an end user and change versions of random libs19:59
clarkbits often difficult to do that in python land but also often possible. AIUI with js its basically impossible19:59
clarkbthings get updated in concert because bumping one thing means bumping 20 things20:00
fungimaybe i should just crawl back into my cave and continue pretending javascript doesn't exist, that whole ecosystem seems designed to silently propagate security vulnerabilities20:00
fungisame goes for docker containers really20:00
clarkbmaybe a good middle groupnd is having regular yarn lock updates performed by a zuul job for zuul or something20:00
clarkbit should also be worth noting that I think you can configure zuul to not serve the js20:01
clarkbif you have a local build you can set up your webserver to serve that content itnead20:01
clarkbyes you can set the static_path configuration on the web server to change the path20:03
fungii think i'm just going to start keeping a closer eye on pep 770 and then once that's settled work on a way for us to generate sbom additions that list all the javascript components20:04
fungiit's just taking an age for people to agree on the in-wheel implementation details20:05
clarkbthat seems like the sort of thing that can be hsipped with a version identifier and iterative improvements can be easily made20:05
clarkbhell ship all the versions 10 years from now for maximum compatibility it shouldn't have a major impact on wheel size20:06
fungiwell, it's less about file format and more about figuring out how to signal where in the wheel your sbom file(s) reside20:06
fungiconsensus seems to be that they're going to get installed somewhere under packagename.dist-info/20:08
fungibut it's not entirrely settled yet20:08
clarkbthat seems like an odd thing to not already be settled. Wheels contain a ton of metadata already. Why can't you just put a new file alongside what exists?20:11
clarkb(or new directory or files)20:11
fungitools need to know how to identify which file(s) is/are the sbom(s)20:12
clarkbright but you add the file(s) and then the tools look for them where they go?20:12
fungithat bikeshed hasn't been painted yet and people are still arguing over color schemes20:12
clarkbI shouldn't be surprised oncsidering what happend with setup.cfg and firends20:12
fungiit's (probably) going to be files somewhere under packagename.dist-info/ maybe in a sbom/ subdirectory maybe with a specific name pattern, but that's what's not settled yet20:13
clarkbgoing back to the concern about cross checking zuul wheel content I think you basically look at the lockfile in source form and get version/file content. Then you do the manifest mapping the chrome and firefox do to get the file content and compare. Clunky for sure but doable20:14
clarkband I'm sure there are tools that you can do this on the command line with I'm just detachedfrom that world enough to not know what they are20:15
fungiyeah, i was thinking less about client-side evaluation and more about how would a scanner on the server where the software was deployed (or a package installer evaluating the package) identify what versions of which js libs were vendored inside it20:16
fungihow does the server admin find out that they've got a vulnerable version of some specific js lib that was installed embedded inside the zuul package20:17
clarkbyou'd either check hashes of known bad content against what gets decompiled out of the manifest system or you'd say I haev zuul vfoo.bar, grab that source and check the lockfile confirm that version is vulnerable then compare (maybe with hashes again) to what the manifest map produced sourced content is20:18
fungiyeah, i guess unpacking and parsing the zuul/web/static/asset-manifest.json and/or zuul/web/static/manifest.json files from the wheel, for now20:19
clarkbessentially the same process we had to use with java during log4shell. Super clunky and not confidence inspiring but doable20:19
fungithough those json files are for the post-compilation state, looks like, so not as useful as a frozen snapshot of the yarn lockfile would be20:22
fungiyeah, log4shell is what basically spurred on the modern sbom standards20:22
clarkbya adding the lockfile to the builds is probably another reasonable easish thing to do20:22
clarkbI'm not seeing anything obvious that is excluding it already but I didn't see it in the wheel20:23
clarkboh its because zuul/web/yarn.lock is where the file is but we're building the zuul package which is everything in zuul/zuul/ including zuul/zuul/web which is the target of the zuul/web build?20:24
fungiright, i think it would need to be injected into the manifest20:24
clarkbbut we might be able to put yarn.lock in MANIFEST.in and have it get included20:25
clarkbfungi: ^ that is an easy change to throw up if you want to write the commit message that explains it20:25
fungiyeah, working on it. thanks!20:28
fungijust need to do a bit of local testing to make sure it works as advertised20:28
fungipyproject-build doesn't seem to run the setup_hook20:34
clarkbthe hook is part of pbr20:35
clarkbfungi: are you missing the tools?20:36
clarkbthat may be it. Its trying to run but skipping because the tools aren't present20:36
clarkbif subprocess.call(['which', 'yarn']) != 0: return20:37
fungiyeah, i've got it installing but unlike what's in bindep.txt the package name on debian seems to be yarnpkg20:38
fungimmm, no, that didn't manage to install a yarn executable either20:39
fungiediting it to look for and invoke yarnpkg also isn't getting it20:42
fungidoesn't seem to support the expected command-line options, so must not be the same tool zuul expects20:44
fungi"This package provides Yarn Modern (berry). If you are looking for Yarn Classic (1.x), install node-corepack."20:45
fungiso maybe that's it20:45
funginope, the /usr/share/nodejs/corepack/shims/yarn from that doesn't seem to work either20:49
clarkbthe zuul jobs seem to instll yarn with npm and don't have a version limiter20:55
clarkbI wonder if yarn from debian is just too old?20:55
fungiah okay, so i need to get yarn installed from not the distro20:56
clarkbhttps://www.npmjs.com/package/yarn says version is 1.22.2220:57
clarkbhttps://packages.debian.org/search?keywords=yarn says bookworm isn't all that far behind that20:57
clarkbthen I'm not sure where trixie gets 4.020:57
fungii think that's the "classic" vs "berry"20:58
fungithe 4.0 package says it installs modern yarn20:58
clarkbhttps://www.npmjs.com/package/yarn?activeTab=versions this says berry is 2.4.3 and that is 4 years old20:58
fungii guess yarn 1.x is considered legacy/obsolete20:58
fungihttps://github.com/yarnpkg/berry ys 4.x tags20:59
clarkbya it kinda looks like 1.x is old/deprecated but still maintained20:59
clarkbthen 2.x was replaced by 4.x? Not sure why npm doesn't have 4.x on it20:59
clarkbhttps://www.reddit.com/r/node/comments/19cu9bz/moving_later_versions_of_yarn_outside_of_npm_was/21:00
clarkbanyway I would expect yarnpkg in bookworm to work for you21:01
clarkbafter you symlink yarn to yarnpkg21:01
fungiyeah21:03
clarkbhttps://yarnpkg.com/getting-started/install so I guess nodejs ships corepack which includes some version of yarn then use yarn to update itself?21:06
clarkbthat reddit post is interesting bceause its basically there is yarn 1, yarn 4, npm, and pnpm now21:07
fungiyes, i tried that one but was getting some sort of missing module error21:07
clarkbyou could use nodeenv21:08
fungithe yarn shim executable script from node-corepack i mean21:08
clarkb(that is typically what I do because distro and nodejs often don't get along)21:08
fungiaha, right, https://pypi.org/project/nodeenv/21:09
funginow i remember using that21:09
fungiwhich is becoming an exercise in figuring out how to get a functioning yarn executable in my homedir21:12
clarkbIthink you do python3 -m venv && venv/bin/pip install nodeenv && venv/bin/npm install yarn && ln -s $HOME/bin/yarn venv/bin/yarn21:15
clarkbI may have gotten the ln args backwards I always make that mistake21:15
clarkbhttps://dev.to/andreychernykh/yarn-npm-to-pnpm-migration-guide-2n0421:16
clarkbI wonder if that makes sense for ap roject like zuul21:16
clarkbnot that that solves your problem but if yarn classic is more or less a dead end then using something that isn't seems worthwhile21:16
fungiyeah, i've done an npm install yarn with the nodeenv i created, but yarn still doesn't seem to be installed anywhere in the env21:20
clarkbthe zuul scripts do npm install -g yarn for a global install but I worry that will try to install to your /usr/local/bin21:21
clarkbbut maybe it does the right thing in a nodeenv?21:21
fungii was trying with debian's nodeenv package, but i'll revisit with the version from pypi after dinner21:21
clarkbhttps://docs.npmjs.com/resolving-eacces-permissions-errors-when-installing-packages-globally21:22
clarkbthis implies global isn't truly global but rather global in a local sense :)21:22
fungiokay, with my nodeenv activated before invoking pyproject-build, zuul's setup_hook does find the yarn executable and seems to be using it successfully23:24
clarkbcool23:24
fungiand then i ran out of disk23:25
clarkboops23:25
fungiError: error:0308010C:digital envelope routines::unsupported23:33
fungithrown when it's running `react-app-rewired --max_old_space_size=4096 build`23:34
fungiat leasst i didn't run out of disk that time23:34
fungiapparently that's the friendly way nodejs tells you that it disapproves of your openssl version23:38
fungican be a sign that a too-new version of node is in use with an outdated js lib trying to use older unsupported crypto algorithms23:41
fungiwith yarn>=3 there's an available plugin to generate sbom files automatically: https://github.com/CycloneDX/cyclonedx-node-yarn23:54

Generated by irclog2html.py 2.17.3 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!