-
Notifications
You must be signed in to change notification settings - Fork 6
feat: add support for storing and validating GBFS files in GCP storage #695
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
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 tasks
Contributor
Author
|
The integration tests are expected to fail because of the database changes |
davidgamez
reviewed
Aug 19, 2024
davidgamez
approved these changes
Aug 20, 2024
Member
davidgamez
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.jsonfile 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-batchandgbfs-validator-pubsubfunctions 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-batchfunction 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-pubsubfunction 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
batchfunction:gbfs-validator-batch-scheduler-devand clickingForce Run.The
gbfs-validator-pubsubfunction 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.jsonfile 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.shto make sure you didn't break anything