Closed rustprooflabs closed 2 months ago
A couple prints in the pgosm_flex.py
module shows that the code here is working as anticipated. The return code from osm2pgsql-replication
is 0 when the output is clearly stating an error. An extract of the output showing the additional prints of the exact command being ran and the return code.
2024-07-06 07:34:14,146:INFO:pgosm-flex:helpers:2024-07-06 07:34:14 [INFO]: Using replication service 'http://download.geofabrik.de/north-america/us/district-of-columbia-updates'.
2024-07-06 07:34:15,419:INFO:pgosm-flex:helpers:2024-07-06 07:34:15 [ERROR]: Error during diff download. Bailing out.
Update Command:
osm2pgsql-replication update -d postgresql://pgosm_flex:mysecretpassword@172.16.0.170:5432/pgosm_dev?application_name=pgosm-flex -- --output=flex --style=./run.lua --slim
RETURNCODE: 0
I searched https://github.com/osm2pgsql-dev/osm2pgsql for the text in the error ("Error during diff download. Bailing out.") without luck. Unsure exactly where the error message is generated from. Will push a workaround fix for this for the time being.
What version of PgOSM Flex are you using?
1.0.1-e53f4cf
via Docker. Current latestdev
branch.What did you do exactly?
I attempted updating a database with replication that hadn't been updated since 2/10/2024. Env vars are stored in
~/.pgosm-db-pgosm-dev
.What did you expect to happen?
I expected it to outright fail because it has been too long since a replication update. Prior experience shows that 90 days is as long as Geofabrik replication data is retained, so it fails.
I expect the record in
osm.pgosm_flex
to indicate failure in theimport_status
column.What did happen instead?
The log output claims success at the end with the message
PgOSM Flex complete!
. You have to look closely a few lines up to see it truly failed:[ERROR]: Error during diff download. Bailing out.
The
import_status
incorrectly claims this was "Completed."What did you do to try analyzing the problem?
I have prior experience with this problem of long replication time frames. I confirmed things aren't working properly based on the error message in log output.