Thursday, 2018-05-31

*** dcreno has joined #ara00:39
*** dcreno has quit IRC00:43
*** dcreno has joined #ara00:55
*** dcreno has quit IRC01:01
*** dcreno has joined #ara01:02
*** dcreno has quit IRC01:07
*** dcreno has joined #ara01:08
*** harlowja has quit IRC01:19
*** dcreno_ has joined #ara02:25
*** dcreno has quit IRC02:28
*** dcreno_ has quit IRC03:39
*** bcoca has quit IRC04:28
*** Bakey has quit IRC04:36
*** sshnaidm_pto has quit IRC05:28
ssbarneadmsimard: i was afraid you may say this. if you have any ideas about workarounds feel free to shout.07:18
ssbarneaalso please review https://review.gerrithub.io/#/c/redhat-openstack/infrared/+/374509/ --- before i start pinging my guys :)07:19
ssbarneai possible to tell ara to reset/wipe/prune its database? it would find this useful for CI job or scripts.07:22
*** rvgate has quit IRC07:49
*** rvgate has joined #ara07:50
*** sshnaidm_pto has joined #ara08:25
openstackgerritSorin Sbarnea proposed openstack/ara master: Documented nginx config for static serving  https://review.openstack.org/57122008:31
ssbarneadmsimard: i think I found a way to address the issue of expected failures, see https://github.com/redhat-openstack/infrared/blob/a0c3eb5b4b4b5dc9c7db13bf1957b598b358cf48/infrared/common/callback_plugins/junit_report.py#L1909:16
ssbarneai didn't even know that this callback existed on infrared09:17
openstackgerritSorin Sbarnea proposed openstack/ara master: Allow junit reports task result overriding  https://review.openstack.org/57143009:57
*** jlozadad_ has quit IRC11:20
*** sshnaidm_pto has quit IRC12:02
*** jlozadad_ has joined #ara12:08
*** dcreno has joined #ara12:19
*** dcreno has quit IRC12:20
*** dcreno has joined #ara12:21
dmsimardssbarnea: that's upstream actually, not sure why it's in infrared https://github.com/ansible/ansible/blob/devel/lib/ansible/plugins/callback/junit.py12:25
ssbarneadmsimard: maybe it was added to ansible recently and our min supported version does not have it. i don't know, i only assume.12:26
dmsimard¯\_(ツ)_/¯12:26
dmsimardI'll look at your patches later today, have some back to back meetings12:26
ssbarneathanks12:28
ssbarneabut I found one serious bug in junit. aparently the task output was not saved into the junit file, only a single line was stored which is useless. i am trying to find the reason now and make another patch.12:38
*** dcreno has quit IRC12:45
*** dcreno has joined #ara12:46
*** dcreno has quit IRC12:50
dmsimardssbarnea: in junit for ara ?12:59
*** mgariepy has joined #ara13:07
*** odyssey4me has joined #ara13:11
*** hughsaunders has joined #ara13:15
hughsaundersHello13:16
hughsaundersodyssey4me: mentioned that someone was asking about junit export?13:16
odyssey4medmsimard ^13:16
dmsimardhughsaunders: ohai13:19
hughsaunderssup dmsimard13:19
dmsimardhughsaunders: are you still using the junit export you contributed ? :D13:19
hughsaundersyep13:19
dmsimardhughsaunders: sweet, ssbarnea started using it and was curious if there was a way to exclude, for example, known issues13:20
dmsimardhe submitted https://review.openstack.org/#/c/571430/ and I was wondering if you had a similar use case13:20
hughsaundersno, but I saw the a review about adding expected failures etc13:21
hughsaundersah yes that one13:21
hughsaundersErm not really, we haven't had a situation where we've expected an ansible task to fail, without it being ignored or failed_when false in the playbook13:22
hughsaundersfailed_when: false is a non issue, because effectively the task/test passes, and export already handles ignored failures13:22
hughsaundersI'm not really sure how the change is useful as if you can modify the playbook to insert the code phrase into the task name, you could also manipulate the failure logic of the task?13:26
ssbarneahughsaunders: this expected failure was a special case, inside infrared unit-tests, which are running various ansible tasks.13:27
ssbarneai doubt that in normal execution we would encounter this, but unittesting is one such case.13:28
dmsimardssbarnea: I wonder if using an ansible tag would be better than expecting something in the task name13:30
dmsimardssbarnea: ansible-lint has something like that for things that shouldn't be lint enforced13:30
*** sshnaidm_pto has joined #ara13:31
hughsaundersssbarnea: iiuc expected failure is pretty much `failed_when: false`, and toggle result is `failed_when: result|success`13:31
ssbarneacould be arguable, but because we already have a reference implementation, it would be a no brainer to make a decision.13:31
dmsimardhttps://github.com/willthames/ansible-lint#false-positives see "skip-ansible-lint"13:31
*** dcreno has joined #ara13:31
*** bcoca has joined #ara13:31
*** bcoca has joined #ara13:31
ssbarneaansible callback does this, no reason why we would do something different, unless we want to feel special ;)13:32
hughsaundershmm, maybe not quite as with expected failure you want a success to cause a test failure?13:32
hughsaundersssbarnea:  I'm not sure anoutput filter is the place to manipulate results as the html report and junit reports may have different results for the same task13:33
dmsimardssbarnea: this just gave me an idea and sharing it for the record so I don't forget about it..13:35
dmsimardThe vision with the core of ara 1.0 is basically 1) a callback that records/indexes everything in an organized way in a database 2) an API to interface that database ... the rest is basically different integrations leveraging the API (different exports, e.g, influxdb like tripleo is doing, junit, subunit, logstash, etc.)13:37
dmsimardI wonder if there's a real need to have these in ARA or if ARA could somehow "replay" a playbook execution through to a native callback13:38
dmsimardso for example, instead of "exporting" to junit with our own implementation, we'd re-run that playbook somehow *waves hands* through the callback13:39
dmsimardThe question is "Why not include the native callback in your initial real playbook run in the first place ?" -- each callback adds overhead that adds up over the course of a run and it might not always be relevant to run them (unless something fails, for example)13:40
dmsimardIf something like this would be possible, it would prevent essentially re-writing and maintaining different exports from ARA13:41
dmsimardbcoca: ^ I'm probably saying nonsense but curious to know what you think13:42
*** Bakey has joined #ara13:43
dmsimard(in the context of ARA currently supporting exporting to junit, subunit and other things which are more or less equivalent to the upstream callbacks)13:43
bcocai have not had coffee today, so nonsense probably sounds good13:44
* bcoca reads backlog13:44
bcocajtanner beat you to it, he created a 'ansible replay' which would do most of what you want13:45
dmsimardbcoca: tl;dr somehow replay things through callbacks after the fact13:45
dmsimardbcoca: orly13:45
dmsimardwhere is that13:45
hughsaundersdmsimard: why replay the playbook, when ara has already extracted the useful info?13:46
dmsimardhughsaunders: it wouldn't really re-run the playbook13:46
hughsaundersI guess I see ara as input ( callback ) --> Process/Store (db and stuff) --> Output (html, junit etc)13:47
bcocagithub.com/jctanner/ansible-vcr13:47
dmsimardhughsaunders: it would be like "ara export <callbackname> <playbook_id>" and that would throw all the data to the callback as ansible would've done it13:47
hughsaundersdmsimard: oh, so you use the same callback interface as ansible so users could use the same callback with ansible or with ara after the fact?13:48
hughsaundersI guess a well defined interface between ara its various output generators would be useful.13:48
dmsimardhughsaunders: something like that -- it might be unrealistic but think it's worth exploring13:48
dmsimardhughsaunders: otherwise as time goes we'll be growing so many different export interfaces, in ara there's html, junit, subunit but I know people have written graphite and influxdb exports, there's also people interested in logstash, etc.13:49
dmsimardIf there's already native callbacks that are able to do that, I'd rather not reinvent any wheels13:50
hughsaundersdmsimard: now I see the value13:50
hughsaundersSo we can take existing callbacks and use them as output filters, genius!13:51
hughsaundersalso saves runtime for people that want multiple output formats as they only need to run the ara callback during the actual playbook run and can generate other report formats afterwards13:51
*** tbielawa has joined #ara13:52
dmsimardhughsaunders: right, in the best interest of performance/latency13:57
dmsimardhughsaunders: you understand the crazy idea then, I just don't know how realistic it is :)13:58
*** themurph has joined #ara14:05
hughsaundersdmsimard: the ansible-vcr project looks quite heavy, if its actually recording all the data that gets transferred to and from each managed node.14:06
hughsaundersI guess a helpful thing about ara data is that it has all the logic in playbooks/roles (loops, conditionals, includes etc) expanded out into individual tasks. So iterating the playbooks and tasks to call the callbacks should be doable without too much logic.14:07
*** hughsaunders has quit IRC14:28
*** dcreno has quit IRC14:39
*** dcreno has joined #ara14:42
*** jparrill has quit IRC14:42
*** jlozadad_ has quit IRC16:09
*** hughsaunders has joined #ara16:16
*** dcreno has quit IRC17:07
*** sshnaidm_pto has quit IRC17:08
*** Bakey has quit IRC17:10
*** jlozadad_ has joined #ara17:11
*** sshnaidm_pto has joined #ara17:21
*** tbielawa is now known as tbielawa|lunch17:24
*** myoung is now known as myoung|lunch17:57
*** gvincent_ has quit IRC18:05
*** dcreno has joined #ara18:13
*** tbielawa|lunch is now known as tbielawa18:45
*** Bakey has joined #ara18:58
*** tbielawa is now known as tbielawa|brb19:22
*** jlozadad_ has quit IRC19:28
*** themurph has quit IRC19:31
*** themurph has joined #ara19:34
*** myoung|lunch is now known as myoung19:34
*** gvincent_ has joined #ara19:34
*** tbielawa|brb is now known as tbielawa19:51
*** harlowja has joined #ara20:01
*** jlozadad_ has joined #ara20:02
*** jlozadad_ has quit IRC20:11
hughsaundersdmsimard: I have a nagging feeling that I've asked this before... but any chance of adding /index.html to requests to directories when using the static report?20:23
hughsaundersVery annoying when all the links work apart from the files links, see https://eeb7cf1e92033bf3c8b8-48da043f18b372769626ce4192bd6f56.ssl.cf1.rackcdn.com/PR_rpc-openstack-master-xenial_no_artifacts-swift-deploy_223/localhost/host/openstack/log/ara-report/reports/index.html for example, it links to directories like https://eeb7cf1e92033bf3c8b8-48da043f18b372769626ce4192bd6f56.ssl.cf1.rackcdn.com/PR_rpc-openstack-master-xenial_no_artifacts-20:34
hughsaundersswift-deploy_223/localhost/host/openstack/log/ara-report/file/2fa20412-0cfc-4986-9559-8f4bd4cb8f54 which fails, but when /index.html is appended, the link works fine: https://eeb7cf1e92033bf3c8b8-48da043f18b372769626ce4192bd6f56.ssl.cf1.rackcdn.com/PR_rpc-openstack-master-xenial_no_artifacts-swift-deploy_223/localhost/host/openstack/log/ara-report/file/2fa20412-0cfc-4986-9559-8f4bd4cb8f54/index.html20:34
hughsaundersoops line length fail20:35
*** dcreno has quit IRC20:49
*** themurph has quit IRC20:49
*** themurph has joined #ara20:49
hughsaundersseems I could probably sed the index.html and replace ([0-9a-fA-F]{8}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{12})/" with \1/index.html" its not an elegant solution though :/20:51
hughsaundersFREEZER_RELATIVE_URLS20:59
hughsaundersIf set to True, Frozen-Flask will patch the Jinja environment so that url_for() returns relative URLs. Defaults to False. Python code is not affected unless you use relative_url_for() explicitly. This enables the frozen site to be browsed without a web server (opening the files directly in a browser) but appends a visible index.html to URLs that would otherwise end with /20:59
hughsaunders^ sounds like that could help20:59
*** harlowja has quit IRC21:00
hughsaundersoh, but its already enabled :( https://github.com/openstack/ara/blob/master/ara/config/base.py#L9821:01
*** sshnaidm_pto has quit IRC21:01
*** tbielawa is now known as tbielawa|g0n321:05
hughsaundersmaybe using relative_url_for instead of url_for() would help21:06
hughsaunders46 hits for url_for, 0 for relative_url for... worth a try I guess.21:06
*** tbielawa|g0n3 has quit IRC21:22
*** Pies has quit IRC21:26
hughsaundersIf the FREEZER_RELATIVE_URLS configuration is True, Frozen-Flask will automatically patch the application’s Jinja environment so that url_for in templates is this function.21:33
hughsaundersSo it seems the url_for stuff should be ok as all the relevant calls are within templates, so should be patched21:36
hughsaundersmaybe this comment in file.py is relevant:21:37
hughsaunders    This is not served anywhere in the web application.21:37
hughsaunders    It is used explicitly in the context of generating static files since21:37
hughsaunders    flask-frozen requires url_for's to crawl content.21:37
hughsaunders    url_for's are not used with file.show_file directly and are instead21:37
hughsaunders    dynamically generated through javascript for performance purposes.21:37
hughsaundersso maybe that javascript optimisation is preventing flask_frozens magic relative url patching from happening21:37
*** themurph has quit IRC21:40
hughsaundersdmsimard: why is this link rendered directly rather than using url_for? https://github.com/openstack/ara/blob/master/ara/templates/report.html#L2021:48
hughsaundersis it because its a direct link to a static file, not a flask view?21:49
* hughsaunders goes to bed21:50
*** dcreno has joined #ara22:08
*** harlowja has joined #ara22:21
*** gvincent_ has quit IRC22:40
*** gvincent has joined #ara22:42
*** Bakey has quit IRC23:58

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