inveniosoftware / invenio-records-rest

Invenio records REST API module.
https://invenio-records-rest.readthedocs.io
MIT License
4 stars 62 forks source link

Non-backwards compatible change of behavior in 1.1.0 #214

Closed david-caro closed 6 years ago

david-caro commented 6 years ago

Hi!

I'm not sure if it's an issue on our side (certainly it should be fixed too), but before when accessing the api urls with a non-trailing-backslash url (ex. http://labs.inspirehep.net/api/records) you got a 302 to the same url with the trailing slash added (http://labs.inspirehep.net/records/). But since 1.1.0 that does not happen anymore, and the api app tries to render the template for that page (and failing to do so).

Was that an intentional change?

lnielsen commented 6 years ago

I don't see anything in the code between v1.0.1 and v1.1.0 that should have affected this. The incompatible change in v1.1.0 was the move of the class RecordSchemaJSONV1.

It's not because perhaps you upgraded to Flask v1.0 or changed Flask's strict slash handling in Inspire?

david-caro commented 6 years ago

Not that I'm aware of, the flask upgrade happened some time before we got this error, and we did not change that option at all :/

For some reason though the pinning made the tests pass, that's why I opened the issue here. This is not critical now, as we ended up fixing it on our side more or less.

lnielsen commented 6 years ago

I'm closing this for now, since I've not been able to pin down how this could happen, and not been able to reproduce on other installations. Please re-open in case you see this is indeed on the Invenio-Records-REST side the problem exists.