Conversation
functions-python/tasks_executor/src/tasks/web_revalidation/revalidate_feed.py
Outdated
Show resolved
Hide resolved
davidgamez
reviewed
Apr 9, 2026
davidgamez
reviewed
Apr 9, 2026
functions-python/tasks_executor/src/tasks/data_import/transitfeeds/sync_transitfeeds.py
Outdated
Show resolved
Hide resolved
davidgamez
requested changes
Apr 9, 2026
Member
davidgamez
left a comment
There was a problem hiding this comment.
We are missing changes in the operations API, which is an entry point for feed updates.
- Delete functions-python/tasks_executor/src/tasks/data_import/transitfeeds/ directory - Delete functions-python/tasks_executor/tests/tasks/data_import/test_transitfeeds_sync.py - Delete functions-data/transitfeeds_data_import/ directory - Remove sync_transitfeeds_handler import and task registry entry from main.py - Remove transitfeeds-specific producer_url guard in populate_db_gtfs.py Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
TransitFeeds is no longer active. This removes: - The 'transitfeeds' entry from externalIdSourceMap - The transitfeeds redirect banner (Alert) from Header.tsx - The utm_source=transitfeeds URL param handling in Feeds/index.tsx - TransitFeeds URLs from isValidFeedLink test cases Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Reverts web-app and api/src/scripts/populate_db_gtfs.py to their state before the transitfeeds removal commits. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
Author
Good catch @davidgamez - added the revalidation to the operations api |
davidgamez
reviewed
Apr 9, 2026
| pycountry | ||
| pytz No newline at end of file | ||
| pytz | ||
| google-cloud-tasks No newline at end of file |
Member
There was a problem hiding this comment.
I don't see this library used in the API. We need it in the operations API requirements.txt.
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
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 MobilityData/mobilitydatabase-web#67
This pull request introduces a new mechanism to trigger web app cache revalidation via Google Cloud Tasks whenever certain backend processes update or modify feed data. The integration ensures that the web application remains in sync with backend changes by scheduling deduplicated revalidation tasks for affected feeds.
Web app revalidation integration:
create_web_revalidation_taskingcp_utils.pyto enqueue deduplicated Cloud Tasks for web app cache revalidation, with error handling and logging. This function is called after feed updates inbatch_process_dataset,pmtiles_builder,process_validation_report, andreverse_geolocation_processorto ensure the web app reflects backend changes promptly. [1] [2] [3] [4] [5]tasks_executorconfiguration to include theWEB_APP_REVALIDATE_SECRETsecret, which is used for secure revalidation requests.test_web_revalidation.py, covering edge cases and error handling.Workflow and deployment updates:
api-deployer.yml,api-dev.yml,api-qa.yml,api-prod.yml) to support new inputs and secrets for web app revalidation, including passing the revalidation URL and secret from 1Password. [1] [2] [3] [4] [5] [6]Dependency management:
google-cloud-taskstoapi/requirements.txtto support the new task scheduling functionality.Codebase imports and structure:
create_web_revalidation_taskfunction where appropriate. [1] [2] [3] [4] [5]These changes collectively ensure that the web application cache is automatically and efficiently revalidated after backend feed updates, improving data consistency and user experience.
Summarize the changes in the pull request including how it relates to any issues (include the #number, or link them).
Please make sure these boxes are checked before submitting your pull request - thanks!
./scripts/api-tests.shto make sure you didn't break anything