The change I added for Atom feeds was related to how the timestamp of the latest event was retrieved, I didn't actually change anything in terms of request handling, routing, URL generation, etc. So sadly my guess is as good as any.
@jameslopez I think that without that (?<!\.atom) part, project atom feeds wouldn't work since the .atom extension would be regarded part of the project name instead of part of the feed route.
The only "solution" I can think of is to disallow the .atom extension in project paths, we already do that for .git for the same reason.
@DouweM thanks! That's ok, I am happy to do that change. An alternative would be to create a separate route for the atom feeds but wouldn't be very intuitive I guess...
@patricio is disabling the .extension for paths okay ?
An alternative would be to create a separate route for the atom feeds but wouldn't be very intuitive I guess...
If we have two projects, user/proj and user/proj.atom, how do we know where gitlab.com/user/proj.atom should lead? That can't be solved with a separate route.
Ah, what I meant is user/proj and user/proj.atom would always lead to the project page. But something like user/proj/atom or user/proj.atom/atom will lead to the atom feed of the project, or some other rule. I didn't think this would be an option anyway as it's not very restfully plus wouldn't be consistent...
Another workaround would be to change the to_param method in models/project.rb and add some logic to check whether the project name ends with 1 ".atom" but I think we probably still need a new route in that case.
I think our best option is still disallowing the extension anyway...
@jameslopez We can't change the atom path to /atom since people will have this stored in their RSS readers.
Another workaround would be to change the to_param method in models/project.rb and add some logic to check whether the project name ends with 1 ".atom" but I think we probably still need a new route in that case.
That would still leave the gitlab.com/user/proj.atom ambiguity, wouldn't it?
I think our best option is still disallowing the extension anyway...
I agree. We need to migrate any existing .atom projects and note this in the release post and update doc.
@DouweM I assume that means creating a migration looking for projects ending in .atom in the DB - what do we do with them though? Renaming the project from a.atom to a-atom or something like is an option... but will mean also checking for the availability of that name, etc...
Are these projects actually functional/working though? as I assume the error would prevent people from using them...
@DouweM Not sure I'm getting the business logic right here. Do I need to do the whole namespace thing? or can I just use gitlab_shell.mv_namespace(path_was, path) with the project path ? I've been digging into that for a bit but I am still not sure how the paths in the filesystem work for projects...