-
Notifications
You must be signed in to change notification settings - Fork 0
Merge pull request #1 from avireddy0/claude/gmail-scraper-cloud-run-E… #2
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
Closed
Closed
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
6eafe58
Merge pull request #1 from avireddy0/claude/gmail-scraper-cloud-run-E…
avireddy0 764adbd
Add BigQuery sync support
avireddy0 7e39657
Update .gitignore to exclude venv and service_account.json
avireddy0 69a8e0f
Update scheduler to run every 5 minutes
avireddy0 7f67b12
Add GitHub Action for automatic deployment
avireddy0 bdc86fe
commit 2
avireddy0 228e543
Fix bugs: remove duplicate dependency, fix deprecated datetime.utcnow()
avireddy0 46c7998
docs: add context-layer usage note
avireddy0 f35498a
fix(security): multi-stage Dockerfile, non-root user, .dockerignore
avireddy0 cce8977
feat(ci): pin base image to SHA256 digest for reproducibility
avireddy0 a7ca72b
security: add --no-log-init to useradd (prevents sparse log files)
avireddy0 821bd08
fix(ci): switch from SA key to WIF auth for Cloud Run deploy
avireddy0 d8d4cb0
ci: re-trigger deploy with updated WIF IAM binding
avireddy0 18ef927
fix(ci): add startup-cpu-boost for faster container startup
avireddy0 c050211
fix(ci): add /app/deps/bin to PATH for functions-framework binary
avireddy0 6c13fb4
fix(ci): correct flag --startup-cpu-boost → --cpu-boost
avireddy0 dee6b4e
fix(ci): reduce scheduler attempt-deadline from 3600s to 1800s (max 30m)
avireddy0 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| .git | ||
| __pycache__ | ||
| *.pyc | ||
| *.md | ||
| .env* | ||
| .claude | ||
| .omc | ||
| .planning | ||
| tests | ||
| docs | ||
| deploy | ||
| *.log |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,51 @@ | ||
| name: Deploy to Cloud Run | ||
|
|
||
| on: | ||
| push: | ||
| branches: | ||
| - main | ||
|
|
||
| env: | ||
| PROJECT_ID: claude-mcp-457317 | ||
| REGION: us-central1 | ||
| SERVICE_NAME: gmail-scraper | ||
| SERVICE_ACCOUNT: claude-service-account@claude-mcp-457317.iam.gserviceaccount.com | ||
|
|
||
| jobs: | ||
| deploy: | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| contents: read | ||
| id-token: write | ||
|
|
||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Google Auth | ||
| id: auth | ||
| uses: google-github-actions/auth@v2 | ||
| with: | ||
| workload_identity_provider: ${{ secrets.WIF_PROVIDER }} | ||
| service_account: claude-service-account@claude-mcp-457317.iam.gserviceaccount.com | ||
|
|
||
| - name: Set up Cloud SDK | ||
| uses: google-github-actions/setup-gcloud@v2 | ||
|
|
||
| - name: Deploy to Cloud Run | ||
| uses: google-github-actions/deploy-cloudrun@v2 | ||
| with: | ||
| service: ${{ env.SERVICE_NAME }} | ||
| region: ${{ env.REGION }} | ||
| source: . | ||
| env_vars: | | ||
| PROJECT_ID=${{ env.PROJECT_ID }} | ||
| DATASET_ID=gmail_analytics | ||
| TABLE_ID=messages | ||
| ADMIN_EMAIL=avi@envsn.com | ||
| flags: '--allow-unauthenticated --service-account=${{ env.SERVICE_ACCOUNT }} --timeout=3600 --memory=2Gi --cpu=2 --max-instances=1 --cpu-boost' | ||
|
|
||
| - name: Update Cloud Scheduler | ||
| run: | | ||
| chmod +x setup_scheduler.sh | ||
| ./setup_scheduler.sh | ||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -19,3 +19,5 @@ ENV/ | |
|
|
||
| # Output files | ||
| all_company_emails.json | ||
| venv/ | ||
| service_account.json | ||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| { | ||
| "python-envs.defaultEnvManager": "ms-python.python:venv", | ||
| "python-envs.pythonProjects": [], | ||
| "githubPullRequests.ignoredPullRequestBranches": [ | ||
| "main" | ||
| ] | ||
| } |
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1,4 @@ | ||
| # gmail | ||
| # Gmail Scraper (Context Layer Ingestion) | ||
|
|
||
| This service ingests domain-wide Gmail into BigQuery for the Envision context layer. | ||
| Operational details and deployment instructions live in `README_CLOUDRUN.md`. |
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
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
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
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.