openstreetmap / operations

OSMF Operations Working Group issue tracking
https://operations.osmfoundation.org/
98 stars 13 forks source link

The current OSM Notes dump and the OSM API contain "hidden" Notes #1014

Closed pa5cal closed 7 months ago

pa5cal commented 7 months ago

When I download the latest OSM Notes dump, it contains OSM Notes that are no longer visible.

How can you reproduce it:

  1. wget -q -N http://planet.openstreetmap.org/notes/planet-notes-latest.osn.bz2
  2. bzgrep '3939153' planet-notes-latest.osn.bz2
  3. https://www.openstreetmap.org/note/3939153

On the other hand, the API still returns a result as json. Something seems to have gone wrong here when "hiding" the note.

  1. https://www.openstreetmap.org/api/0.6/notes/3939153.json
tomhughes commented 7 months ago

That will just be https://github.com/openstreetmap/openstreetmap-website/issues/2146.

pa5cal commented 7 months ago

I think this is not correct. At least for me it's the first time that the OSM notes dump contains a hidden note. Please correct me if this should be the case.

Edit: Ok, some other already reported this, see https://github.com/openstreetmap/openstreetmap-website/issues/2146#issuecomment-1456002512

IMHO, the OSM notes dumb should not contain hidden notes, that's nonsense.

tomhughes commented 7 months ago

Well there is no such thing as a hidden note - notes themselves can't be hidden but comments on a note can. You can see that in the API response which is a bare bones response with no comments as all the comments (probably only one in fact ) are hidden.

That's essentially the source of the whole problem, that things which should be part of the note instead have to be guessed from the comments.

I have no idea what the notes dump does but I imagine it does much the same as the API and skips the hidden comments leaving a bare bones container for the note.

tomhughes commented 7 months ago

Apparently notes can be hidden, but that one hasn't been, and neither has the comment. Rather what has happened is the author of the comment has deleted their account which is exactly the bug that I pointed you at.