openstackgerrit | Anish Mukherjee proposed openstack-infra/jenkins-job-builder master: Improve support for rvm plugin https://review.openstack.org/576216 | 06:30 |
---|---|---|
alphadose[m] | zxiiro: I have done the changes you requested to https://review.openstack.org/#/c/576216/ :) | 07:07 |
*** hashar has joined #openstack-jjb | 07:14 | |
*** electrofelix has joined #openstack-jjb | 10:42 | |
openstackgerrit | himanshu chhabra proposed openstack-infra/jenkins-job-builder master: Removing 1 of 2 description tags in hudson list view https://review.openstack.org/576487 | 11:22 |
ssbarnea | electrofelix: let me know when you are back | 11:49 |
openstackgerrit | Merged openstack-infra/jenkins-job-builder master: Improve unicode support https://review.openstack.org/575983 | 12:06 |
openstackgerrit | Sorin Sbarnea proposed openstack-infra/jenkins-job-builder master: Allow jjb to be called as a module https://review.openstack.org/576504 | 12:33 |
openstackgerrit | Sorin Sbarnea proposed openstack-infra/jenkins-job-builder master: Allow jjb to be called as a module https://review.openstack.org/576504 | 12:39 |
ssbarnea | zxiiro: ^ if you do not mind. | 12:49 |
ssbarnea | electrofelix: zxiiro : i have one dilema, how do I detect job type from inside a jjb plugin? Example, I have ownership one which needs to behave different if is used inside a normal job than in case of a folder one. | 12:55 |
ssbarnea | apparently its signature is def ownership(registry, xml_parent, data): | 12:55 |
ssbarnea | data contains only his own data, xml_parent is useless, and registry also the same. | 12:56 |
ssbarnea | none of them gives context informaiton | 12:56 |
ssbarnea | and by context, i mean: to be able to figureout what was the job-type value. | 12:56 |
electrofelix | ssbarnea: does xml_parent not contain something that can be searched a bit like how we search for an existing properties task at - https://git.openstack.org/cgit/openstack-infra/jenkins-job-builder/tree/jenkins_jobs/modules/properties.py?id=9d12c31f8ef8bfac07babec821bc5157d0134720#n1098 ? | 13:09 |
ssbarnea | electrofelix: nope, it contains only its first parent, meaning an empty properties tag. | 13:10 |
ssbarnea | zero use on it | 13:11 |
ssbarnea | the only place where I found the job-type was inside the registry but inside _ModuleRegistry__parser_data which is also useless as it is a disctionary with all jobs defined, not only current one. | 13:12 |
electrofelix | ssbarnea: do you have a copy of an example job definition? | 13:15 |
ssbarnea | sure, I have a very simple example to test with, let me paste it | 13:16 |
ssbarnea | see https://gist.github.com/ssbarnea/8b2b9de7394b2b99e803833282e99700 | 13:17 |
ssbarnea | these two would have to generate different xml | 13:17 |
ssbarnea | i was able to find some useful data two levels up on the stack, so i could attempt to pass them down. | 13:18 |
ssbarnea | but even so we have another issue: testing! | 13:18 |
ssbarnea | all the tests are using partial snippets which do not include the job type! making impossible to test them | 13:18 |
electrofelix | ssbarnea: we could add a hidden attribute from the gen_xml method in the properties module that added a '_root' attribute containing the parent xml passed to gen_xml which in turn is the job definition itself. Not sure what other methods are available to use | 13:34 |
electrofelix | to keep it tidy, could always wrap the Element node with a custom JJB class that by default passes through calls to the underlying class but contains the extra attributes for data we want to include? In this case including the job type | 13:35 |
ssbarnea | i am still trying to find a way to get that info passed but... | 13:54 |
*** rberg has joined #openstack-jjb | 14:00 | |
openstackgerrit | Sorin Sbarnea proposed openstack-infra/jenkins-job-builder master: Enable folder support for ownership property https://review.openstack.org/573669 | 14:08 |
ssbarnea | electrofelix: please have a look at ^^ and comment on it, i find it really ugly so if you have better ideas feel free to tell, or even to update the CR. | 14:09 |
zxiiro | ssbarnea: looks fine to me but it fails Zuul | 15:17 |
ssbarnea | i am not surprised, didn't test locally. also don't know how to test for different job types, I created the test files but I am sure that test suite is unable to use them | 15:18 |
ssbarnea | because our fixtures are not full job definitions, that the issue, more of a design issue | 15:18 |
zxiiro | I think it just failed on pep8 actually | 15:28 |
zxiiro | did we merge something that broke pep8? I saw a few unrelated patches fail now | 15:41 |
zxiiro | ./jenkins_jobs/cli/entry.py:149:5: F821 undefined name 'reload' | 15:41 |
ssbarnea | zxiiro: thanks for the feedback, i am implementing changes now, probably i will also split few of them. | 16:00 |
openstackgerrit | Sorin Sbarnea proposed openstack-infra/jenkins-job-builder master: Allow jjb to be called as a module https://review.openstack.org/576504 | 16:05 |
ssbarnea | zxiiro: I think i know what could have happened, the switch to default python3 | 16:15 |
zxiiro | ssbarnea: I think that patch failed to merge | 16:19 |
zxiiro | this one right? https://review.openstack.org/#/c/574334/ | 16:19 |
zxiiro | it didn't mege | 16:19 |
ssbarnea | ok, these are easy to fix. | 16:20 |
ssbarnea | ... as long there is someone here to review the fix. | 16:21 |
openstackgerrit | Sorin Sbarnea proposed openstack-infra/jenkins-job-builder master: upgrade hacking module https://review.openstack.org/576576 | 16:24 |
ssbarnea | there is something important to note: py2 flake is not able to find all issues noted by py3 version. not sure if both are needed but clearly py3 one seems better. | 16:26 |
zxiiro | ssbarnea: +2'd it, thanks for looking into it | 16:27 |
openstackgerrit | Merged openstack-infra/jenkins-job-builder master: Improve support for rvm plugin https://review.openstack.org/576216 | 16:30 |
openstackgerrit | Sorin Sbarnea proposed openstack-infra/jenkins-job-builder master: upgrade hacking module https://review.openstack.org/576576 | 16:33 |
openstackgerrit | Sorin Sbarnea proposed openstack-infra/jenkins-job-builder master: upgrade hacking module and defaults to py3 linting https://review.openstack.org/576576 | 16:42 |
ssbarnea | zxiiro: now i need your vote on https://review.openstack.org/#/c/576576/ -- passed | 16:57 |
zxiiro | ssbarnea: I think you shouldn't have abandon'd qingszhao's change | 16:59 |
zxiiro | ssbarnea: can you change yours to exclude qingszhao's change and we'll merge yours, then the other one after. | 16:59 |
ssbarnea | too many changes and they are interlinked | 17:00 |
zxiiro | ssbarnea: It might not mean a lot to you but I believe qingszhao's a student and getting commits into open source projects and getting credit for it is very good for students. | 17:00 |
zxiiro | I think ti's bad faith for us to be dismissing their work | 17:00 |
ssbarnea | ..ahh, well, in this case ok. | 17:00 |
ssbarnea | in fact I was considering putting my changes on top of his, .... | 17:01 |
ssbarnea | just to minimize the CI load, and get over it sooner but I will do it your way. | 17:01 |
zxiiro | ssbarnea: if it's not too much a pain that would be good imo | 17:01 |
zxiiro | ssbarnea: FYI we've been getting a lot of student contributions lately because LF is looking for an intern and one of the projects is JJB. | 17:02 |
ssbarnea | i imagined that based on the new changes | 17:03 |
zxiiro | yeah, a lot of student level work but contributions are contributions :) | 17:03 |
ssbarnea | i hope one of them will attempt to create some functional testing, using a docker container with jenkins would be really nice work item. | 17:04 |
zxiiro | ssbarnea: you should discuss with abelur and whoever he eventually picks as his intern (he's the mentor this time). Maybe that could be a project whoever gets chosen can work on. | 17:04 |
openstackgerrit | Sorin Sbarnea proposed openstack-infra/jenkins-job-builder master: upgrade hacking module https://review.openstack.org/576576 | 17:04 |
ssbarnea | zxiiro: ^^ without tox.ini changes, reviving his CR now... | 17:05 |
zxiiro | ssbarnea: cool thanks so much. I'll merge it as soon as it passes verify | 17:05 |
openstackgerrit | Merged openstack-infra/jenkins-job-builder master: upgrade hacking module https://review.openstack.org/576576 | 17:19 |
*** rberg has quit IRC | 17:20 | |
openstackgerrit | Sorin Sbarnea proposed openstack-infra/jenkins-job-builder master: fix tox python3 overrides https://review.openstack.org/574334 | 17:26 |
*** beiske has quit IRC | 17:32 | |
openstackgerrit | Merged openstack-infra/jenkins-job-builder master: fix tox python3 overrides https://review.openstack.org/574334 | 17:44 |
*** rberg has joined #openstack-jjb | 17:52 | |
openstackgerrit | Sorin Sbarnea proposed openstack-infra/jenkins-job-builder master: adoping pre-commit hooks https://review.openstack.org/576598 | 17:54 |
ssbarnea | zxiiro: check https://review.openstack.org/#/c/575817/ | 17:55 |
zxiiro | ssbarnea: I already +2'd that one | 17:56 |
zxiiro | ssbarnea: I still think electrofelix's vote there would be more valuable than mine though. | 17:56 |
*** rberg has quit IRC | 17:56 | |
ssbarnea | oopst, this was for electrofelix ^^ | 17:56 |
ssbarnea | i recently discovered the pre-commit tool and I am instigatings its potential benefits for us | 17:57 |
ssbarnea | apparently it does fix an old git issue related to how to "deploy" and manage pre-commit hooks. | 17:57 |
ssbarnea | aparently it has support for almost all linters and it is quite smart, as it does check only changes, so is quick. | 17:58 |
ssbarnea | it is too soon to say if is great or not really. | 17:58 |
zxiiro | interesting, thanks for linking it. If it's good I might deploy to some of my projects | 17:58 |
ssbarnea | i was thinking about the same thing, i have few python projects I nurture | 17:59 |
ssbarnea | its potential is huge as it lowers the CI load, considerably. | 18:00 |
electrofelix | interesting about that tox python3 override, I specifically blocked that from git-upstream because if someone needs to run tox with a specific version of python they can already do that by using that version of python to run tox and it will automatically use that as the basepython | 18:07 |
*** rberg has joined #openstack-jjb | 18:20 | |
zxiiro | electrofelix: still works the reverse direction right? | 18:24 |
zxiiro | I think as long as it still works with py27 in the reverse direction I don't see a reason not to do it. considering py27 is EOL anyway. | 18:24 |
electrofelix | zxiiro: I don't think it does work in the reverse though, you can't force tox back to python2 if basepython is python3 | 18:25 |
zxiiro | let me try... | 18:25 |
zxiiro | I usually test with tox -e py27 because my default python on arch linux is py3 | 18:26 |
electrofelix | tox will default to using the version of python it was launched with unless explicitly requested with such ones as py27 or py35, but if you've set python3 as the basepython for any env you can't run those envs with python2 without editing the tox file | 18:26 |
Odd_Bloke | ssbarnea: sys.setdefaultencoding doesn't exist in Python 3.6. | 18:27 |
Odd_Bloke | So I'm seeing issues in my test-against-trunk jenkins-job-linter tests: https://travis-ci.org/OddBloke/jenkins-job-linter/jobs/394230358 | 18:27 |
*** electrofelix has quit IRC | 18:27 | |
zxiiro | $ ./.tox/py27/bin/python --version | 18:28 |
zxiiro | Python 2.7.15 | 18:28 |
zxiiro | oh he left | 18:28 |
zxiiro | oh wait I see what he mains | 18:28 |
Odd_Bloke | ssbarnea: Or 3.4 or 3.5 for that matter. | 18:30 |
zxiiro | ssbarnea: electrofelix has a point, we no longer support python 2 to run the environments | 18:30 |
*** caphrim007 has joined #openstack-jjb | 18:30 | |
zxiiro | someone who only has python 2 installed will now fail to run for example "tox -e pep8" | 18:30 |
Odd_Bloke | Someone who only has Python 2 installed has failed in a more fundamental way. ;) | 18:32 |
Odd_Bloke | Do we not actually hit our entrypoint in tests? | 18:32 |
Odd_Bloke | I can't see how https://review.openstack.org/#/c/575983/ could have passed if we do. | 18:33 |
openstackgerrit | Thanh Ha proposed openstack-infra/jenkins-job-builder master: Revert "fix tox python3 overrides" https://review.openstack.org/576603 | 18:39 |
*** rberg has quit IRC | 18:42 | |
*** hashar has quit IRC | 20:36 | |
ssbarnea | Odd_Bloke: zxiiro : we what should we do? as far as I am concerned I don't mind including pep8 in each py* target and dropping one gate. | 20:59 |
ssbarnea | i do want to avoid having two pep8 gates, i prefer having none (including in unit) | 20:59 |
ssbarnea | i still use py27 as default python and will do so for foreseable future. | 21:00 |
zxiiro | I think it's fine to have the one run in Zuul, it's not like it takes very long to run anyway | 21:00 |
zxiiro | ssbarnea: right, so if that's the case I don't think we should be forcing everyone to have basepython = python3 just yet | 21:01 |
ssbarnea | the issue is that it is not enough, i would include include running flake8 before runningunit. | 21:01 |
ssbarnea | zxiiro: you don't force user, only developers, which is not an issue. | 21:01 |
Odd_Bloke | I'm not sure I saw the reason for the change happening in the first place, so I'm not really in a position to have an opinion. :p | 21:01 |
zxiiro | now that I understand it a bit more. I think it's better no explicitly call out basepython and let the developer choose themselves what they want then forcing it with the property | 21:02 |
ssbarnea | i think we need to run both, only by running both we will know it worked. doing only one of them proved not to be enough. | 21:02 |
zxiiro | devs are usually smarter than the average user, we don't need to hold their hand. | 21:03 |
zxiiro | if the issue is flake8 / pep8 then maybe we can run basepython only for the pep8 check and assume python 3 style for that | 21:03 |
zxiiro | but for the rest of the envs we can allow python 2 | 21:03 |
ssbarnea | i doubt flake8 can detect those py3 specific problems in py2, do you know a switch? | 21:12 |
openstackgerrit | Sorin Sbarnea proposed openstack-infra/jenkins-job-builder master: Allow jjb to be called as a module https://review.openstack.org/576504 | 21:13 |
openstackgerrit | Sorin Sbarnea proposed openstack-infra/jenkins-job-builder master: Allow jjb to be called as a module https://review.openstack.org/576504 | 21:30 |
zxiiro | ssbarnea: i mean for only the pep8 / flake8 environment we set basepython = python3 | 21:34 |
zxiiro | ssbarnea: all the other envs we shouldn't explicitly set that setting imo | 21:34 |
zxiiro | ssbarnea: then I think that will satisfy your requirement that we run flake8 python3 version. | 21:35 |
ssbarnea | not againt the idea | 21:35 |
ssbarnea | now i am trying to improve the testing to be sure we would catch errors like the recent one with zuul testing | 21:35 |
zxiiro | ssbarnea: let me update the revert patch to make sure pep8 runs with py3 then | 21:36 |
ssbarnea | that's my no1 concern, that we avoid future failures to catch such bugs. we need to be sure that the library works well with both 2/3 | 21:36 |
zxiiro | right. I think it's a fair assumption to say we want code style to be py3 but we want to make sure we test running the code with all versions we support | 21:37 |
openstackgerrit | Thanh Ha proposed openstack-infra/jenkins-job-builder master: Revert "fix tox python3 overrides" https://review.openstack.org/576603 | 21:38 |
*** caphrim007_ has joined #openstack-jjb | 21:58 | |
*** caphrim007 has quit IRC | 22:01 | |
openstackgerrit | Sorin Sbarnea proposed openstack-infra/jenkins-job-builder master: Allow jjb to be called as a module https://review.openstack.org/576504 | 22:25 |
openstackgerrit | Kien Ha proposed openstack-infra/jenkins-job-builder master: Add publishers related to GitLab Plugin https://review.openstack.org/518618 | 22:41 |
*** caphrim007_ has quit IRC | 22:46 | |
*** caphrim007 has joined #openstack-jjb | 22:46 | |
*** caphrim007 has quit IRC | 23:03 |
Generated by irclog2html.py 2.15.3 by Marius Gedminas - find it at mg.pov.lt!