chore: align CI with Cloud Build + rewrite README_CLOUDRUN - #4
Merged
Conversation
Push-to-main now invokes `gcloud builds submit --config=cloudbuild.yaml`, which already creates/refreshes the `gmail-scraper-5min` Cloud Scheduler job. The previous workflow used `deploy-cloudrun@v2` and shelled out to `setup_scheduler.sh`, duplicating cloudbuild.yaml's `delete-old-scheduler` + `create-scheduler` steps. setup_scheduler.sh was also self-contradictory (echoed "Every hour at minute 0" while creating `*/5 * * * *`). Deleting. Verified cloudbuild.yaml `create-scheduler` step replicates the schedule (`*/5 * * * *`), URI, body (`incremental=true`), headers, and time zone the old script set.
avireddy0
force-pushed
the
chore/wave-ij-readme-and-cleanup
branch
from
April 26, 2026 18:07
31923ce to
4d5ecde
Compare
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
Wave I+J cleanup for
Envision-Construction/gmail. Aligns the deploy path with the platform rule "push triggers Cloud Build — nevergcloud run deploy," removes a redundant scheduler script, and rewritesREADME_CLOUDRUN.mdto match what's actually deployed.Commits
docs: rewrite README_CLOUDRUN.md to match deployed reality(98 +/107 -)cloudbuild.yamlstepsdeploy-cloud-run,delete-old-scheduler,create-scheduler).gmail-scraper-sa-keyas break-glass only../deploy.shand manualgcloud run deploypaths.main.py: surfacesincremental(defaulttrue, scheduler depends on it) and the full response shape —mode,skipped_duplicates,completed_at,status: started|completed|failed,error. Health-check JSON now includesmode: "incremental".chore: route deploy through Cloud Build, drop setup_scheduler.sh(6 +/90 -).github/workflows/deploy.ymlnow runsgcloud builds submit --config=cloudbuild.yamlinstead ofdeploy-cloudrun@v2+ shelling out tosetup_scheduler.sh.cloudbuild.yamlcreate-schedulerstep preserves: schedule (*/5 * * * *), URI, body ({"incremental": true, "max_per_user": 100}),Content-Typeheader,America/New_Yorktime zone.setup_scheduler.sh— was redundant with cloudbuild.yaml and self-contradictory (echoed "Every hour at minute 0" while creating*/5 * * * *).Files changed
README_CLOUDRUN.md— full rewrite.github/workflows/deploy.yml— switched fromdeploy-cloudrun@v2togcloud builds submitsetup_scheduler.sh— deletedNotes for follow-up
gunicornis dead inrequirements.txt. TheDockerfileruntime CMD isfunctions-framework --target=run_scraper --port=8080; nothing invokesgunicorn. Confirmed withgrep -r gunicorn .— only hit isrequirements.txt:5. Suggest removing in a separate small PR (kept out of this scope to keep the diff focused).cloudbuild.yamlwas already in the repo and known-good but not wired to a trigger; this PR makes it the active path. Thecloudbuild.yamlcreate-scheduler--attempt-deadline=3600sis intentionally higher than the priorsetup_scheduler.shvalue of1800s; if 30m is the desired ceiling, follow-up commitdee6b4e's reduction needs to be re-applied tocloudbuild.yaml.Test plan
mainand watch the Actions run — confirm Cloud Build job succeeds andgmail-scraperrevision rolls out.gcloud scheduler jobs describe gmail-scraper-5min --location=us-central1— verify schedule, URI, body, deadline match expectations.gcloud scheduler jobs run gmail-scraper-5min --location=us-central1— manual trigger; confirm200and a row appears inclaude-mcp-457317.gmail_analytics.messages.curl https://<service-url>/— confirm health-check JSON now includesmode: "incremental".🤖 Generated with Claude Code