Monday, 2018-07-09

*** bkorren has joined #openstack-jjb05:23
*** bkorren has quit IRC05:56
*** bkorren has joined #openstack-jjb06:11
*** hashar has joined #openstack-jjb07:46
*** electrofelix has joined #openstack-jjb08:04
*** yashagrawal3 has joined #openstack-jjb08:17
*** bkorren has quit IRC09:09
*** bkorren has joined #openstack-jjb09:57
*** yashagrawal3 has quit IRC10:01
openstackgerritKonrad Beiske proposed openstack-infra/jenkins-job-builder master: Stable identifier for branch sources in multibranch job  https://review.openstack.org/58098910:12
openstackgerritKonrad Beiske proposed openstack-infra/jenkins-job-builder master: Stable identifier for branch sources in multibranch job  https://review.openstack.org/58098910:16
openstackgerritKonrad Beiske proposed openstack-infra/jenkins-job-builder master: Stable identifier for branch sources in multibranch job  https://review.openstack.org/58098910:34
openstackgerritKonrad Beiske proposed openstack-infra/jenkins-job-builder master: Stable identifier for branch sources in multibranch job  https://review.openstack.org/58098911:06
*** beiske has joined #openstack-jjb11:33
beiskeI think I've found a bug with JJB and multibranch jobs. It uses uuid for the id of each branch source. This results in jobs failing due to: `ERROR: Could not determine exact tip revision of <branch>` until a new repository scan has been triggered. Longer description is here: https://storyboard.openstack.org/#!/story/2002910  and my proposed patch: https://review.openstack.org/#/c/580989/11:37
beiskeI opted for generating an id by concatenating the various repository identifiers. This should work well unless somebody creates multiple definitions pointing to the same repository.11:39
beiskeIs that something that JJB should support? It seems like a very odd use case to me. I started implementing it with an optional override parameter for such cases, but when writing the docs for the parameter I couldn't think of a single example where that made sense so I decided to rather just adhere to KISS.11:41
*** rakkaus_ has joined #openstack-jjb11:52
*** yashagrawal3 has joined #openstack-jjb11:56
openstackgerritTan Heng Yeow proposed openstack-infra/jenkins-job-builder master: Refactor properties.py  https://review.openstack.org/58082612:37
*** tanhengyeow has joined #openstack-jjb12:40
*** bkorren has quit IRC12:55
*** bkorren has joined #openstack-jjb13:09
*** bkorren has quit IRC14:02
*** zxiiro-pto is now known as zxiiro14:08
zxiiroelectrofelix: I recall you mentioned you'd rather us import "helpers" instead of "helpers import function" why was that again?14:09
zxiiroSee: https://review.openstack.org/#/c/580826/2/jenkins_jobs/modules/properties.py@a4314:10
*** bkorren has joined #openstack-jjb14:16
electrofelixI believe there are some subtle behaviours subsequently in where the class is located subsequently in lookups. That was seen in the test code that importing the base class instead of the base module resulted in a test suite runner thinking there was a second test class defined in each file and it meant we couldn't define a method on the base class that used 'test_*' because it would be treated as a test and executed even though it was in a 'base.p14:20
zxiirotanhengyeow: ^ fyi14:21
tanhengyeowzxiiro: Noted :)14:22
zxiirotanhengyeow: so we should be changing things to use the `import helpers` format instead of the original way you were proposing.14:22
electrofelixthere is probably also a slight performance penalty, not sure about mocks/patching, they might work irrespective but essentially if you import a function 'f' from module 'h' into another module 'a' you end up with a.f and h.f existing14:22
electrofelixwhen really you just wanted to use 'h.f' everywhere else14:22
electrofelixfor the most part it doesn't cause issues until you doing certain dynamic loading, but the fact that it has some odd behaviour is probably the reason for the pep8 recommendation to import modules rather than individual classes/functions14:23
zxiirois that a new recommendation? for pep8? I had though they used to suggest the other way14:24
tanhengyeowAlright, got it, I'll refactor all other modules to use helpers.convert_mapping_to_xml() instead, should that be a per file patch or 1 patch doing all the refactoring?14:24
zxiirotanhengyeow: small patches are easier to review14:25
zxiirotanhengyeow: you should make a decision on what is small enough14:25
zxiirotanhengyeow: giant patches that modify every single file tend to not get reviewed.14:25
zxiirotanhengyeow: are you officially doing the internship as of now?14:25
electrofelixzxiiro: it may have been an openstack addition, I recall wondering why as well, the unit tests with how the module namespace being read dynamically producing more tests than there should have been was illuminating to me14:26
tanhengyeowOk, I guess per files are better since there might be potential fixes on the indentation, like in the current patch14:26
tanhengyeowzxiiro: yup I am14:26
electrofelixzxiiro: but for the main reason for the helper scenario is that it gets a bit out of hand that as we add more methods to the helper and then use them in each subsequent module the import list gets out of hand14:27
zxiirotanhengyeow: I'm not sure what your mentor has you doing but a recommendation I typically give students is to participate in code reviews. Open Source is not about just doing your own work and submitting it. Reviewing incoming patches from other contributors play a big role and you'll get a lot more out of your education from participating with community functions such as code reviews.14:27
electrofelixotherwise I'm usually, which ever works, but be aware that you need to be careful with test classes and how test runners dynamically work out the list of tests to execute14:28
tanhengyeowzxiiro: Ah yes code reviews is under my scope too, I've subscribed to the notifications and have been reading the reviews to patches14:28
zxiirotanhengyeow: spend like 30 minutes  a day reviewing patches and reading comments from other reviewers is a very good habit and gives you skills to read other people's code and learn from other reviewers comments :)14:28
zxiirotanhengyeow: ah ok, don't forget to +1 / -1 patches that you review. Your vote does matter and leaves a log in Gerrit as proof you've participate in reviews. Tools like Stackalytics picks it up and gives you credit for your contributions.14:29
tanhengyeowzxiiro: Alright :) So far I've been observing how to make reviews, still quite new to it yet14:30
zxiirotanhengyeow: the other thing I would say is if you're sending status updates to your mentor. consider posting those updates to the project mailing lists. A lot of folks are interested in seeing what the interns are working on :)14:31
tanhengyeowOh I actually sent out one a few hours back14:31
zxiirothat's great :)14:32
zxiiroI just got back from PTO so haven't went through my mail queue yet14:32
tanhengyeowAh, np :) The thing is I'm doing a part time 6 months internship compared to a 3 month full time one, so the work done per week might seem lesser than usual for past interns14:33
zxiirotanhengyeow: don't just observe, you'll learn faster if you just dive right in and do it. Since you're not a committer you can only +1 / -1 vote anyway so you don't have the permission to approve patches.14:45
tanhengyeowzxiiro: Aites, I just reviewed one :-P14:46
*** hashar is now known as hasharAway14:48
*** bkorren has quit IRC14:57
openstackgerritTan Heng Yeow proposed openstack-infra/jenkins-job-builder master: Add commas to all mapping tuples in properties.py  https://review.openstack.org/58082615:04
openstackgerritOlivier Bierlaire proposed openstack-infra/jenkins-job-builder master: Add support for Basic Branch Build Strategies Plugin  https://review.openstack.org/58016315:06
*** rakkaus_ has quit IRC15:13
zxiirotanhengyeow: can you also cc the JJB mailing list about your work updates. I'm sure the folks in this channel would be interested in seeing your valuable work.15:17
zxiirotanhengyeow: thanks for doing this btw, it's great :)15:17
tanhengyeowzxiiro: Sure :) Actually I tried to cc jenkins-job-builder@googlegroups.com for the proposal last time round and the email got rejected. I had to post it in the end using my gmail :p15:19
zxiirotanhengyeow: it probably doesn't like that winmail.dat file that outlook adds to rich text emails15:19
zxiirotanhengyeow: i'd recommend not using rich text for your emails since the only people who can read those are other people using outlook (which is a very small group of people ;)15:20
tanhengyeowAh I see, I'll use my gmail for emails then15:20
zxiirotanhengyeow: I think in outlook you can set it to plaintext only too if you want to use outlook.15:21
zxiirobut yeah gmail's probably easier.15:21
*** yashagrawal3 has quit IRC16:04
*** bkorren has joined #openstack-jjb16:06
*** rakkaus_ has joined #openstack-jjb16:07
*** rakkaus_ has quit IRC16:12
*** bkorren has quit IRC16:15
openstackgerritMerged openstack-infra/jenkins-job-builder master: Add commas to all mapping tuples in properties.py  https://review.openstack.org/58082616:53
*** bkorren has joined #openstack-jjb17:27
*** bkorren has quit IRC17:35
*** tanhengyeow has quit IRC17:41
*** rakkaus_ has joined #openstack-jjb18:12
*** beiske has quit IRC18:33
*** electrofelix has quit IRC18:36
*** rakkaus_ has quit IRC18:50
*** rakkaus_ has joined #openstack-jjb19:04
*** rakkaus_ has quit IRC19:58
*** rakkaus_ has joined #openstack-jjb20:16
*** rberg has joined #openstack-jjb20:18
rbergHello folks, I have been using the multibranch project-type in JJB to scan my github org. I have noticed when I update a job the next org scan causes Jenkins to treat every branch and PR as new and queues up a build of every one, even if it has already build that PR. Is there any way to avoid that situation when updating an existing job? TIA.20:21
zxiirorberg: sounds like a problem you should report to upstream Jenkins20:26
zxiirorberg: I've found that the GitHub PR plugin for triggering things isn't that great and does have issues like that.20:26
rbergok I will report that to upstream jenkins. We just recently moved our jobs over to a JJB configuration. But I have never seen that happen when I updated the jobs via the web UI.20:30
zxiirorberg: JJB uses the Jenkins Rest API to push XML config to Jenkins. I'm not sure if Jenkins handles saving differently via the Rest API vs the Web UI but in either case it's however upstream is handling it.20:32
zxiirorberg: you could get the output XML from the JJB test command for the job you're updating and pass it to upstream Jenkins folks as an example XML config for troubleshooting using the Rest API.20:33
rbergah ok, thanks for the info!20:33
zxiiroYou're absolutely welcome :)20:34
rbergzxiiro: Do you know if JJB deletes the job and recreates it on an update?20:51
zxiirorberg: it does not. It always just updates. If you have the option --delete-old (I forget the exact option) it will update first and then delete jobs that no longer exist in JJB.20:53
zxiirorberg: delete's always a final step and "create / reconfigure" is always attempted first.20:53
rbergI can see in the output jjb did a reconfigure. thanks!20:55
*** rakkaus_ has quit IRC20:57
*** rakkaus_ has joined #openstack-jjb21:01
*** rakkaus_ has quit IRC21:05
*** rberg has quit IRC21:42
*** rakkaus_ has joined #openstack-jjb23:05
*** hasharAway has quit IRC23:08
*** rakkaus_ has quit IRC23:10

Generated by irclog2html.py 2.15.3 by Marius Gedminas - find it at mg.pov.lt!