IRC log of #schooltool for Monday, 2008-06-16

*** aelkner__ has quit IRC00:00
*** jfroche has quit IRC00:00
*** aelkner__ has joined #schooltool00:08
*** jfroche has joined #schooltool00:08
*** Aiste has quit IRC00:11
*** Aiste has joined #schooltool00:14
*** aelkner__ has quit IRC00:23
*** jfroche has quit IRC00:23
*** aelkner__ has joined #schooltool00:29
*** jfroche has joined #schooltool00:29
*** aelkner__ has quit IRC00:50
*** jfroche has quit IRC00:50
*** aelkner__ has joined #schooltool00:57
*** jfroche has joined #schooltool00:57
*** aelkner__ has quit IRC03:00
*** jfroche has quit IRC03:00
*** aelkner__ has joined #schooltool03:06
*** jfroche has joined #schooltool03:06
*** aelkner__ has quit IRC03:07
*** jfroche has quit IRC03:07
*** aelkner__ has joined #schooltool03:07
*** jfroche has joined #schooltool03:07
*** jfroche has quit IRC04:26
*** jfroche has joined #schooltool04:33
*** ayanami has quit IRC04:36
*** didymo has joined #schooltool04:46
*** jfroche has quit IRC05:38
*** jfroche has joined #schooltool05:38
*** didymo has quit IRC09:26
*** jfroche has quit IRC12:27
*** jfroche has joined #schooltool12:30
*** didymo has joined #schooltool12:42
*** mgedmin has joined #schooltool13:59
*** ignas has joined #schooltool14:08
*** didymo has quit IRC14:14
*** jelkner has joined #schooltool15:23
*** th1a has joined #schooltool15:34
*** Lumiere has joined #schooltool15:44
Lumieremorning all16:23
Lumiereth1a: is there no meeting today?16:28
th1aThis is the starting time.16:29
th1aOr in one minute.16:29
th1a...16:29
aelkner__10, 9, 8, 7...16:29
Lumierelol16:30
th1aGood morning/afternoon aelkner__, ignas, Lumiere.16:30
Lumierenormally people at least say hi :)16:30
th1aI was changing my splints.16:30
aelkner__splints?16:30
aelkner__baseball accident?16:31
th1aI have splints on my left ring and right pinky.16:31
th1aIndeed.16:31
th1aApparently playing without gloves has certain drawbacks.16:31
aelkner__i could see that16:31
aelkner__were you in the infield16:31
th1aOutfield... I just had a lapse in technique.16:32
th1aAnyhow, aelkner__, how's CAS testing coming?16:33
aelkner__slowly16:33
aelkner__i struggled with testbrowser last week16:33
aelkner__until i finally called up Stephan Richter16:33
aelkner__who told me that it didn't support redirecting to an outside server16:34
aelkner__but he suggested an idea that could work16:34
aelkner__that being creating a page within the same server16:34
aelkner__that pretends to be the CAS server16:34
ignasi thought of doing that, but was wary of getting double authentication16:35
aelkner__yeah16:35
ignasthat is - internal CAS server trying to use CAS to authenticate16:35
aelkner__right16:35
aelkner__that's the trick i'm wresting with now16:35
aelkner__if i redirect to localhost/fakCAS'login?serverice=...16:36
aelkner__the CAS authentication plugin will get called on that16:36
aelkner__and that would cause an infinite redirection16:37
aelkner__so maybe what i need to do is have the CAS plugin16:37
aelkner__recognize the fact that it's in the middle of traversing to16:37
aelkner__the fakeCAS proxy object16:37
ignasouch16:38
aelkner__and return a manager principal16:38
th1aThis seems kind of nuts.16:38
aelkner__doesn't it though?16:38
ignasthat means that you are changing the code of the actual CAS plugin for testing purposes and you are adding a security hole even16:38
aelkner__yeah16:38
ignasunless you can add the exception in testing environment only16:38
ignasdon't do such thing16:38
th1aIs it even necessary to actually send a request?16:39
ignasth1a: yes :/16:39
aelkner__it's not sending a request16:39
ignasth1a: the redirect part of CAS makes testing it difficult, you can't have an utility that fakes a "back" redirect16:39
aelkner__it's redirecting to the CAS server16:39
Lumierecould this be done with ssh redirection?16:39
ignasLumiere: in a functional test?16:40
Lumiereyea16:40
Lumierehave the script that runs fuctional tests16:40
ignasLumiere: using ssh in a functional test?16:40
Lumieresetup a ssh tunnel to the cas16:40
Lumiereso the test can connect to localhost16:40
ignasLumiere: no way, really, depending on an external CAS server in a test is bad, depending on ssh - even worse16:40
Lumiereok16:41
ignasLumiere: the reason of all the hassle is - being able to test CAS plugin without an actual CAS server outside of schooltool or it's testing environment16:41
Lumiereok16:42
ignasaelkner__: hmm16:43
aelkner__yeah, it's back to the point of the test excersizing code16:43
ignasaelkner__: i would probably try moving getCredentials and checkCredentials into a separate utility16:43
aelkner__that doesn't get run live16:43
ignasand add a stub utility that acts according to the url in the request16:43
ignasso you could special case it16:44
ignasin a test16:44
ignaswithout compromising security in a running application16:44
ignasthe perfect way to do all that stuff would be to add wsgi support to testbrowser16:44
ignasthan you could intercept the CAS request in the level of wsgi middleware16:44
ignaswithout Zope3 even touching your CAS functionality16:44
ignasbut I am not sure what's involved in making testbrowser use wsgi instead of zope publisher16:45
ignasso it's more of a pie in the sky approach16:45
aelkner__stephan mentioned that testbrowser would have to change16:45
th1aI'm just worried that we end up with something that takes a lot of time and doesn't tell us much about how this actually works.16:46
aelkner__i'm definitely worrie about the time aspect16:47
aelkner__i have other projects that i'm not getting to16:47
ignasif it was easy to test functionally - i would have written the tests myself when I made the thing "work" :/16:47
th1aDo we have unit tests for CAS?16:48
aelkner__no16:48
LumiereI was going to say... this may be a place for unit testing16:48
ignasth1a: there aren't that many parts to unit test ...16:49
ignasbut yeah16:49
ignasunit tests would be a lot better than nothing16:49
ignasat least checking that the urls get generated properly16:49
ignasfor redirects16:49
aelkner__how would you unit test something that redirects16:49
Lumiereand that the responses are properly received16:49
aelkner__it's all request based16:49
ignasaelkner__: well - look at schooltool view tests16:49
ignasaelkner__: that check the response object for the right code and right redirect location16:50
th1aThe thing is, you get to a point where you're not confident enough in your functional test magic to know if you're getting a failure because of a real problem or the crazy way your tests are set up.16:50
ignasaelkner__: a lot of schooltool forms that do redirecting have tests that do that16:50
aelkner__i could look into those today if we all think that is a good plan16:51
ignasth1a: the upside is that you can debug your test crazy, while debugging actual CAS integration is very difficult16:51
ignasth1a: you have to rely on print tracing with half of the output going into another log file16:51
th1aWell, the problem is you still don't know which one needs debugging.16:51
ignasthat's a hypothetical problem ...16:52
ignaswe aren't in that stage yet ;)16:52
ignasaelkner__: unit tests for all the functions would be enough i think16:53
th1aI guess what I used to do for SIF is just call the method that generated the request directly in tests, not using TestBrowser.16:53
ignasaelkner__: especially if you can fake responses from CAS server and the expected call order in unit tests16:53
aelkner__which schooltool package has unit tests for views?16:54
ignasaelkner__: most of them16:54
aelkner__ok16:54
aelkner__well, i can give that a try today and let you know tomorrow how it turned out16:54
ignaslook for "request.response.getStatus()"16:54
ignasin unit tests16:55
ignasthat tests if that is "302"16:55
aelkner__right, 302 for redirect16:55
Lumiere302 for temporary redirect16:56
aelkner__schooltool.app.security would probably be the best example to follow16:56
th1aSo we should be able to test the individual steps, if not the whole browser experience in one go.16:56
th1a?16:56
aelkner__schooltool/app/security.txt16:57
ignasmaybe16:57
ignasth1a: the problem is that it's the whole experience that is prone to bugs and is very easy to mess up16:57
ignasth1a: but something is better than nothing16:58
th1aSomething is better than spending two more weeks on this and never having it really test anything real.16:58
ignasaelkner__: doctest_LogoutView in src/schooltool/app/browser/tests/test_app.py is a simple example16:58
aelkner__i'll make a note of that16:58
th1aIs one meta-point here that it would have been better to start with unit tests?16:59
aelkner__do you mean test first? :)17:00
th1aYes, but in this case, unit before functional.17:00
ignasth1a: not in this case17:00
ignasunit tests test whether the thing does what you think it does17:00
ignasall of the difficulties i had were - coming up with what it has to do ...17:01
ignasloading the whole interaction into my head took quite a while17:01
aelkner__my head has been exploding these last two weeks myself17:02
aelkner__just trying to keep track of all the redirections17:02
ignasaelkner__: i really understand why, the doulbe recursion of 2 different applications when calls are implemented as http redirects :/17:02
ignaseven having everything in one instance is difficult to comprehend...17:02
aelkner__i've really been feeling like an idiot at times17:03
th1aNot being able to use TestBrowser hurts.17:04
aelkner__defnitely17:04
ignasit is a complex thing, even tools can help you only that much17:05
th1aOK, so what's the plan at this point?17:06
*** jelkner has quit IRC17:06
aelkner__i'll defer to ignas' judgement on that17:07
aelkner__shall i take a crack at unit tests?17:07
ignasyes, do unit tests17:07
aelkner__that's more than nothing17:08
ignasi'll probably talk to my coworkers and ask them if they have any ideas17:08
ignasi think alga did something like that when working for zopecorp17:08
ignaswhen testing his utility that works with a remote web application17:08
ignasaelkner__: could you commit your bugfixes into cas17:09
th1aIs it reasonable to say aelkner__ should stop working on this at the end of the day Wednesday?17:09
ignasth1a: i don't know, it's up to him17:09
aelkner__well, i'd love to stop working on this :)17:09
ignasi am not using CAS, so he is the one who has to be sure that it works well enough17:09
th1aWell, either Wed. or Fri.17:09
aelkner__i'm feeling deadline pressure17:09
aelkner__ignas: i commited my bugfixes to my branch17:10
aelkner__before i started working on tests17:10
th1aI'll say do the best you can with unit tests, but don't work on it beyond Wednesday.17:10
aelkner__ok17:10
th1aOr sooner if we're lucky.17:10
aelkner__let's hope17:11
aelkner__i'll check back with ignas on my progress same time tomorrow17:11
ignasgood17:11
th1aOK ignas, what have you been up to?17:12
ignasnearly finished timetable refactoring17:12
ignasonly putting back of some safeguards is left17:12
ignasthen i'll work on adding relationships instead of direct references17:12
ignasand start adding school years17:12
ignashad to fix some timetabling views during the process17:13
ignasbecause apparently some people managed to leave some bad code in there during sprints ;)17:13
ignasthat's kind of it17:13
th1aOK.17:14
th1aI'm getting some momentum behind my documentation-writing.17:15
th1aI feel like I have a good workflow now.17:15
th1aLumiere: Any news?17:16
Lumiereyea17:16
Lumiereignas, th1a: How should we build different cando packages (for different locations)?17:16
*** jelkner has joined #schooltool17:16
ignasLumiere: different locations?17:17
Lumiereva's cte program17:17
Lumierevs tom's ri school17:17
Lumierevs arlington career center17:17
ignaswell - are these instances "identical"17:18
ignas?17:18
Lumiereno17:18
th1aWhy would they need different builds?17:18
Lumierethey'll have different modules active17:18
ignasoh17:18
ignaswell - then you create a school setup package17:18
Lumierethe va cte one will be very limited17:18
ignaslike schooltool.stapp2008spring17:18
Lumierethe career center one will be cte + an export package17:19
Lumiereand ri will be whatever tom wants17:19
ignascall them like "cando.cte" "cando.tom" "cando.arlington"17:19
ignasand use them ;)17:19
Lumiereaelkner__: that work for you?17:19
aelkner__i'll work with whatever you guys decide17:20
th1aIt doesn't look like we'll be using it here.17:20
ignasthese packages would store the custom zcml + some customizations like "logo" and css stuff17:20
th1aEither way.17:20
ignas+ evolution scripts in case you decide to "add" or "remove" some modules17:20
Lumiereok17:22
th1aOr a stern warning not to do that ;-)17:22
ignasunless you are sure you will never change the configuration17:22
Lumiereyea I was going to say...17:22
aelkner__:)17:22
ignasthen you can just set up instances17:22
ignasand fix the site.zcml by hand17:22
ignasto include the right modules17:22
Lumiereignas: do we have a way to make that work now? (evolution)17:22
ignasLumiere: well - you can make everything work using evolution17:23
ignasLumiere: i am adding/removing stuff from lyceum sometimes17:23
Lumiereyes... but can we make evolution scripts work where they're not in the same place17:23
ignasLumiere: and it works fine, as long as you know *how* to write an evolution script17:23
ignasthat enables schooltool.gradebook17:23
Lumierecause evolution scripts are global... aren't they?17:23
ignasLumiere: not in the same place?17:23
ignasLumiere: kind of, but cando have their own, and schooltool has it's own and lyceum have their own17:24
ignasthey "stack"17:24
Lumiereok17:24
ignasLumiere: you might want to look at the tizard package17:28
ignasin schooltool repository17:29
Lumiereignas: ok17:29
th1aThat's our hour.17:30
th1aI think we covered everyone's issues...17:30
* th1a drops the bag of gravel.17:30
Lumiereok17:30
th1aHave a great week!~17:30
th1aStay sane.17:31
Lumieregood luck with that17:31
aelkner__i'll try to :)17:31
*** jelkner has quit IRC17:47
*** tdoggette has joined #schooltool21:27
*** ignas has quit IRC22:33
*** mgedmin has quit IRC22:33
*** Lumiere has quit IRC22:39
*** Lumiere has joined #schooltool22:50
*** tdoggette has quit IRC23:22

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