Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(Possibly only temporarilly) invalid gbfs.json are cached and will only be updated on Lamassu restart #495

Open
hbruch opened this issue Jun 26, 2024 · 0 comments

Comments

@hbruch
Copy link
Collaborator

hbruch commented Jun 26, 2024

Expected behavior

Lamassu should not subscribe successfully to a system, which does not publish a valid gbfs.json.
(Ideally, gbfs.json should be reloaded periodically to detect new/changed upstream feed declarations)

Observed behavior

The gbfs.json file of a system is requested once on startup, and, if parseable, cached, even if it does not declare all required feeds (e.g. has system_information missing). It can only be refreshed via a Lamassu restart.

(One of our providers temporarily published incomplete gbfs.json files wich did not contain a system_information feed).

See also entur/gbfs-validator-java#90 for improved gbfs.json validation rules.

Version of lamassu used (exact commit hash or JAR name)

2195466

Data sets in use (links to GBFS feeds)

N.A. (meanwhile the corrupt gbfs.json is fixed by provider)

How to reproduce

Try to import a feed with a gbfs.json like:

{"last_updated":1719298781,"ttl":60,"version":"2.3","data":{"en":{"feeds":[{"name":"gbfs","url":"http://localhost:8000/gbfs/v2/myfeed/gbfs"},{"name":"geofencing_zones","url":"http://localhost:8000/gbfs/v2/myfeed/geofencing_zones"}]}}}

and change the gbfs.json after lamassu is started. Lamassu will continue to publish the initially loaded, incorrect gbfs.json.

@hbruch hbruch changed the title (Possibly only temporary) invalid gbfs.json are cached and only be updated on Lamassu restart (Possibly only temporarilly) invalid gbfs.json are cached and only be updated on Lamassu restart Jun 26, 2024
@hbruch hbruch changed the title (Possibly only temporarilly) invalid gbfs.json are cached and only be updated on Lamassu restart (Possibly only temporarilly) invalid gbfs.json are cached and will only be updated on Lamassu restart Jun 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant