Friday, 2023-11-03

opendevreviewJeremy Stanley proposed openstack/releases master: Release PBR 6.0.0  https://review.opendev.org/c/openstack/releases/+/90004113:19
fungihberaud: damani: stephenfin: clarkb: ^13:20
hberaudack13:20
hberaudfungi: yesterday I proposed https://review.opendev.org/c/openstack/releases/+/89996513:21
hberaud(a minor bump=13:21
hberaud)13:21
fungihberaud: oh, the docs in master talk about 6.0.013:21
hberaudbut I think you are right, so let's abandon my patch13:22
hberaud+2'd13:23
fungilooks like we'll first need to work out why pbr is breaking the validate job13:38
fungihttps://zuul.opendev.org/t/openstack/build/919ffe90095849f8aa8a3a211d20c829/log/tox/validate/validate-request-results.log#482013:38
fungiNo such file or directory: '.tox/venv/bin/python3'13:38
fungii guess more context is at https://zuul.opendev.org/t/openstack/build/919ffe90095849f8aa8a3a211d20c829/log/tox/validate/validate-request-results.log#341-34413:40
fungiit does a `tox -e venv --notest` and then tries to `.tox/venv/bin/python3 setup.py --name` but can't find .tox/venv/bin/python313:41
fungiboth the pbr release changes hit the same error, but there was a tooz release proposed between them which didn't, so it's almost certainly specific to pbr13:43
fungioh, also problematic is that we're directly invoking setup.py in that script in order to determine the project name14:13
fungithe recommended replacement seems to be python -c 'from setuptools.config.setupcfg import read_configuration as c; print(c("setup.cfg")["metadata"]["name"])'14:14
fungior in setuptools<61 you need to python -c 'from setuptools.config import read_configuration as c; print(c("setup.cfg")["metadata"]["name"])'14:15
fungistill, none of those help if we can't find where tox created the venv14:18
fungii can't reproduce locally with python 3.11 and latest tox/setuptools14:46
fungithe last successful pbr release was 2023-01-07 so about 11 months worth of things that could have changed to break this in the meantime15:03
fungier, 2023-01-1115:03
clarkbfungi: is it possibly using python2 in the venv env for pbr?15:05
fungithat would be odd, but it's possible i suppose... seeing if i can tell from the logs15:05
fungipbr's tox.ini doesn't specify a default python, so i suppose it's possible15:06
fungithe job ran on a jammy node though, so getting python 2.7 installed would be a trick i think?15:08
clarkbya if it ran on jammy I think that is far less likely15:08
fungii don't see any indication in the log that python 2.7 packages were installed either15:10
fungilooks like it's all 3.1015:10
fungii'll try to reproduce the behavior with 3.10 instead of 3.11, though i doubt it will make any difference15:11
clarkbrepping for .tox/venv in job-output.txt there is no mention of it until the file not found errors15:11
clarkbI suspect that the job isn't creating the venv given that15:11
clarkbtox should fairly verbosely log that it is creating the venv I think? Happy for log pointers indicating it did create the venv if anyone knows where that is15:12
fungithe command immediately prior to the failure should be creating it15:12
fungiit does a `tox -e venv --notest`15:12
clarkboh we aren't using the role for tox here so we don't get the debugging...15:12
clarkbthats where I would start. make the tox invocations debug15:12
fungithe only other thing i can figure is maybe it's creating that .tox directory somewhere other than the current path15:13
clarkbDEBUG: cwd = /home/zuul/src/opendev.org/openstack/releases/.tox/validate/tmp/releases-rzsbjdvc/openstack/pbr15:14
clarkbmaybe it is discovering that there is a .tox/ dir above it and creating it there. That would be weird though because it is for a different tox.ini15:14
clarkbbut ya tox --whatever-debug-outout-flag-is-just-like-the-zuul-role would help a lot15:14
fungii have a feeling this is behavior triggered by the presence of pyproject.toml15:15
clarkbpbr doesn't have one though15:15
fungimmm, though pbr doesn't have a pyproject.toml15:15
fungiright15:15
clarkbintentionally because its a chicken and egg thing15:15
fungido we just normally add -v to tox commands for additional debugging?15:18
*** diablo_rojo is now known as Guest567015:18
clarkb-vv --skip-missing-interpreters=false <- is what the tox role sets by default15:18
fungiaha, i'll inject those15:19
opendevreviewJeremy Stanley proposed openstack/releases master: DNM: Get more verbose logging for PBR release fail  https://review.opendev.org/c/openstack/releases/+/90005315:22
clarkbfungi: in ^ do the args to tox-log-command.sh get passed through to the nested tox -evenv invocation?15:27
fungii guess i'll find out15:28
fungii don't think they do though15:29
fungii misread what that was doing15:29
fungiwow, i always forget there's pbr-specific workarounds in these scripts15:34
fungiuse_tox = repo.endswith('/pbr')15:34
opendevreviewJeremy Stanley proposed openstack/releases master: DNM: Get more verbose logging for PBR release fail  https://review.opendev.org/c/openstack/releases/+/90005315:36
fungithat ^ should get it15:36
fungiso basically, the command we're seeing fail only ever gets run when there's a pbr release15:37
clarkbthat explains why only pbr is affected :)15:38
fungiit's probably something that changed early in the year while everyone was still scrambling with tox v4 impact15:40
fungiugh, of course that job inspects the commit being tested, so i need to reverse the order of those changes15:53
opendevreviewJeremy Stanley proposed openstack/releases master: DNM: Get more verbose logging for PBR release fail  https://review.opendev.org/c/openstack/releases/+/90005315:54
opendevreviewJeremy Stanley proposed openstack/releases master: Release PBR 6.0.0  https://review.opendev.org/c/openstack/releases/+/90004115:54
clarkbthat didn't add a lot of debugging. The validate venv does. Very weird16:10
clarkbperhaps the python check_output() function is eating it?16:11
clarkbyup it does16:12
clarkbfungi: check_output captures stdout and returns it to the caller. Which is then discareded where you added the -vv...16:12
opendevreviewClark Boylan proposed openstack/releases master: DNM: Get more verbose logging for PBR release fail  https://review.opendev.org/c/openstack/releases/+/90005316:22
opendevreviewClark Boylan proposed openstack/releases master: Release PBR 6.0.0  https://review.opendev.org/c/openstack/releases/+/90004116:22
clarkbI think that might actually be a correct change which can be moved out of DNM if others agree16:22
fungiaha, that is probably less hacky than what i was going to try16:23
fungiseems to have helped16:29
clarkbyup and i think its doing the thing I guessed. Its going into .tox of the releases dir not the pbr dir16:30
* clarkb adds this to the list of reasons to use nox16:31
fungibasically, the behavior when calling tox from tox has changed16:31
clarkbDEBUG: venv: 344 I create virtual environment via CPython3Posix(dest=/home/zuul/src/opendev.org/openstack/releases/.tox/venv, clear=False, no_vcs_ignore=False, global=False) [virtualenv/run/session.py:50]16:32
fungithanks, i was trying to copy text from the stream output and failing. i don't know why it's impossible to copy from zuul's log streaming widget, probably something broken with the javascript16:33
fungiah, okay, i can right-click copy right-click paste, i just can't highlight into the primary x11 selection buffer and middle-click16:34
fungiso probably js trying to be smart about overriding text selection16:35
fungianyway, i guess we can override the path to the interpreter. i'll give that a shot16:35
clarkbeither that or figure out how to drop nested tox. I don't know/remember why pbr is special here16:37
fungiwe needed pbr installed from source in order for things to work, i think16:37
fungiat build time rather than just run time16:38
fungithere are almost certainly other ways to go about that16:38
clarkbaha16:38
clarkbfungi: fwiw I think you can probably keep the check_output -> check_call change. Then it will fail early and include stdout + stderr. Far easier to debug that script imo16:39
fungiyeah, i was just going to stuff my proposed fix under that debug change16:39
fungiit looks like the tox devenv subcommand might do this these days16:42
clarkb`tox --devenv pbrvenv -e  venv` ?16:45
clarkband that seems to ignore hte .tox directory entirely? ya that may be the way to go16:45
clarkboh except it always sets usedevelop to true16:45
fungitox devenv -c tox.ini pbrenv16:45
fungiwell, pbr also sets usedevelop=true in its tox.ini anyway16:45
clarkbah. fungi  I think you have to set -e venv otherwise it uses -e py by efault which is different?16:46
clarkbbut ya I agree this seems like it could be a standin if we don't want to use the parents .tox dir path16:46
fungitested locally and `pbrenv/bin/python3 setup.py --name` worked afterward16:46
opendevreviewJeremy Stanley proposed openstack/releases master: Fix PBR name check with new tox  https://review.opendev.org/c/openstack/releases/+/90005316:53
opendevreviewJeremy Stanley proposed openstack/releases master: Release PBR 6.0.0  https://review.opendev.org/c/openstack/releases/+/90004116:53
fungii'll remove the zuul config edits once we're sure this is working16:55
clarkbdeliverables/_independent/pbr.yaml: validate_tarball_base: Could not get the name of openstack/pbr for version 6.0.0: 'int' object has no attribute 'decode'17:02
clarkbprogress but now we hit this17:02
clarkbheh this is another case of the tool supressing the error... I think thats fine for end user facing tools but for dev tools it just makes things more difficult17:03
clarkbah that check_call does need to be a check_output17:05
clarkbbut only that one17:05
fungii'm increasingly glad i temporarily stripped out all the other jobs while we iterate on this17:06
opendevreviewClark Boylan proposed openstack/releases master: Fix PBR name check with new tox  https://review.opendev.org/c/openstack/releases/+/90005317:07
opendevreviewClark Boylan proposed openstack/releases master: Release PBR 6.0.0  https://review.opendev.org/c/openstack/releases/+/90004117:07
clarkbfungi: that passes now if you want ot restore the zuul config17:18
fungithanks! on it17:18
clarkbside note: is a pbr release the sort of thing to wait for Monday on anyway?17:19
clarkbor just send it bceause we've got testing :)17:19
opendevreviewJeremy Stanley proposed openstack/releases master: Fix PBR name check with new tox  https://review.opendev.org/c/openstack/releases/+/90005317:19
opendevreviewJeremy Stanley proposed openstack/releases master: Release PBR 6.0.0  https://review.opendev.org/c/openstack/releases/+/90004117:19
fungiclarkb: monday may make more sense. most of the urgency seemed to be that adding pyproject.toml files to projects with usedevelop on is blocked because current py39 jobs are running on focal which has python3.8 as its python3, so build isolation is building the packages with a different python version than it's being installed on which seems to break without proper pep 660 support17:22
fungiwhich is apparently what prompted stephenfin to implement it17:23
clarkbIt seems unlikely I'll have time to debug if anything goes wrong over the weekend fwiw. But I'm happy to risk it and fix on Monday17:25
fungifwiw, the release managers generally don't approve release requests on fridays anyway unless given sufficient rationale, so i don't think we need to worry about it17:26

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