Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 91 Next »

[09:12:02 CDT(-0500)] <Arvids> does anyone have any idea how to make group names localizable?
[09:12:21 CDT(-0500)] <EricDalquist> re-write the groups service?
[09:12:31 CDT(-0500)] <EricDalquist> (sorry that's not a great answer)
[09:13:31 CDT(-0500)] <Arvids> that's one of the last part that has been left untranslated
[09:13:55 CDT(-0500)] <Arvids> pretty much everything else can now be translated in non-painful way
[09:14:27 CDT(-0500)] <EricDalquist> sadly that API/service simply may not actually be localizablwe
[09:15:21 CDT(-0500)] <Arvids> i had an idea to solve this in the same way as tab name translation
[09:15:32 CDT(-0500)] <Arvids> (which has not been done yet)
[09:15:44 CDT(-0500)] <EricDalquist> where we stick a i18n key as the name
[09:15:48 CDT(-0500)] <EricDalquist> and do a key lookup in the UI?
[09:15:57 CDT(-0500)] <Arvids> yes
[09:16:30 CDT(-0500)] <Arvids> i see no other way since there are so many group services and changing their API would be a pain
[09:17:04 CDT(-0500)] <EricDalquist> yes
[09:17:08 CDT(-0500)] <Arvids> of course, it could be very-long-term goal to do it in API
[09:17:14 CDT(-0500)] <EricDalquist> re-writing that API is on the long term roadmap
[09:17:25 CDT(-0500)] <EricDalquist> and when we do making i18n a first class concept will be a key part of it
[09:18:38 CDT(-0500)] <Arvids> it would be nice
[09:20:01 CDT(-0500)] <Arvids> btw, group service changes are related to switching to spring security?
[09:20:02 CDT(-0500)] <EricDalquist> yes
[09:20:09 CDT(-0500)] <EricDalquist> yeah, partially
[09:20:16 CDT(-0500)] <EricDalquist> there would be two parts
[09:20:34 CDT(-0500)] <EricDalquist> one would be moving to spring-security for the authN integrations and authZ checks
[09:20:51 CDT(-0500)] <EricDalquist> but we would still need something to replace local, PAGs and smart-ldap group stores
[09:21:03 CDT(-0500)] <EricDalquist> we're talking about pushing grouper for anything else
[09:21:10 CDT(-0500)] <EricDalquist> people would still be able to write custom group services
[09:21:21 CDT(-0500)] <Arvids> but that doesn't sound like a too distant future
[09:21:26 CDT(-0500)] <EricDalquist> it isn't
[09:21:32 CDT(-0500)] <EricDalquist> 4.1 or 4.2
[09:22:00 CDT(-0500)] <EricDalquist> the next two big tasks are "groups, permissions, spring-security" and "users, profiles, layout management"
[09:22:13 CDT(-0500)] <EricDalquist> both of those areas need some serious TLC and modernizing of the code
[09:22:19 CDT(-0500)] <EricDalquist> the question is really which comes first
[09:22:41 CDT(-0500)] <EricDalquist> groups would be great because it would make the framework much more testable
[09:22:49 CDT(-0500)] <EricDalquist> right now you can't really unit test code if it touches groups or permissions
[09:22:56 CDT(-0500)] <EricDalquist> since all that code uses static initialization
[09:23:14 CDT(-0500)] <EricDalquist> so if you touch it in any way it loads up the whole thing
[09:23:51 CDT(-0500)] <Arvids> yes, that's a pain, but user-profile-layout code is in a bigger mess (imho)
[09:24:01 CDT(-0500)] <EricDalquist> yes
[09:24:09 CDT(-0500)] <EricDalquist> that's likely more pressing
[09:24:19 CDT(-0500)] <EricDalquist> since right now we can't really support multiple layouts for one user
[09:24:28 CDT(-0500)] <EricDalquist> so no mobile/desktop differentiation
[09:24:31 CDT(-0500)] <EricDalquist> which is a problem
[09:24:43 CDT(-0500)] <Arvids> oh... that's something new for me
[09:24:43 CDT(-0500)] <EricDalquist> also as you've seen the code is a little ... intimidating (tongue)
[09:24:52 CDT(-0500)] <Arvids> (big grin)
[09:25:02 CDT(-0500)] <EricDalquist> to put it very kindly
[09:25:06 CDT(-0500)] <Arvids> indeed
[09:26:39 CDT(-0500)] <Arvids> btw, as i understand, Gary is the main GUI developer
[09:27:07 CDT(-0500)] <EricDalquist> yes
[09:27:46 CDT(-0500)] <Arvids> ok, i'll try to catch him tomorrow, because i want to discuss some things regarding JavaScript
[09:28:11 CDT(-0500)] <Arvids> today i did some bug-fixing related to translating JS part of portal
[09:28:20 CDT(-0500)] <EricDalquist> he's not in IRC much ... I usually have to bug athena1 and she passes it on for me (smile)
[09:28:31 CDT(-0500)] <EricDalquist> there are a few other guys that work on the JS as well
[09:28:36 CDT(-0500)] <Arvids> ahh... ok
[09:29:17 CDT(-0500)] <Arvids> it's just like we need to agree on some best-practice regarding i18n
[09:30:24 CDT(-0500)] <Arvids> ok, but now it's time to go home... pity that our work-times hardly overlap
[09:30:38 CDT(-0500)] <EricDalquist> yes
[09:30:40 CDT(-0500)] <EricDalquist> it is
[09:31:03 CDT(-0500)] <Arvids> btw athena1 is in the same time zone as you?
[09:32:57 CDT(-0500)] <EricDalquist> no
[09:33:02 CDT(-0500)] <EricDalquist> she's 2 hours later
[09:33:05 CDT(-0500)] <EricDalquist> so its 9:33am here
[09:33:08 CDT(-0500)] <EricDalquist> 7:33am there
[09:33:12 CDT(-0500)] <EricDalquist> she's in seatle, wa
[09:33:43 CDT(-0500)] <Arvids> ahhh... it'll be even more difficult that i thought
[09:33:55 CDT(-0500)] <Arvids> i believe e-mails will suite just fine then
[09:34:06 CDT(-0500)] <EricDalquist> yes
[09:34:12 CDT(-0500)] <EricDalquist> emails would be good
[09:34:12 CDT(-0500)] <Arvids> ok, bye
[09:34:19 CDT(-0500)] <EricDalquist> I'll bug her about it when she is online
[09:34:21 CDT(-0500)] <EricDalquist> have a good evening
[09:42:03 CDT(-0500)] <athena1> just woke up (tongue)
[09:44:43 CDT(-0500)] <athena> so what's our release status looking lik?
[09:50:00 CDT(-0500)] <EricDalquist> morning athena
[09:50:03 CDT(-0500)] <EricDalquist> getting very close
[09:50:09 CDT(-0500)] <EricDalquist> another day or two of bug fixxing
[09:50:15 CDT(-0500)] <EricDalquist> new website is going live today
[09:50:35 CDT(-0500)] <EricDalquist> so if I can get 2-3 bugs fixed today and the same tomorrow I'd be happy with doing the release Wednesday
[09:50:41 CDT(-0500)] <EricDalquist> nick fixed up the caching stuff this weekend
[09:50:45 CDT(-0500)] <EricDalquist> if you want to give that another try
[09:51:07 CDT(-0500)] <athena> oh terrific
[09:51:11 CDT(-0500)] <athena> yeah i'll try that out
[09:51:25 CDT(-0500)] <athena> finally came up with a fix for that issue w/ commas in group names, too
[09:51:40 CDT(-0500)] <athena> gave up and just did 'externalContext.getNativeRequest().getParameterValues('groups[]')'
[09:52:08 CDT(-0500)] <EricDalquist> ah
[09:52:14 CDT(-0500)] <EricDalquist> so was it SpEL's fault?
[09:57:41 CDT(-0500)] <athena> yep
[09:57:58 CDT(-0500)] <athena> so did that to get an array back regardless of whether there was one value or many
[09:59:57 CDT(-0500)] <EricDalquist> yeah
[10:00:06 CDT(-0500)] <EricDalquist> I hate that jquery adds that []
[10:00:24 CDT(-0500)] <EricDalquist> bothers me that they changed their default behavior for PHP developers
[10:01:32 CDT(-0500)] <EricDalquist> oh athena
[10:01:37 CDT(-0500)] <EricDalquist> can you cut a release of the resource manager?
[10:01:39 CDT(-0500)] <EricDalquist> er server
[10:01:40 CDT(-0500)] <athena> sure
[10:01:43 CDT(-0500)] <athena> want me to do that now?
[10:01:43 CDT(-0500)] <EricDalquist> or whatever we call it
[10:01:50 CDT(-0500)] <EricDalquist> yeah, I would have this weekend
[10:01:55 CDT(-0500)] <EricDalquist> just wanted to check with you
[10:01:57 CDT(-0500)] <athena> no problem
[10:02:10 CDT(-0500)] <EricDalquist> make sure there wasn't something else that was planned for it
[10:02:27 CDT(-0500)] <athena> don't think fluid's cut an official release yet
[10:02:58 CDT(-0500)] <athena> would rather use an official release for our GA, but not really the end of the world
[10:03:05 CDT(-0500)] <athena> think most of the holdup has been UI options-related
[10:04:29 CDT(-0500)] <EricDalquist> ah
[10:04:32 CDT(-0500)] <EricDalquist> oh well
[10:12:38 CDT(-0500)] <athena> hm
[10:12:47 CDT(-0500)] <athena> the resource server is using the jasig-parent 32-SNAPSHOT release
[10:12:55 CDT(-0500)] <athena> do we need 32+ or iis 31 enough?
[10:13:31 CDT(-0500)] <EricDalquist> 31 is enough
[10:13:36 CDT(-0500)] <EricDalquist> or should be
[10:13:40 CDT(-0500)] <EricDalquist> let me know if you have problems
[10:13:44 CDT(-0500)] <athena> ok
[10:13:48 CDT(-0500)] <athena> i'll just change it to that (smile)
[10:55:31 CDT(-0500)] <athena> resource server cut
[10:55:41 CDT(-0500)] <EricDalquist> awesome
[10:55:42 CDT(-0500)] <EricDalquist> thanks
[10:55:47 CDT(-0500)] <EricDalquist> I'm updating all our data files
[10:55:53 CDT(-0500)] <EricDalquist> did a clean import
[10:55:55 CDT(-0500)] <EricDalquist> then export all
[10:56:08 CDT(-0500)] <EricDalquist> and just finished replacing all the files in SVN with the new export files
[10:56:17 CDT(-0500)] <EricDalquist> now to see if everything still imports correctly
[10:58:16 CDT(-0500)] <athena> nice (smile)
[10:58:40 CDT(-0500)] <EricDalquist> #fail
[10:59:26 CDT(-0500)] <athena> uhoh!
[10:59:31 CDT(-0500)] <EricDalquist> portal came up
[10:59:37 CDT(-0500)] <EricDalquist> no portlets in the layuout though
[10:59:41 CDT(-0500)] <EricDalquist> there is a welcome tab at least
[10:59:49 CDT(-0500)] <EricDalquist> so now to track down which bit is wonkey
[11:00:14 CDT(-0500)] <athena> (smile)
[11:00:24 CDT(-0500)] <EricDalquist> looks like all the portlets are there in the db
[11:00:39 CDT(-0500)] <EricDalquist> hrm logging in as admin shows me content
[11:00:44 CDT(-0500)] <EricDalquist> I wonder if the guest user has no permissions (tongue)
[11:03:10 CDT(-0500)] <EricDalquist> hrm
[11:03:10 CDT(-0500)] <EricDalquist> yeah
[11:03:12 CDT(-0500)] <EricDalquist> missing groups
[11:03:30 CDT(-0500)] <athena> ah (smile)
[11:39:22 CDT(-0500)] <EricDalquist> ahah
[11:39:31 CDT(-0500)] <EricDalquist> oh wait
[11:39:34 CDT(-0500)] <EricDalquist> nevermind (tongue)
[11:39:59 CDT(-0500)] <EricDalquist> for some reason these two lines are never getting the list of authd principals:
[11:40:00 CDT(-0500)] <EricDalquist> final IPermissionManager pm = authService.newPermissionManager("UP_FRAMEWORK");
[11:40:00 CDT(-0500)] <EricDalquist> final IAuthorizationPrincipal[] principals = pm.getAuthorizedPrincipals("SUBSCRIBE", IPermission.PORTLET_PREFIX + def.getPortletDefinitionId().getStringId());
[11:40:25 CDT(-0500)] <EricDalquist> oh ...
[11:40:33 CDT(-0500)] <EricDalquist> I think the owner is now UP_PORTLET_SUBSCRIBE
[11:40:37 CDT(-0500)] <EricDalquist> not UP_FRAMEWORK
[11:40:50 CDT(-0500)] <athena> should be able to check in the db/entity files
[11:41:39 CDT(-0500)] <EricDalquist> yay that was it
[11:43:04 CDT(-0500)] <athena> oh cool (smile)
[11:43:08 CDT(-0500)] <athena> fixing the user permissions view
[13:12:14 CDT(-0500)] <EricDalquist> question athena and others
[13:12:20 CDT(-0500)] <EricDalquist> if I have a URL like http://localhost:8080/uPortal/normal/render.uP?plCt=whos-online.ctf4
[13:12:37 CDT(-0500)] <EricDalquist> but the node ID ctf4 has been assigned to another portlet in this session
[13:12:41 CDT(-0500)] <EricDalquist> what should the behavior be
[13:12:48 CDT(-0500)] <EricDalquist> go to whos-online
[13:12:55 CDT(-0500)] <athena> go to whos-online
[13:12:56 CDT(-0500)] <EricDalquist> or go to the portlet the currently is sitting at stf4
[13:13:01 CDT(-0500)] <EricDalquist> that's what I though too
[13:13:11 CDT(-0500)] <athena> since likely use case is someone bookmarking a url
[13:13:14 CDT(-0500)] <EricDalquist> unfortunatly the oposite happens right now (smile)
[13:13:16 CDT(-0500)] <athena> and expecting it to still be that portlet
[13:13:16 CDT(-0500)] <EricDalquist> yes
[13:13:18 CDT(-0500)] <athena> oh (tongue)
[13:14:35 CDT(-0500)] <EricDalquist> just committed the updated portal data files
[13:14:41 CDT(-0500)] <EricDalquist> it appears to all work
[13:14:44 CDT(-0500)] <athena> awesome (smile)
[13:15:13 CDT(-0500)] <EricDalquist> I'll do the crlf and encoding fix right before releasing
[13:15:32 CDT(-0500)] <EricDalquist> I also need to make time to test a build/deploy on windows
[13:17:53 CDT(-0500)] <EricDalquist> also Arvids was going to email the dev list about some JavaScript i18n issues he apparently ran into
[13:19:21 CDT(-0500)] <athena> gotcha
[13:19:23 CDT(-0500)] <athena> sounds good
[13:22:21 CDT(-0500)] <athena> wasn't someone going to contribute a DLM evaluator?
[13:23:28 CDT(-0500)] <EricDalquist> hrm
[13:23:29 CDT(-0500)] <EricDalquist> maybe
[13:23:30 CDT(-0500)] <EricDalquist> not sure
[13:23:36 CDT(-0500)] <athena> rickard maybe?
[13:23:42 CDT(-0500)] <EricDalquist> I'll check with Arvids tomorrow morning if he remembers
[13:23:51 CDT(-0500)] <athena> i think that one might have been rickard
[13:23:55 CDT(-0500)] <athena> though not 100% sure
[13:23:56 CDT(-0500)] <EricDalquist> ah
[13:24:05 CDT(-0500)] <athena> and tell arvids i said hi and i'm sorry i'm on such a far-away time zone (smile)
[13:24:19 CDT(-0500)] <EricDalquist> will do (smile)
[13:24:23 CDT(-0500)] <EricDalquist> he asked what TZ you were in
[13:24:36 CDT(-0500)] <EricDalquist> since I generally get in and have ~ an hour to chat with him before he heads home
[13:24:41 CDT(-0500)] <EricDalquist> better than SteveS
[13:24:48 CDT(-0500)] <EricDalquist> who I generally chat with around 10pm
[13:25:26 CDT(-0500)] <athena> lol, yeah
[13:25:40 CDT(-0500)] <athena> probably be easier for me to chat w/ steve
[13:25:45 CDT(-0500)] <athena> can't remember what time i've usually talked to him
[13:25:58 CDT(-0500)] <athena> looks like i just missed arvids this morning though
[13:26:01 CDT(-0500)] <EricDalquist> yeah
[13:26:10 CDT(-0500)] <athena> if we ever really needed to all sit down, i can certainly start early one morning, by the way
[13:26:16 CDT(-0500)] <athena> would just need to have a heads-up
[13:26:26 CDT(-0500)] <EricDalquist> yup
[13:27:16 CDT(-0500)] <athena> kind of cool to have people involved from so many places
[13:27:26 CDT(-0500)] <athena> and i'm really excited about finally having someone who can really QA our i18n support
[13:27:31 CDT(-0500)] <athena> should be really good for uportal
[13:27:32 CDT(-0500)] <EricDalquist> yes
[13:27:36 CDT(-0500)] <EricDalquist> it already has been
[13:27:38 CDT(-0500)] <athena> plus he's just a great addition regardless of i18n
[13:27:42 CDT(-0500)] <athena> awesome all around
[13:27:43 CDT(-0500)] <EricDalquist> he's found a lot of little issues and fixed them
[13:27:50 CDT(-0500)] <athena> yeah, i've seen some of it
[13:27:51 CDT(-0500)] <EricDalquist> he's looking at doing the same approach for group names as we did for tabs
[13:27:59 CDT(-0500)] <EricDalquist> where we just store the message key as the group name in the db
[13:28:02 CDT(-0500)] <EricDalquist> and use message files
[13:28:03 CDT(-0500)] <athena> i saw that email - sounds like a totally reasonable solution
[13:28:04 CDT(-0500)] <EricDalquist> not the best
[13:28:11 CDT(-0500)] <athena> yeah, not the best
[13:28:20 CDT(-0500)] <athena> maybe something i should mention to the FIFER group though
[13:28:21 CDT(-0500)] <EricDalquist> but after his question this morning of "how can we make groups localizable"
[13:28:24 CDT(-0500)] <athena> i'm not sure if that's come up or not
[13:28:37 CDT(-0500)] <EricDalquist> its the only reasonable short term solutions (tongue)
[13:28:42 CDT(-0500)] <athena> yep, totally
[13:28:44 CDT(-0500)] <athena> will work for now
[13:28:53 CDT(-0500)] <athena> and a good requirement to keep in mind for our redesign
[13:28:59 CDT(-0500)] <athena> probably the same issue w/ the permissions system, etc.
[13:29:45 CDT(-0500)] <EricDalquist> yup
[13:32:52 CDT(-0500)] <EricDalquist> athena does this sound right:
[13:33:16 CDT(-0500)] <EricDalquist> you can only have a transient layout node (ctf*) for portlet definitions that do not otherwise exist in your layout?
[13:33:35 CDT(-0500)] <athena> sounds right to me
[13:33:40 CDT(-0500)] <athena> i don't know a ton about that stuff
[13:33:54 CDT(-0500)] <EricDalquist> ok
[13:33:56 CDT(-0500)] <athena> i think that's the intention though?
[13:34:04 CDT(-0500)] <EricDalquist> yes
[13:34:06 CDT(-0500)] <EricDalquist> I do to
[14:46:27 CDT(-0500)] <athena> EricDalquist: not sure this updated caching stuff seems to be working
[14:46:49 CDT(-0500)] <athena> though perhaps some change
[14:47:00 CDT(-0500)] <EricDalquist> nick will see if he can jump into chat here shortly
[14:47:03 CDT(-0500)] <athena> ok
[14:47:59 CDT(-0500)] <nickblair> hello - I hear there are questions regarding CacheControl?
[14:49:29 CDT(-0500)] <athena> hey nick
[14:49:35 CDT(-0500)] <athena> yeah, looks like there is some progress at least
[14:49:56 CDT(-0500)] <athena> think maybe the only issue i'm finding now is that the response code is wrong
[14:50:04 CDT(-0500)] <athena> showing 200 OK
[14:50:18 CDT(-0500)] <athena> and sending the content
[14:50:24 CDT(-0500)] <athena> but i think instead it should send back a 302?
[14:50:27 CDT(-0500)] <nickblair> what is giving you the 200?
[14:50:32 CDT(-0500)] <nickblair> is it XMLHttpRequest.status?
[14:50:46 CDT(-0500)] <athena> just watching the request in firebug
[14:51:31 CDT(-0500)] <nickblair> is it a resource url?
[14:51:54 CDT(-0500)] <athena> er, 304, not 302
[14:51:54 CDT(-0500)] <nickblair> can you send what your portlet code looks like?
[14:51:56 CDT(-0500)] <athena> yes, resource URL
[14:52:07 CDT(-0500)] <nickblair> are you setting an etag and an expiration time?
[14:52:08 CDT(-0500)] <athena> response.getCacheControl().setExpirationTime(120);
[14:52:08 CDT(-0500)] <athena> response.getCacheControl().setUseCachedContent(true);
[14:52:26 CDT(-0500)] <athena> that's what it's using if the etag matches
[14:52:41 CDT(-0500)] <athena> it does seem to respect it in that that code isn't called for another 2 minutes
[14:52:57 CDT(-0500)] <athena> so some of the caching must be working at least
[14:53:33 CDT(-0500)] <nickblair> take a look at https://source.jasig.org/portlets/FunctionalTestsPortlet/trunk/src/main/java/org/jasig/portlet/test/mvc/tests/CacheControlTestController.java
[14:53:38 CDT(-0500)] <nickblair> writejsonContentWithValidationCaching
[14:54:21 CDT(-0500)] <athena> hm - so now you're not setting a timeout for that?
[14:54:39 CDT(-0500)] <athena> or i guess just not when the etag is valid
[14:54:47 CDT(-0500)] <athena> can try removing that, though would be surprised if that's the issue
[14:54:54 CDT(-0500)] <nickblair> can you step through PortletRendererImpl#doServeResource and see which branch your portlet runs through?
[14:55:07 CDT(-0500)] <athena> sure
[14:55:20 CDT(-0500)] <nickblair> heh, you're right that test is missing the expiration time
[14:55:40 CDT(-0500)] <nickblair> it shouldn't factor in though in the branch I think should be executing in PortletRendererImpl
[14:56:18 CDT(-0500)] <athena> using line 435
[14:56:44 CDT(-0500)] <nickblair> I don't have the source checked out here at work
[14:57:03 CDT(-0500)] <athena> // put the captured content in the cache
[14:57:03 CDT(-0500)] <athena> if(shouldCache && !captureStream.isThresholdExceeded()) {
[14:57:03 CDT(-0500)] <athena> this.portletCacheControlService.cachePortletResourceOutput(portletWindowId, httpServletRequest, captureStream.getCapturedContent(), responseWrapper.getContentType(), responseWrapper.getCapturedHeaders(), cacheControl);
[14:57:03 CDT(-0500)] <athena> }
[14:57:21 CDT(-0500)] <athena> so probably not what it should be hitting
[14:58:02 CDT(-0500)] <nickblair> how large is the content?
[14:58:11 CDT(-0500)] <nickblair> is thresholdExceeded true or false?
[14:58:20 CDT(-0500)] <athena> let me look
[14:58:25 CDT(-0500)] <nickblair> ah, you said it is being cached
[14:58:57 CDT(-0500)] <athena> ok, on subsequent requests its hitting
[14:58:57 CDT(-0500)] <athena> if(cachedPortletData != null && !cachedPortletData.isExpired()) {
[14:58:58 CDT(-0500)] <athena> // regardless if etag is set or not, we need to replay cachedPortlet Data if it's not expired
[14:58:58 CDT(-0500)] <athena> return doServeResourceCachedOutput(httpServletRequest, httpServletResponse, cachedPortletData, portletWindow);
[14:58:58 CDT(-0500)] <athena> }
[14:59:07 CDT(-0500)] <athena> which seems like it should mean that the cached content is being served up
[14:59:17 CDT(-0500)] <nickblair> right
[14:59:48 CDT(-0500)] <nickblair> step in doServeResourceCachedOutput
[14:59:53 CDT(-0500)] <nickblair> is it hitting the branch that does:
[15:00:01 CDT(-0500)] <nickblair> if(StringUtils.isNotBlank(ifNoneMatch) && ifNoneMatch.equals(cachedPortletData.getEtag())) { // browser already has the content! send a 304 httpServletResponse.setStatus(HttpServletResponse.SC_NOT_MODIFIED);
[15:00:50 CDT(-0500)] <athena> so look slike ifNoneMatch is null
[15:00:56 CDT(-0500)] <athena> what's supposed to set that?
[15:01:00 CDT(-0500)] <EricDalquist> the browser
[15:01:08 CDT(-0500)] <EricDalquist> I believe
[15:01:32 CDT(-0500)] <nickblair> the browser should set that
[15:01:33 CDT(-0500)] <athena> hmm.
[15:01:55 CDT(-0500)] <athena> wonder if the etag is not being set on the response
[15:02:04 CDT(-0500)] <nickblair> if it received an ETag header on the reponse of a request, it should send the value of the ETag as If-None-Match for subsequent requests to the exact same url
[15:02:13 CDT(-0500)] <athena> looks like that's indeed the problem - not getting it in the first place
[15:02:44 CDT(-0500)] <athena> ok, well it did for this request
[15:03:08 CDT(-0500)] <athena> but doesn't seem to have sent it back
[15:03:23 CDT(-0500)] <nickblair> is the url identical?
[15:03:27 CDT(-0500)] <athena> yes
[15:03:34 CDT(-0500)] <athena> behavior seems to be a bit weird and inconsistent
[15:03:36 CDT(-0500)] <nickblair> no query parameters that change between views?
[15:03:44 CDT(-0500)] <EricDalquist> would it be useful for you to start with a fresh browser session athena and then capture the request/response headers for the first and second requests
[15:03:49 CDT(-0500)] <athena> etag gets set the first time it's called, when the portlet is generating data
[15:04:03 CDT(-0500)] <nickblair> response.getCacheControl().setEtag("blah") correct?
[15:04:05 CDT(-0500)] <athena> then on subsequent requests when the portal is using cached data the etag is not set on the response
[15:04:10 CDT(-0500)] <athena> sure, i can do that EricDalquist
[15:05:18 CDT(-0500)] <nickblair> im not sure that the portal has to respond with the same ETag header when returning 304 in response to a patching If-None-Match header
[15:05:59 CDT(-0500)] <athena> yeah, the weird thing is it's getting a 200 OK with no etag set
[15:06:22 CDT(-0500)] <nickblair> the first if branch in doServeResourceCachedOutput does not add that header; in my testing though with the FunctionalTestsPortlet over the weekend I never saw this problem. 200 for the first request with an etag, 304 for subsequent requests.
[15:06:57 CDT(-0500)] <nickblair> i wonder if there is a difference here between AJAX request and direct link
[15:07:02 CDT(-0500)] <nickblair> is your resource url a direct link?
[15:07:41 CDT(-0500)] <athena> ajax
[15:07:41 CDT(-0500)] <nickblair> try adding one line to doServeResourceCachedOutput
[15:07:53 CDT(-0500)] <athena> http://pastebin.com/uvciRtch
[15:07:58 CDT(-0500)] <athena> first request and second request
[15:08:00 CDT(-0500)] <nickblair> httpServletResponse.addHeader("ETag", cachedPortletData.getEtag());
[15:08:08 CDT(-0500)] <athena> and it's an ajax call
[15:08:09 CDT(-0500)] <nickblair> right after httpServletResponse.setStatus(HttpServletResponse.SC_NOT_MODIFIED);
[15:08:58 CDT(-0500)] <nickblair> no If-None-Match
[15:09:00 CDT(-0500)] <nickblair> on the request
[15:09:06 CDT(-0500)] <nickblair> what browser?
[15:09:47 CDT(-0500)] <nickblair> odd
[15:09:48 CDT(-0500)] <athena> FF
[15:09:59 CDT(-0500)] <nickblair> why is the response header "Etag" - it should be "ETag"
[15:10:07 CDT(-0500)] <athena> hm that might be a problem
[15:11:28 CDT(-0500)] <athena> what's setting that header?
[15:11:45 CDT(-0500)] <nickblair> good question
[15:11:48 CDT(-0500)] <EricDalquist> does your code set any properties athena?
[15:11:55 CDT(-0500)] <nickblair> CacheControlImpl is setting the right one (smile)
[15:11:57 CDT(-0500)] <EricDalquist> calling response.setProperty on a resource response sets headers
[15:12:12 CDT(-0500)] <athena> no, don't think it's setting any properties
[15:12:17 CDT(-0500)] <EricDalquist> I wonder if your portlet is doing: response.setProperty("Etag", foo);
[15:12:33 CDT(-0500)] <EricDalquist> because the string "Etag" does not exist in the uPortal code base
[15:12:34 CDT(-0500)] <EricDalquist> :/
[15:13:15 CDT(-0500)] <EricDalquist> can you pastebin the resource handling method of your portlet?
[15:13:33 CDT(-0500)] <athena> it's not
[15:14:57 CDT(-0500)] <EricDalquist> hrm
[15:15:03 CDT(-0500)] <EricDalquist> so that is a serious mystery
[15:15:12 CDT(-0500)] <EricDalquist> as to how the ETag header is becoming Etag
[15:15:20 CDT(-0500)] <athena> yeah, not clear on that one
[15:15:24 CDT(-0500)] <athena> unless spring is doing something weird
[15:16:05 CDT(-0500)] <EricDalquist> is the code for this in svn?
[15:16:31 CDT(-0500)] <athena> not this part, since it was breaking the portlet
[15:16:40 CDT(-0500)] <athena> though at this point i could probably check it in
[15:17:03 CDT(-0500)] <athena> the related code is really small though
[15:17:41 CDT(-0500)] <athena> String etag = "a" + String.valueOf(-model.hashCode());
[15:17:41 CDT(-0500)] <athena> System.out.println(etag);
[15:17:41 CDT(-0500)] <athena> if (request.getETag() != null && etag.equals(request.getETag())) {
[15:17:41 CDT(-0500)] <athena> response.getCacheControl().setExpirationTime(120);
[15:17:41 CDT(-0500)] <athena> response.getCacheControl().setUseCachedContent(true);
[15:17:41 CDT(-0500)] <athena> System.out.println("Does not match " + request.getETag());
[15:17:41 CDT(-0500)] <athena> return null;
[15:17:43 CDT(-0500)] <athena> }
[15:17:43 CDT(-0500)] <athena> // create new content with new validation tag
[15:17:44 CDT(-0500)] <athena> response.getCacheControl().setETag(etag);
[15:17:44 CDT(-0500)] <athena> response.getCacheControl().setExpirationTime(120);
[15:17:45 CDT(-0500)] <athena> System.out.println("Match " + request.getETag());
[15:17:46 CDT(-0500)] <athena> err, meant to send pastebin
[15:17:48 CDT(-0500)] <athena> http://pastebin.com/6nsNEt0E
[15:17:49 CDT(-0500)] <athena> (smile)
[15:19:00 CDT(-0500)] <EricDalquist> and how does the model get rendered?
[15:19:05 CDT(-0500)] <EricDalquist> which spring view is it using?
[15:19:29 CDT(-0500)] <athena> using the spring json view
[15:19:34 CDT(-0500)] <athena> so could be an issue there, i suppose
[15:19:37 CDT(-0500)] <EricDalquist> the jackson view?
[15:19:40 CDT(-0500)] <athena> yeah
[15:20:32 CDT(-0500)] <athena> don't see any related code in that class offhand
[15:20:32 CDT(-0500)] <EricDalquist> which portlet is this for?
[15:20:37 CDT(-0500)] <athena> news reader
[15:20:54 CDT(-0500)] <EricDalquist> do you have any local mods to web.xml?
[15:21:05 CDT(-0500)] <athena> nope
[15:21:19 CDT(-0500)] <EricDalquist> hrm
[15:21:23 CDT(-0500)] <EricDalquist> I'm running out of ideas :/
[15:21:28 CDT(-0500)] <athena> only mod vs. the public codebase is that snippet at the bottom of the ajax class
[15:21:29 CDT(-0500)] <athena> yeah
[15:21:33 CDT(-0500)] <athena> going to have to do some digging
[15:21:35 CDT(-0500)] <athena> reallyw eird
[15:21:45 CDT(-0500)] <EricDalquist> my only other idea was a rouge filter in web.xml
[15:21:48 CDT(-0500)] <athena> so what does normally set the etag?
[15:21:50 CDT(-0500)] <EricDalquist> but it looks fine
[15:22:12 CDT(-0500)] <EricDalquist> CacheControlImpl:89
[15:22:13 CDT(-0500)] <athena> presumably we have some code that normally does that?
[15:22:27 CDT(-0500)] <EricDalquist> httpResponse.addHeader("ETag", token);
[15:22:35 CDT(-0500)] <athena> gotcha
[15:23:02 CDT(-0500)] <EricDalquist> granted it only does it on the first render
[15:23:09 CDT(-0500)] <EricDalquist> it would be good to find out what the http spec says
[15:23:15 CDT(-0500)] <EricDalquist> and if we need to resend it on each response
[15:23:36 CDT(-0500)] <athena> well, either way not sure why i'm seeing 200 OK with no etag
[15:23:44 CDT(-0500)] <athena> that seems wrong, i think, regardless of the other issue
[15:24:44 CDT(-0500)] <EricDalquist> right
[15:24:47 CDT(-0500)] <EricDalquist> I just talked with nick
[15:24:48 CDT(-0500)] <EricDalquist> and it is
[15:24:58 CDT(-0500)] <EricDalquist> there is a bug where on cache replay the etag wasn't getting set
[15:25:04 CDT(-0500)] <EricDalquist> I'll have a fix in for that in ~ 30 seconds
[15:25:09 CDT(-0500)] <athena> ok (smile)
[15:25:25 CDT(-0500)] <EricDalquist> should we set the expires tag based on the portlet expires timeout as well?
[15:25:46 CDT(-0500)] <athena> i guess so?
[15:25:48 CDT(-0500)] <athena> not really sure
[15:31:03 CDT(-0500)] <EricDalquist> actually we should probably be setting the cache-control public flag as well if the portlet designates the response as public
[15:31:05 CDT(-0500)] <EricDalquist> (tongue)
[15:31:33 CDT(-0500)] <athena> (smile)
[15:37:48 CDT(-0500)] <EricDalquist> ok
[15:37:52 CDT(-0500)] <EricDalquist> first fix is there
[15:37:52 CDT(-0500)] <EricDalquist> IO'
[15:38:07 CDT(-0500)] <EricDalquist> I'm just gonna create a separate jira issue to look into Expires and Cache-Control headers
[15:38:24 CDT(-0500)] <athena> ok
[15:38:37 CDT(-0500)] <EricDalquist> since that shouldn't affect if it is functional or not
[15:38:52 CDT(-0500)] <EricDalquist> we can likely just get even better browser behavior by setting those headers correctly
[15:38:59 CDT(-0500)] <athena> yeah
[15:48:21 CDT(-0500)] <athena> hm, tests working for you?
[15:49:39 CDT(-0500)] <EricDalquist> yes
[15:49:48 CDT(-0500)] <EricDalquist> though running again right now
[15:49:59 CDT(-0500)] <EricDalquist> I have a few local mods I'll be checking in shortly
[15:50:21 CDT(-0500)] <athena> no worries
[15:52:30 CDT(-0500)] <EricDalquist> found the bad test
[15:52:33 CDT(-0500)] <EricDalquist> fixing it now

  • No labels