Research Google App Engine pipeline replacements#41
Open
mikelambert wants to merge 3 commits intomasterfrom
Open
Research Google App Engine pipeline replacements#41mikelambert wants to merge 3 commits intomasterfrom
mikelambert wants to merge 3 commits intomasterfrom
Conversation
Comprehensive migration plan covering: - 11 simple mapper jobs → Cloud Run Jobs - 4 MapReduce pipeline jobs → Cloud Run Jobs - 2 custom Pipeline orchestrations → Cloud Workflows - Utility module ports (fb_mapreduce, mr.py) - Infrastructure setup (base image, job framework) - Configuration updates (queue.yaml, Cloud Scheduler) Organized by phase with complexity ratings and FB API requirements.
This commit adds a complete Cloud Run Jobs framework that replaces the legacy App Engine MapReduce and Pipeline libraries. Infrastructure (Phase 1): - dancedeets/jobs/base.py: Job, BatchJob, JobRunner base classes - dancedeets/jobs/fb_utils.py: Facebook API token handling - dancedeets/jobs/metrics.py: Counter/metrics tracking - dancedeets/jobs/gcs_output.py: GCS output writer - dancedeets/jobs/runner.py: CLI entry point - Dockerfile.jobs: Container for Cloud Run Jobs - requirements-jobs.txt: Job dependencies Simple Mapper Jobs (Phase 2): - notify_users.py: Push notifications by timezone - post_japan_events.py: Post Japan events to social - compute_rankings.py: City/country rankings - compute_user_stats.py: User event statistics - refresh_users.py: Refresh Facebook profiles - send_weekly_emails.py: Weekly digest emails GCS Output Jobs (Phase 3): - generate_sitemaps.py: XML sitemap generation - dump_potential_events.py: Export potential events - generate_training_data.py: ML training data - classify_events_ml.py: ML event classification - auto_add_events.py: Auto-add dance events MapReduce Pipeline Replacements (Phase 4): - count_unique_attendees.py: Unique RSVPs by city - update_source_stats.py: Source quality metrics - scrape_and_classify.py: Scrape and classify events Cloud Workflows (Phase 5): - workflows/crawl_and_index_classes.yaml: Orchestration - start_spiders.py: Start ScrapingHub spiders - reindex_classes.py: Rebuild class index - email_crawl_errors.py: Send error reports
This cleanup removes the old mapreduce and pipeline code from original files after migrating all batch processing to Cloud Run Jobs. Files cleaned up (mapreduce code removed, core functions retained): - notifications/added_events.py - kept promote_events_to_user() - sitemaps/events.py - kept generate_sitemap_entry() - ml/gprediction.py - kept predict(), get_predict_service() - users/user_event_tasks.py - kept update_user_qualities() - users/user_tasks.py - kept fetch_and_save_fb_user() - search/email_events.py - kept email_for_user() - pubsub/pubsub_tasks.py - kept social handlers - rankings/rankings.py - kept utility functions - event_scraper/auto_add.py - kept classification logic - event_scraper/thing_db.py - kept Source model - event_scraper/thing_scraper2.py - deprecation stub - classes/class_pipeline.py - deprecation stub Files deleted (fully migrated): - logic/mr_dump.py -> jobs/dump_potential_events.py - logic/unique_attendees.py -> jobs/count_unique_attendees.py - ml/mr_prediction.py -> jobs/classify_events_ml.py The compat/ layer is retained with LEGACY_APIS_ENABLED=False for remaining imports that use json_util.JsonProperty and other utilities.
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.
No description provided.