-
Notifications
You must be signed in to change notification settings - Fork 5.1k
feat(source-gmail): incremental sync on messages_details, concurrency, and Gmail rate-limit handling #76431
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
Open
devin-ai-integration
wants to merge
11
commits into
master
Choose a base branch
from
devin/1776396681-source-gmail-incremental-concurrency-ratelimit
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
feat(source-gmail): incremental sync on messages_details, concurrency, and Gmail rate-limit handling #76431
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
f802f02
feat(source-gmail): add incremental sync to messages, concurrency, an…
devin-ai-integration[bot] c84b2d7
chore: apply ruff-format
devin-ai-integration[bot] c7434e3
chore(source-gmail): remove unused pytest import in test_streams
devin-ai-integration[bot] 57dd5e8
refactor(source-gmail): simplify error_handler to DefaultErrorHandler
devin-ai-integration[bot] aa24541
refactor(source-gmail): drop proactive api_budget and redundant test_…
devin-ai-integration[bot] 9aa1981
fix(source-gmail): move cursor to messages_details and use unix secon…
devin-ai-integration[bot] c2cb3f0
fix(source-gmail): add incremental_sync on messages parent and 403 ra…
devin-ai-integration[bot] c55f564
chore: apply ruff-format
devin-ai-integration[bot] 6104eff
fix(source-gmail): use predicate for 403 rateLimitExceeded matcher; a…
devin-ai-integration[bot] 27d9859
fix(source-gmail): split messages into public full-refresh + internal…
devin-ai-integration[bot] 48452a4
Merge master into PR branch, resolve metadata.yaml + gmail.md changel…
devin-ai-integration[bot] 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
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 changes: 3 additions & 0 deletions
3
airbyte-integrations/connectors/source-gmail/unit_tests/__init__.py
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,3 @@ | ||
| # | ||
| # Copyright (c) 2025 Airbyte, Inc., all rights reserved. | ||
| # |
51 changes: 51 additions & 0 deletions
51
airbyte-integrations/connectors/source-gmail/unit_tests/conftest.py
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 @@ | ||
| # | ||
| # Copyright (c) 2025 Airbyte, Inc., all rights reserved. | ||
| # | ||
|
|
||
| from pathlib import Path | ||
| from typing import Any, Mapping, Optional | ||
|
|
||
| import pytest | ||
| import yaml | ||
|
|
||
| from airbyte_cdk.sources.declarative.yaml_declarative_source import YamlDeclarativeSource | ||
| from airbyte_cdk.test.catalog_builder import CatalogBuilder | ||
| from airbyte_cdk.test.state_builder import StateBuilder | ||
|
|
||
|
|
||
| _MANIFEST_PATH = Path(__file__).parent.parent / "manifest.yaml" | ||
|
|
||
|
|
||
| @pytest.fixture(scope="session") | ||
| def manifest() -> Mapping[str, Any]: | ||
| with open(_MANIFEST_PATH) as f: | ||
| return yaml.safe_load(f) | ||
|
|
||
|
|
||
| @pytest.fixture | ||
| def base_config() -> Mapping[str, Any]: | ||
| return { | ||
| "client_id": "test_client_id", | ||
| "client_secret": "test_client_secret", | ||
| "client_refresh_token": "test_refresh_token", | ||
| "include_spam_and_trash": False, | ||
| } | ||
|
|
||
|
|
||
| @pytest.fixture | ||
| def config_with_start_date(base_config) -> Mapping[str, Any]: | ||
| return {**base_config, "start_date": "2024-01-01T00:00:00Z"} | ||
|
|
||
|
|
||
| def build_source(config: Mapping[str, Any], state: Optional[list] = None) -> YamlDeclarativeSource: | ||
| catalog = CatalogBuilder().build() | ||
| state = StateBuilder().build() if not state else state | ||
| return YamlDeclarativeSource(path_to_yaml=str(_MANIFEST_PATH), catalog=catalog, config=config, state=state) | ||
|
|
||
|
|
||
| @pytest.fixture(autouse=True) | ||
| def mock_oauth(requests_mock): | ||
| requests_mock.post( | ||
| "https://accounts.google.com/o/oauth2/token", | ||
| json={"access_token": "access_token", "expires_in": 3600}, | ||
| ) |
Oops, something went wrong.
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.