Closes #566 by adding support for storing GBFS files from an auto-discovery URL in a Cloud Storage bucket. The updates include the creation of a new gbfs.json file with paths pointing to the stored files in the bucket, validating the feeds, and storing the necessary information in the database. The changes involve the creation of the gbfs-validator-batch and gbfs-validator-pubsub functions to support this new functionality, ensuring that GBFS feeds are properly validated and stored.
Expected behavior:
This pull request introduces the following behavior:
The gbfs-validator-batch function triggers an execution that checks all GBFS feeds in the database and publishes a message to the Pub/Sub topic for each feed.
The gbfs-validator-pubsub function processes these messages, downloads feed snapshots to GCP, validates them, saves the validation report summary to GCP, and updates the database with the snapshot information and validation report.
Testing tips:
Trigger the batch function:
Execute the following command to trigger the batch function:
The gbfs-validator-pubsub function should be triggered automatically. You can verify the logs to ensure everything is functioning correctly: Pub/Sub Function Logs.
Check the stored feeds in the specified Cloud Storage bucket. Ensure the gbfs.json file and the validation report are correctly generated: GBFS Storage Bucket.
Verify that the database content in the DEV env reflects the expected changes and updates.
Testers are invited to follow the tips AND to try anything they deem relevant outside the bounds of the testing tips.
Please make sure these boxes are checked before submitting your pull request - thanks!
[ ] Run the unit tests with ./scripts/api-tests.sh to make sure you didn't break anything
[ ] Add or update any needed documentation to the repo
Summary:
Closes #566 by adding support for storing GBFS files from an auto-discovery URL in a Cloud Storage bucket. The updates include the creation of a new
gbfs.json
file with paths pointing to the stored files in the bucket, validating the feeds, and storing the necessary information in the database. The changes involve the creation of thegbfs-validator-batch
andgbfs-validator-pubsub
functions to support this new functionality, ensuring that GBFS feeds are properly validated and stored.Expected behavior:
This pull request introduces the following behavior:
gbfs-validator-batch
function triggers an execution that checks all GBFS feeds in the database and publishes a message to the Pub/Sub topic for each feed.gbfs-validator-pubsub
function processes these messages, downloads feed snapshots to GCP, validates them, saves the validation report summary to GCP, and updates the database with the snapshot information and validation report.Testing tips:
Trigger the
batch
function:gbfs-validator-batch-scheduler-dev
and clickingForce Run
.The
gbfs-validator-pubsub
function should be triggered automatically. You can verify the logs to ensure everything is functioning correctly: Pub/Sub Function Logs.Check the stored feeds in the specified Cloud Storage bucket. Ensure the
gbfs.json
file and the validation report are correctly generated: GBFS Storage Bucket.Verify that the database content in the DEV env reflects the expected changes and updates.
Testers are invited to follow the tips AND to try anything they deem relevant outside the bounds of the testing tips.
Please make sure these boxes are checked before submitting your pull request - thanks!
./scripts/api-tests.sh
to make sure you didn't break anything